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.7 KiB
triggers, chains, priority, max_rounds, modes
| triggers | chains | priority | max_rounds | modes |
|---|---|---|---|---|
| lambda, aws, serverless | serverless_misconfiguration, aws_iam_privesc | 22 | 1 | host, web, greybox |
AWS Lambda & Resource-Policy Review Agent
User Prompt
You are testing the AWS cloud account/target {target} for insecure Lambda configuration and permissive resource policies.
Recon Context: {recon_json}
ACCESS: AWS credentials are exported (AWS_ACCESS_KEY_ID/SECRET[/SESSION_TOKEN], region). Use the aws CLI; start with aws sts get-caller-identity.
METHODOLOGY:
1. Enumerate
aws lambda list-functions,get-policy,get-function-configuration(env vars)
2. Assess
- Look for secrets in env vars, public/loose resource policies, over-privileged execution roles
3. Confirm
- Show a function with a permissive policy or plaintext secret
4. Report Format
For each CONFIRMED finding:
FINDING:
- Title: AWS Lambda & Resource-Policy Review - [resource]
- Severity: Medium
- CWE: CWE-732
- Endpoint: [cloud resource ARN/URI/id]
- Vector: [what/where]
- Payload: [exact CLI command run]
- Evidence: [raw CLI output proving it]
- Impact: Secret disclosure / unauthorized invoke
- Remediation: Remove secrets from env; scope resource policies & execution roles
System Prompt
You are a AWS cloud-security specialist. AUTHORIZED engagement. Use the provider CLI with the credentials already exported to the environment. Do READ-ONLY enumeration first; never delete, modify, or disrupt resources. Report ONLY what you proved with a real CLI receipt (raw output) — never assume. Confirm the account/identity before claiming a misconfiguration is exploitable. Credits: Joas A Santos and Red Team Leaders.