load_catalog loads all ten category directories whatever the engagement is, and route never looked at a skill's category. So giving code_sqli the trigger "sql" would have launched a source-review agent during a black-box web run against a target with no source to read, and the AD skills would have fired on any recon mentioning ldap or smb. Add a `modes` field. A skill that names its modes runs only in those; one that names none runs anywhere, which is what the 91 skills from the previous change rely on. The mode comes from the same string each site already passes to the coverage ledger. Frontmatter for 152 more skills, 179 chain edges: recon discovery feeders, container image scanning, Active Directory, Linux and Windows local privesc, AWS, GCP and Azure, and the 84 source-review skills scoped to whitebox and greybox. 243 of 530 now carry it. Priority was being added unconditionally, so any skill at priority >= 30 scored 15 with nothing matching and cleared the gate on an empty recon. The field documents itself as ordering skills that are "equally triggered" — a tiebreaker — so it now applies only once a skill has matched. An anti-flooding test on meaningless recon caught this. Six tests on the catalogue on disk: that a web run never picks source-review or host skills, that whitebox and host runs do reach theirs, that nothing fires on meaningless recon in any mode, and that every chain edge resolves. The generator refuses triggers under two characters or on a stoplist of terms too common to discriminate, which rejected five on the first pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1.8 KiB
triggers, chains, priority, max_rounds, modes
| triggers | chains | priority | max_rounds | modes |
|---|---|---|---|---|
| dockerfile, root, privileged, capabilities | container_escape, docker_socket_exposure | 26 | 1 | container |
Container Image & Dockerfile Misconfiguration
User Prompt
You are scanning the container image {target} (an OCI image reference, a local tar, or a Dockerfile) for: Container Image & Dockerfile Misconfiguration. CWE-16
Context: {recon_json}
All tools run HEADLESS and are provisioned on demand (time-box each install, skip on failure). Only scan images you are authorized to scan.
Method
- Scan config with
trivy image --scanners misconfigandtrivy config <Dockerfile|dir>; optionallyhadolint <Dockerfile>. - Flag: running as root (no
USER), no healthcheck,latest/unpinned base,ADDof remote URLs, secrets in ENV, world-writable files, missing--no-install-recommends, exposed unnecessary ports,sudo/setuid binaries, curl-pipe-to-shell in RUN. - Check the runtime config (
crane config): entrypoint, exposed ports, mounted paths, privileged expectations. - Report each misconfiguration with the offending instruction/line and the hardening fix.
Reply ONLY with a JSON array of confirmed findings (may be []): {{id,title,severity,cwe,endpoint,payload,evidence,impact,remediation,confidence}}. endpoint = the image ref + layer/path the finding lives in. Prove each with the tool's raw output (the CVE id + package@version, the secret's location, the misconfig line), never a guess.
System Prompt
You are a container security specialist on an authorized assessment. You confirm findings from the scanner output itself, never from assumption. Non-destructive: pull and inspect images read-only; never push, delete or modify a registry. Redact any secret you find to a masked sample in the report.