Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/release-safety.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
release-safety:
name: Release Branch Guard
if: github.event.pull_request.base.ref == 'v1.0.x'
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
- name: Validate release-sensitive changes are reviewed
uses: actions/github-script@v7
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Secret Scan

on:
push:
branches: [ main, v1.0.x ]
pull_request:
branches: [ main, v1.0.x ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
gitleaks:
name: Detect secrets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install gitleaks
run: |
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz \
| tar -xz gitleaks
sudo mv gitleaks /usr/local/bin/gitleaks

- name: Run gitleaks (all our branch commits, excluding submodule history)
run: |
# Scan the full history of our branches (not --all, which includes
# submodule git objects from _external/clawdbot).
# ~500 commits, ~15s. Catches historical leaks in our own code.
gitleaks detect --source . --config .gitleaks.toml --redact -v \
--log-opts="--branches --remotes=origin/main --remotes=origin/v1.0.x"
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
test:
name: Test & Coverage
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest

env:
JWT_SECRET: test-jwt-secret
Expand Down Expand Up @@ -48,12 +48,12 @@ jobs:
- name: Run backend tests with coverage
run: |
cd backend
npm run test:coverage
npx jest --coverage --forceExit

- name: Run frontend tests with coverage
run: |
cd frontend
npm run test:coverage
npx react-scripts test --coverage --watchAll=false --forceExit

- name: Upload coverage report
uses: actions/upload-artifact@v4
Expand Down
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,17 @@ external/clawdbot-state/
external/commonly-bot-state/
*.bak

_external/
# _external/clawdbot is a git submodule — tracked, not ignored
# Ignore any other dirs that may appear under _external/
_external/*/
!_external/clawdbot

# Claude Code local settings (machine-specific, may contain paths/tokens)
.claude/settings.local.json

# Local env overrides (copy from .env.example, never commit real values)
frontend/.env.local
frontend/.env.development.local
frontend/.env.production.local
# Playwright browser state (may contain session tokens)
state.json
57 changes: 57 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
title = "Commonly Secret Scanner"

[extend]
useDefault = true

[allowlist]
description = "Global allowlist for known-safe patterns"

# Placeholder values in example/template files
regexes = [
# Generic placeholder patterns
'''your[_-](api[_-]?key|token|secret|password|key)''',
'''<your[_-]''',
# nip.io test/local URLs (not secrets)
'''\.nip\.io''',
]

paths = [
# Example/template files — contain placeholder values intentionally
'''backend/\.env\.example''',
'''frontend/\.env\.example''',
# Docs that document revoked/example keys explicitly
'''docs/''',
'''docs-site/''',
# CLAUDE.md and .claude/ reference revoked/example keys for historical context
'''CLAUDE\.md''',
'''\.claude/''',
# k8s docs with curl examples using placeholder tokens
'''k8s/QUICK_START\.md''',
# Runtime state (gitignored, but may appear in git history — see issue #88)
'''external/''',
# _external/clawdbot is a git submodule (Team-Commonly/openclaw fork).
# Submodule contents are not scanned; this covers the historical commits
# before the submodule conversion (when files were tracked directly).
'''_external/''',
# Playwright browser state committed before gitignore was added — see issue #88
'''state\.json''',
# README curl examples with placeholder auth headers
'''README\.md''',
# Frontend component showing API token UI (not storing real tokens)
'''frontend/src/components/UserProfile\.js''',
'''frontend/src/components/ApiDevPage\.js''',
# Integration test with hardcoded test constant (not a real key)
'''backend/__tests__/integration/integrations-e2e\.test\.js''',
]

[[rules]]
id = "commonly-agent-token"
description = "Commonly agent runtime token"
regex = '''cm_agent_[0-9a-f]{64}'''
tags = ["token", "commonly"]

[[rules]]
id = "commonly-api-token"
description = "Commonly user API token"
regex = '''cm_[0-9a-f]{64}'''
tags = ["token", "commonly"]
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "external/awesome-openclaw-skills"]
path = external/awesome-openclaw-skills
url = https://github.com/VoltAgent/awesome-openclaw-skills
[submodule "_external/clawdbot"]
path = _external/clawdbot
url = https://github.com/Team-Commonly/openclaw
1 change: 1 addition & 0 deletions _external/clawdbot
Submodule clawdbot added at 59c84d
Loading
Loading