Skip to content

Commit f631678

Browse files
committed
chore: remove detect-secrets, trufflehog, and pip-audit
Consolidate secret scanning to gitleaks, vulnerability scanning to osv-scanner.
1 parent df0ae8f commit f631678

9 files changed

Lines changed: 6 additions & 480 deletions

File tree

.github/workflows/leaked-secrets-scan.yml

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -10,77 +10,6 @@ on:
1010
branches: [main]
1111

1212
jobs:
13-
detect-secrets:
14-
runs-on: ubuntu-latest
15-
continue-on-error: true
16-
name: detect-secrets
17-
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v6
20-
with:
21-
fetch-depth: 0
22-
- name: Install detect-secrets
23-
run: pipx install detect-secrets
24-
- name: Verify baseline exists
25-
run: |
26-
if [ ! -f .secrets.baseline ]; then
27-
echo "::error::.secrets.baseline not found!"
28-
exit 1
29-
fi
30-
echo "Found .secrets.baseline"
31-
- name: Scan for secrets
32-
run: |
33-
echo "Scanning for secrets..."
34-
detect-secrets scan \
35-
--baseline .secrets.baseline \
36-
--exclude-files '.*\.lock$' \
37-
--force-use-all-plugins
38-
- name: Audit baseline for unaudited secrets
39-
run: |
40-
echo "Auditing secrets baseline..."
41-
if grep -q '"is_secret": null' .secrets.baseline; then
42-
echo "::error::Found unaudited secrets in baseline! Run: detect-secrets audit .secrets.baseline"
43-
detect-secrets audit .secrets.baseline --report
44-
exit 1
45-
fi
46-
echo "All secrets in baseline have been audited"
47-
detect-secrets audit .secrets.baseline --report
48-
- name: Check for new secrets in PR
49-
if: github.event_name == 'pull_request'
50-
run: |
51-
echo "Checking for new secrets in PR..."
52-
mkdir -p /tmp/pr-scan
53-
git diff origin/main...HEAD --name-only | while read -r file; do
54-
if [ -f "$file" ]; then
55-
mkdir -p "/tmp/pr-scan/$(dirname "$file")" 2>/dev/null || true
56-
cp "$file" "/tmp/pr-scan/$file" 2>/dev/null || true
57-
fi
58-
done
59-
if [ "$(ls -A /tmp/pr-scan 2>/dev/null)" ]; then
60-
echo "Scanning changed files..."
61-
detect-secrets scan \
62-
--baseline .secrets.baseline \
63-
--exclude-files '.*\.lock$' \
64-
--force-use-all-plugins \
65-
/tmp/pr-scan || echo "No new secrets found"
66-
else
67-
echo "No files to scan"
68-
fi
69-
- name: Full repository scan (scheduled)
70-
if: github.event_name == 'schedule'
71-
run: |
72-
echo "Performing full repository scan..."
73-
detect-secrets scan \
74-
--exclude-files '.*\.lock$' \
75-
--force-use-all-plugins
76-
- name: Upload baseline on failure
77-
uses: actions/upload-artifact@v7
78-
if: failure()
79-
with:
80-
name: detect-secrets-report
81-
path: .secrets.baseline
82-
retention-days: 30
83-
8413
gitleaks-cli:
8514
name: gitleaks (CLI)
8615
runs-on: ubuntu-latest
@@ -105,28 +34,3 @@ jobs:
10534
name: gitleaks-report
10635
path: gitleaks-report.sarif
10736
retention-days: 30
108-
109-
trufflehog:
110-
name: trufflehog
111-
runs-on: ubuntu-latest
112-
continue-on-error: true
113-
env:
114-
TRUFFLEHOG_VERSION: '3.93.8'
115-
steps:
116-
- uses: actions/checkout@v6
117-
with:
118-
fetch-depth: 0
119-
- name: Install trufflehog
120-
run: |
121-
curl -sSfL "https://github.com/trufflesecurity/trufflehog/releases/download/v${TRUFFLEHOG_VERSION}/trufflehog_${TRUFFLEHOG_VERSION}_linux_amd64.tar.gz" \
122-
| tar -xz -C /usr/local/bin trufflehog
123-
trufflehog --version
124-
- name: Run trufflehog
125-
run: trufflehog git file://. --only-verified --fail --json 2>&1 | tee trufflehog-report.json
126-
- name: Upload report
127-
uses: actions/upload-artifact@v7
128-
if: always()
129-
with:
130-
name: trufflehog-report
131-
path: trufflehog-report.json
132-
retention-days: 30

.pre-commit-config.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,8 @@ repos:
88
- id: check-merge-conflict
99
- id: end-of-file-fixer
1010

11-
- repo: https://github.com/Yelp/detect-secrets
12-
rev: v1.5.0
13-
hooks:
14-
- id: detect-secrets
15-
args: ['--baseline', '.secrets.baseline', '--exclude-files', '.*\.lock$']
16-
1711
- repo: https://github.com/gitleaks/gitleaks
1812
rev: v8.30.0
1913
hooks:
2014
- id: gitleaks
2115
stages: [pre-push]
22-
23-
- repo: https://github.com/trufflesecurity/trufflehog
24-
rev: v3.93.8
25-
hooks:
26-
- id: trufflehog
27-
stages: [pre-push]

.secrets.baseline

Lines changed: 0 additions & 214 deletions
This file was deleted.

claude-code/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export ARIA_GQL_LOCAL=http://localhost:9002/graphql
182182
### smartem-decisions CI Features
183183

184184
- Schema drift checking (Alembic vs SQLModel)
185-
- Security scanning (detect-secrets)
185+
- Security scanning (gitleaks)
186186
- Versioned docs to GitHub Pages
187187
- Windows .exe builds (PyInstaller) for agent and epuplayer
188188

claude-code/shared/skills/devops/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ kubectl get secret db-credentials -n smartem-decisions -o jsonpath='{.data.POSTG
174174
| ci.yml | Push/PR to main | Tests, lint, type check |
175175
| _container.yml | Tag push (v*) | Build and push Docker image |
176176
| _docs.yml | Tag push | Build and publish docs |
177-
| security-scan.yml | Schedule/manual | detect-secrets scanning |
177+
| security-scan.yml | Schedule/manual | gitleaks scanning |
178178
| build_win_smartem_agent.yml | Push to main | Windows .exe build |
179179

180180
### Debugging CI Failures

claude-code/smartem-decisions/agents/devops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Tools and technologies you work with:
9595
- Docker/Podman for containerisation and image management
9696
- kubectl, kustomize, Helm for Kubernetes deployment and configuration management
9797
- Development scripts and local cluster management (k3d, kind, development tools)
98-
- Security scanning tools (detect-secrets, container vulnerability scanners)
98+
- Security scanning tools (gitleaks, container vulnerability scanners)
9999
- Monitoring stacks (Prometheus, Grafana, logging aggregation systems)
100100
- Infrastructure automation and GitOps tools for configuration management
101101

docs/decision-records/decisions/0005-detect-secrets-for-secret-scanning.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Date: 21/08/2025
44

55
## Status
66

7-
Accepted
7+
Superseded by gitleaks consolidation
8+
9+
**Note:** detect-secrets was removed in favour of consolidating on gitleaks as the single secret scanning tool across the project. This simplifies the security tool stack and aligns with the organisational preference for gitleaks standardisation.
810

911
## Context
1012

lefthook.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,3 @@ pre-push:
2929
run: npm run format:check
3030
gitleaks:
3131
run: gitleaks protect --staged --redact
32-
trufflehog:
33-
run: trufflehog git file://. --only-verified

0 commit comments

Comments
 (0)