Repository navigation
Writing a Check
Ratomir Jovanovic edited this page Oct 28, 2026
·
3 revisions
- Pick or add a control in
internal/catalog/catalog.go. Write the title as a narrow, checkable statement. - Add the detection:
- single-line pattern: add a
lineRuletocodeRulesininternal/adapters/builtin_code.go - structured file (YAML, JSON, XML): add logic to the matching adapter in
builtin_static.go - new tool: add an
externalToolinexternal.gowith argument builder, accepted exit codes and a normalizer
- single-line pattern: add a
- Choose confidence honestly:
Confirmedonly when the observation itself decides the control; otherwiseHypothesis. - Write
Message(why it matters),Fix(what to do) and, if useful,Retest. - Add a vulnerable case to
internal/testfixtureand assert the rule fires ininternal/engine/engine_test.go. Add a safe analog that must not fire. - Add at least one vulnerable and one safe case for the rule to the benchmark corpus in
internal/benchmark/corpus.go.go test ./internal/benchmarkfails when a rule has no vulnerable or no safe case, or when it misses a vulnerable case or fires on a safe one. A rule isimplemented_and_benchmarkedonly with at least 3 of each and precision and recall of at least 0.95. Semgrep rules live inrules/semgrep/with their own fixtures. - Run
gofmt -l .,go vet ./...,go test ./...andpandaward benchmark --strict. See Benchmark and Self-Test.
Never put real-looking secrets in source or fixtures. Assemble secret-shaped strings at runtime like testfixture.FakeStripe.
Pandaward is AGPL-3.0-only. Not a certification or signed penetration test. Report a vulnerability.
Getting started
Using
- CLI Reference
- Claude Code Plugin
- Findings Lifecycle
- Retest and Delta
- Coverage and Statuses
- Reports
- Evidence Bundles
- Network Testing
- Mobile Runtime
- Configuration
- CI Integration
Reference