Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
594fb48
Add gitleaks secret scanning to CI pipeline
mithro Nov 10, 2025
ad76390
Improve gitleaks OAuth secret detection patterns
mithro Nov 10, 2025
189b547
Replace proprietary gitleaks-action with open source alternative
mithro Nov 10, 2025
480b97f
Fix gitleaks false positives for browser test fixtures
mithro Nov 10, 2025
0bf14c1
Add rule-specific allowlist for browser test patterns
mithro Nov 10, 2025
afe779c
Allowlist tests/browser/conftest.py to fix false positives
mithro Nov 10, 2025
0f4d1c0
Fix: Allowlist entire tests/ directory for gitleaks
mithro Nov 10, 2025
8e9ba77
Allowlist .github/workflows/ to exclude CI test credentials
mithro Nov 10, 2025
6cb2959
Allowlist config/settings/base.py for dev defaults
mithro Nov 10, 2025
a19ed73
Trigger workflow with updated OAuth token
mithro Nov 11, 2025
d35f922
Trigger workflow with fresh OAuth token (attempt 2)
mithro Nov 11, 2025
42f3eec
Trigger workflow with newly refreshed OAuth token
mithro Nov 11, 2025
dc3b7fe
Trigger workflow with token from /install-github-app
mithro Nov 11, 2025
a5a3d19
Retry Claude Code Review workflow
mithro Nov 11, 2025
86d90eb
Fix gitleaks security configuration issues
mithro Nov 14, 2025
60c8c5d
Fix gitleaks false positives with proper allowlists
mithro Nov 14, 2025
2db5ba2
Add design document for manufacturing checking system
mithro Nov 16, 2025
f7625b3
Add Docker SDK dependency for manufacturability checking
mithro Nov 16, 2025
d55d534
Add version tracking fields to ManufacturabilityCheck
mithro Nov 16, 2025
78e8bb2
Add ProjectComplianceCertification model for export compliance
mithro Nov 16, 2025
a6d6f3d
Add precheck configuration settings for manufacturability checking
mithro Nov 16, 2025
301aedd
Add minimal precheck log parser (Phase 1)
mithro Nov 16, 2025
7abd623
Add error classification for system vs design failures
mithro Nov 16, 2025
de07da0
Add reproducibility methods to ManufacturabilityCheck
mithro Nov 16, 2025
4673f0e
Refactor check_project_manufacturability to reduce complexity
mithro Nov 16, 2025
df9c2f0
Add per-user concurrency control for manufacturability checks
mithro Nov 16, 2025
53601b3
Fix race condition in per-user concurrency control
mithro Nov 16, 2025
5103493
Fix logic issues in race condition fix
mithro Nov 16, 2025
3df3ee9
Add compliance certification form and views
mithro Nov 16, 2025
d2a2217
Fix critical issues in compliance certification
mithro Nov 16, 2025
a084a01
Add compliance certification validation to shuttle assignment
mithro Nov 16, 2025
3479f53
Add admin interfaces for compliance and updated check fields
mithro Nov 16, 2025
191b930
Skip concurrent threading test for SQLite
mithro Nov 16, 2025
614b76c
Add user documentation for manufacturability checking
mithro Nov 16, 2025
8e4f2f3
Add manufacturability checking environment variables to example
mithro Nov 16, 2025
5fcf4ef
Fix djLint template formatting errors
mithro Nov 16, 2025
cb035ef
Fix gitleaks false positives with comprehensive allowlists
mithro Nov 16, 2025
f7825b2
Trigger CI after gitleaks fixes
mithro Nov 16, 2025
5208ab1
Fix CI failures: gitleaks path pattern and code formatting
mithro Nov 16, 2025
314c482
Fix gitleaks false positive in config/settings/base.py
mithro Nov 16, 2025
dd8560c
Add compliance certification UI and secure manufacturability worker d…
mithro Nov 17, 2025
71f3b66
Add granular Celery targets for local development
mithro Nov 18, 2025
4179f0f
Fix NoReverseMatch error by removing non-existent compliance certific…
mithro Nov 18, 2025
1d4d3d4
Support stripping hash type prefixes from checksum fields
mithro Nov 18, 2025
40be53c
Add SHA256 hash support alongside MD5 and SHA1
mithro Nov 19, 2025
d773dbb
Add design document for content extraction pipeline
mithro Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
# ------------------------------------------------------------------------------
# Uses PostgreSQL as broker by default (via DATABASE_URL)
# Override if needed: CELERY_BROKER_URL=db+postgresql://user:password@localhost:5432/wafer_space

