curate-security-results
Skill329 starsChanged 7 days agoMIT-0View on GitHub
Use when publishing the public-safe snapshot of the security tests (SRT, ZAP DAST, RBAC static and dynamic) into security/test-results/<version>/ with scripts/security/curate_results.py.
In this repository42 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-modelSkill
- agent-capability-reviewSkill
- api-rbac-testSkill
- backend-lambdaSkill
- code-reviewSkill
- create-hf-dataset-prSkill
- cut-release-changelogSkill
- dependabot-prsSkill
- documentationSkill
- extraction-pipelineSkill
- fix-single-issueSkill
- frontend-uiSkill
- full-test-batterySkill
- infrastructureSkill
- live-auth-checksSkill
- live-eval-and-costSkill
- prepare-changelogSkill
- prep-develop-for-releaseSkill
- product-demoSkill
- pr-review-ciSkill
- pr-reviewSkill
- releaseSkill
- release-validationSkill
- remove-classification-flat-keysSkill
- repo-quality-reviewSkill
- run-benchmarksSkill
- run-stack-testsSkill
- srt-security-scanSkill
- sync-pii-anonymizerSkill
- testing-qaSkill
- test-upgradeSkill
- transform-deploy-testSkill
- ui-i18nSkill
- update-solution-profileSkill
- ux-test-ciSkill
- ux-testSkill
- ux-test-stories-ciSkill
- ux-test-storiesSkill
- work-the-backlog-hazardsSkill
- work-the-backlogSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the user wants to run the security tests and update the published results — e.g.
- Very specific: line 31
Use AWS_PROFILE=default for the live tests (see CLAUDE.md).
- Very specific: line 81
Use AWS_PROFILE=default for the live ones (see CLAUDE.md).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run Security Tests & Curate Results — Public-Safe Snapshots
Use this skill when the user wants to run the security tests and update the
published results — e.g. "run security tests and update results", "capture
the security results for 0.6.1", "update the security test-results", "curate
the SRT/ZAP/RBAC output". It runs the tests and produces redacted, public-safe
markdown under security/test-results/<version>/.
Fast path — one command
For "run security tests and update results", just run:
# Full (offline tests + live ZAP + RBAC-dynamic against a stack):
make security-results STACK_NAME=<stack> REGION=<region>
# Offline-only (SRT + RBAC static; ZAP + RBAC-dynamic stubbed "not run"):
make security-resultsThis wraps scripts/security/run_security_tests.sh: it runs each test, tees the
outputs the curator needs (incl. the ZAP scan stdout), and writes the snapshot.
Then review the redactions (step 3) and, if the user asked, commit
security/test-results/<version>/.
- Use
AWS_PROFILE=defaultfor the live tests (see CLAUDE.md). If the user didn't name a stack, ask which one, or run offline-only. - Env knobs:
VERSION=(default repoVERSION),DATE=(default today),SKIP_SRT=1(skip the slow SRT scan, curate from existing.srt/issues.json). - The live RBAC-dynamic setup can hit a Cognito eventual-consistency race on
first run (
UserNotFoundException); it tears its users down cleanly, so just re-runmake security-resultsif that happens.
The rest of this doc is the manual breakdown — reach for it when you need to
run only part of the flow, re-curate existing reports, or debug the curator. The
per-test triage skills remain srt-security-scan.md,
api-rbac-test.md, and
run-stack-tests.md.
The layout it maintains
security/
├── README.md # coverage & goals of each test (durable)
├── threat-modeling/ # threat model (moved here from repo root)
└── test-results/
├── README.md # the process (this skill is its runbook)
└── <version>/ # one snapshot per release
├── MANIFEST.md # version, git SHA, date, per-test gate
├── srt.md
├── zap-dast.md
├── rbac-static.md
└── rbac-dynamic.mdWhy curated, never raw
Raw reports carry environment-specific identifiers (AWS account IDs, Cognito
pool IDs, API Gateway hostnames, request IDs, absolute local paths) and change
every run — unfit for a public repo. scripts/security/curate_results.py
parses each raw report and re-emits only publish-safe fields, running every
string through a redaction filter (_REDACTIONS). Public-safe by
construction — but still eyeball the output before committing.
Steps
Run the tests you want in the snapshot (each writes to gitignored dirs):
Test Command Raw output the curator reads SRT make srt-scan.srt/issues.json(live results) if present, else committedscripts/srt/issues.jsonRBAC static make api-test-static 2>&1 | tee /tmp/rbac-static.txtthe captured stdout file (S1–S5 check enumeration) RBAC dynamic make api-test STACK_NAME=<stack>newest scratch/api-test-results/<stack>-<ts>/(report.json→ op × role matrix)ZAP DAST make stacktest-zap STACK_NAME=<stack> 2>&1 | tee scratch/zap-reports/zap-scan-stdout.txtnewest scratch/zap-reports/Use
AWS_PROFILE=defaultfor the live ones (see CLAUDE.md). A test you skip gets a visible "not run" stub, not a silent omission — so a partial snapshot is fine and honest.ZAP stdout matters: the ZAP JSON report carries findings only. The per-rule PASS/WARN/IGNORE enumeration (the auditable "which rules ran" record) lives only in the scan stdout, so tee it into the report dir as
zap-scan-stdout.txt. Without it the curated ZAP doc still reports alert counts, but falls back to a note instead of the full rule list.Curate. The tool auto-discovers the newest
scratch/report dirs; it does not read the wall clock, so--dateis required:python3 scripts/security/curate_results.py \ --date <YYYY-MM-DD> \ --version <label> \ # defaults to repo VERSION file --rbac-static /tmp/rbac-static.txtOverrides:
--srt-issues,--rbac-dynamic-dir,--rbac-static,--zap-dirpoint at specific source files/dirs.- Review the diff. Confirm the redaction placeholders are present where
identifiers would be (
<ACCOUNT_ID>,<API_HOST>,<COGNITO_POOL>,<ARN>,<REQUEST_ID>,<LOCAL_PATH>), the gate outcomes match what the tools printed, and no raw account/host/pool string leaked. Skim the full generated markdown, not just the manifest. - Commit
security/test-results/<version>/.
Gotchas
- Redaction is a choke point, not a guarantee about unknown fields. The
curator only publishes fields it explicitly maps. If you extend it to surface
a new raw field, either confirm that field is already env-agnostic or add a
pattern to
_REDACTIONSfirst. Nevercpa raw report intotest-results/. - The
<REQUEST_ID>pattern requires a digit (so it won't eat CamelCase English likeOriginAccessControl). If a real token is all-letters it won't be caught — but ZAP/API request IDs always contain digits. - Re-running overwrites the version folder (idempotent). Bump
--versionfor a genuinely new release snapshot; don't overwrite a shipped release's record with a later run. - The RBAC dynamic snapshot deliberately drops the per-request-id full
matrix — that's environment-specific. It publishes the gate, failures, and
coverage counts; the full matrix stays in the gitignored raw
report.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

