You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update CLAUDE.md for v0.7.0 — public API, 53 rules, 6 platforms
Reflects current state:
- pkg/scanner public API (importable as Go library)
- 53 rules across 6 platforms (GitHub Actions, GitLab, Azure, Jenkins, Tekton, CircleCI)
- 16 CLI commands including dashboard, diff, merge, export, disclosure
- Severity tuning lessons learned from scan results
- Acknowledgements to Poutine and zizmor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+66-10Lines changed: 66 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Project
4
4
5
-
Fluxgate is a CI/CD pipeline security static analysis tool. It scans GitHub Actions, GitLab CI, and Azure Pipelines workflow files for dangerous security patterns (pwn requests, script injection, OIDC misconfiguration, etc.).
5
+
Fluxgate is a CI/CD pipeline security static analysis tool with **53 detection rules across 6 platforms** (GitHub Actions, GitLab CI, Azure Pipelines, Jenkins, Tekton, CircleCI). Current version: **v0.7.0**.
6
6
7
7
## Security Boundaries
8
8
@@ -16,27 +16,83 @@ Never commit to this public repo:
16
16
17
17
Test fixtures must be synthetic — never copy real workflow files from scanned repos. When in doubt, keep it private.
18
18
19
+
A pre-push hook blocks commits containing disclosure ID patterns. Use `--no-verify` only when intentional and the content is public (e.g., referencing an already-published CVE).
sarif-push — Upload findings to GitHub Code Scanning API
62
+
cache — Manage no-workflow cache (stats/clear)
63
+
```
28
64
29
65
## Testing
30
66
31
67
```bash
32
-
go test ./...
68
+
go test ./... # All tests (scanner, cicd, github, gitlab, diff, merge, export, pkg/scanner)
69
+
go build ./... # Must compile cleanly
33
70
```
34
71
35
-
All rules must have corresponding test fixtures and test functions in `*_test.go`.
72
+
All rules must have corresponding test fixtures and test functions in `*_test.go`. Rules in `pkg/scanner/rules.go` have tests in `pkg/scanner/rules_test.go`. Platform rules in `internal/cicd/` have tests in the same package.
36
73
37
74
## Style
38
75
39
76
- Go standard library style, no unnecessary abstractions
40
-
- Rules are functions with signature `func(wf *Workflow) []Finding`
77
+
- Rules are functions with signature `func(wf *scanner.Workflow) []scanner.Finding`
41
78
- Platform-specific rules live in their parser package (internal/cicd/)
42
-
- Bridge functions in scanner.go convert platform findings to common Finding type
79
+
- Bridge functions in `pkg/scanner/scan.go` convert platform findings to common Finding type
80
+
- Mitigation-aware severity: rules should detect defensive controls (label gates, fork guards, permission checks, etc.) and adjust severity accordingly — see `MitigationAnalysis` in `pkg/scanner/rules.go`
81
+
- Echo/logging context downgrade: injection findings in `echo`/`printf`-only contexts should be downgraded to info
82
+
- Quoted CLI arguments are harder to exploit than unquoted — downgrade to medium
83
+
84
+
## Severity Tuning Lessons Learned
85
+
86
+
-**Compound guards**: actor guard + fork-origin check in the same `if:` = ForkGuard (suppress to info), not just ActorGuard (cap at high)
87
+
-**Trusted-ref isolation**: fork checkout to subdir + executed scripts from trusted ref checkout = info
0 commit comments