# Manufacturability Checking
# ------------------------------------------------------------------------------
PRECHECK_DOCKER_IMAGE=ghcr.io/wafer-space/gf180mcu-precheck:latest
PRECHECK_CONCURRENT_LIMIT=4
PRECHECK_PER_USER_LIMIT=1
PRECHECK_TIMEOUT_SECONDS=10800
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ concurrency:
cancel-in-progress: true

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for gitleaks to scan

- name: Run Gitleaks
uses: gacts/gitleaks@v1
# gacts/gitleaks is MIT licensed and requires no license key
# Alternative to proprietary gitleaks/gitleaks-action@v2

linter:
runs-on: ubuntu-latest
steps:
Expand Down
147 changes: 147 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Gitleaks configuration for wafer.space platform
# Documentation: https://github.com/gitleaks/gitleaks/tree/master

title = "Gitleaks configuration for wafer.space"

# Allowlisting specific paths that should never be scanned
[allowlist]
description = "Allowlisted files and patterns"
paths = [
'''\.env\.example$''', # Template files are safe
'''\.env\.production\.template$''', # Production template is safe
'''\.env$''', # Local development .env file
'''docs/''', # Documentation files
'''\.venv/''', # Virtual environment
'''\.worktrees/''', # Git worktrees
'''node_modules/''', # Node modules
'''staticfiles/''', # Collected static files
'''__pycache__/''', # Python cache files
'''\.claude/agents/''', # Claude agent documentation
'''config/settings/base\.py$''', # Base settings with env() calls and doc URLs
'''config/settings/local\.py$''', # Local development settings with dev defaults
'''config/settings/test\.py$''', # Test settings with test defaults
'''\.github/workflows/ci\.yml$''', # CI workflow has example connection strings
'''deployment/scripts/''', # Deployment scripts that generate secrets (not contain them)
'''\.gitleaks\.toml$''', # This config file contains example patterns
'''tests/''', # All test files (browser tests, unit tests with test fixtures)
]

# Common patterns for test files with fake credentials
regexes = [
'''test_client_id''',
'''test_secret''',
'''testpass123''',
'''TEST_PASSWORD''',
'''fake_token''',
'''dummy_key''',
'''browser_test_''',
'''_REDACTED''',
]

# Custom rules for Django/OAuth specific secrets
[[rules]]
id = "django-secret-key"
description = "Django SECRET_KEY in assignment"
regex = '''(?i)SECRET_KEY\s*=\s*['"][^'"]{40,}['"]'''
tags = ["django", "secret"]
[rules.allowlist]
regexes = [
'''env\(''', # Allow env() calls - secrets loaded from environment
'''get_random_secret_key\(''', # Allow Django's random secret key generator
'''startswith\(''', # Allow string comparison checks (e.g., line.startswith('SECRET_KEY='))
]

[[rules]]
id = "oauth-client-secret"
description = "OAuth Client Secret in settings"
regex = '''(?i)(client_secret|secret)\s*[:=]\s*['"][a-zA-Z0-9_\-]{20,}['"]'''
tags = ["oauth", "secret"]
[rules.allowlist]
regexes = [
'''test_''',
'''fake_''',
'''dummy_''',
'''env\(''', # Allow env() calls - secrets loaded from environment
'''browser_test_''', # Browser test fixtures
'''REDACTED''', # Placeholder values
]

[[rules]]
id = "mailgun-api-key"
description = "Mailgun API Key"
regex = '''(?i)mailgun[_-]?api[_-]?key\s*[:=]\s*['"][a-z0-9]{32}['"]'''
tags = ["mailgun", "api-key"]

[[rules]]
id = "database-password"
description = "Database password in connection string"
regex = '''postgres://[^:]+:([^@]{8,})@'''
tags = ["database", "password"]
[rules.allowlist]
regexes = [
'''postgres://[^:]+:postgres@''', # Allow literal 'postgres' password only
'''postgres:///''', # Allow no-password localhost connection
'''\$DB_PASSWORD''', # Allow shell variable substitution
]

[[rules]]
id = "github-oauth-secret"
description = "GitHub OAuth Client Secret"
regex = '''(?i)github.*client[_-]?secret\s*[:=]\s*['"][a-f0-9]{40}['"]'''
tags = ["github", "oauth"]

[[rules]]
id = "gitlab-oauth-secret"
description = "GitLab OAuth Client Secret"
regex = '''(?i)gitlab.*client[_-]?secret\s*[:=]\s*['"][a-f0-9]{64,}['"]'''
tags = ["gitlab", "oauth"]

[[rules]]
id = "google-oauth-secret"
description = "Google OAuth Client Secret"
regex = '''(?i)google.*client[_-]?secret\s*[:=]\s*['"]GOCSPX-[a-zA-Z0-9_\-]{28}['"]'''
tags = ["google", "oauth"]

[[rules]]
id = "discord-oauth-secret"
description = "Discord OAuth Client Secret"
regex = '''(?i)discord.*client[_-]?secret\s*[:=]\s*['"][a-zA-Z0-9_\-]{32}['"]'''
tags = ["discord", "oauth"]

[[rules]]
id = "linkedin-oauth-secret"
description = "LinkedIn OAuth Client Secret"
regex = '''(?i)linkedin.*client[_-]?secret\s*[:=]\s*['"][a-zA-Z0-9]{16,}['"]'''
tags = ["linkedin", "oauth"]

[[rules]]
id = "aws-access-key"
description = "AWS Access Key ID"
regex = '''(?i)aws[_-]?access[_-]?key[_-]?id\s*[:=]\s*['"]AKIA[0-9A-Z]{16}['"]'''
tags = ["aws", "access-key"]

[[rules]]
id = "aws-secret-key"
description = "AWS Secret Access Key"
regex = '''(?i)aws[_-]?secret[_-]?access[_-]?key\s*[:=]\s*['"][a-zA-Z0-9/+=]{40}['"]'''
tags = ["aws", "secret-key"]

[[rules]]
id = "private-key"
description = "Private Key (RSA, SSH, etc.)"
regex = '''-----BEGIN (RSA |EC |DSA )?PRIVATE KEY-----'''
tags = ["private-key", "ssh"]

[[rules]]
id = "generic-api-key"
description = "Generic API Key"
regex = '''(?i)api[_-]?key\s*[:=]\s*['"][a-zA-Z0-9_\-]{20,}['"]'''
tags = ["api-key"]
[rules.allowlist]
regexes = [
'''test_''',
'''fake_''',
'''dummy_''',
'''example''',
'''your-api-key-here''',
]
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,20 @@ shell-plus: ## Open Django shell_plus (requires django-extensions)
# ==================== Celery ====================

.PHONY: celery
celery: ## Start Celery worker
@echo "$(BLUE)Starting Celery worker...$(NC)"
@$(CELERY) -A config worker --loglevel=info
celery: ## Start Celery worker (all queues: celery, manufacturability, referrals)
@echo "$(BLUE)Starting Celery worker (all queues)...$(NC)"
@$(CELERY) -A config worker -Q celery,manufacturability,referrals --loglevel=info --concurrency=1 --pool=solo

.PHONY: celery-manufacturability
celery-manufacturability: ## Start Celery worker for manufacturability queue only
@echo "$(BLUE)Starting Celery worker (manufacturability queue only)...$(NC)"
@echo "$(YELLOW)Note: This requires Docker access to run precheck containers$(NC)"
@$(CELERY) -A config worker -Q manufacturability --loglevel=info --concurrency=1 --pool=solo

.PHONY: celery-referrals
celery-referrals: ## Start Celery worker for referrals queue only
@echo "$(BLUE)Starting Celery worker (referrals queue only)...$(NC)"
@$(CELERY) -A config worker -Q referrals --loglevel=info --concurrency=1 --pool=solo

.PHONY: celery-purge
celery-purge: ## Purge all Celery tasks
Expand Down
10 changes: 10 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,16 @@
},
}

# Precheck (Manufacturability Checking) configuration
# See: Design document for manufacturability checking implementation
PRECHECK_DOCKER_IMAGE = env(
"PRECHECK_DOCKER_IMAGE",
default="ghcr.io/wafer-space/gf180mcu-precheck:latest",
)
PRECHECK_CONCURRENT_LIMIT = env.int("PRECHECK_CONCURRENT_LIMIT", default=4)
PRECHECK_PER_USER_LIMIT = env.int("PRECHECK_PER_USER_LIMIT", default=1)
PRECHECK_TIMEOUT_SECONDS = env.int("PRECHECK_TIMEOUT_SECONDS", default=10800) # 3 hours


# Your stuff...
# ------------------------------------------------------------------------------
Loading