DB detecting-serverless-function-injection
Detects and prevents code injection attacks targeting serverless functions (AWS Lambda, Azure Functions, Google Cloud Functions) through event source poisoning, malicious layer injection, runtime command execution, and IAM privilege escalation via function modification. The analyst combines static analysis of function code, CloudTrail event correlation, runtime behavior monitoring, and IAM policy auditing to identify injection vectors across the expanded serverless attack surface including API Gateway, S3, SQS, DynamoDB Streams, and CloudWatch event triggers. Activates for requests involving Lambda security assessment, serverless injection detection, function event poisoning analysis, or serverless privilege escalation investigation.
Detects and prevents code injection attacks targeting serverless functions (AWS Lambda, Azure Functions, Google Cloud Functions) through event source…
As a process B 66/100 · Nearly there — weak spots: failures and branches
How to improve
- The SKILL.md body is over 5,000 tokens: move reference detail into references/ and load it when needed.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 19
✓ No critical or high findings
Medium and low: 19
-
low Risky intent
intent-offensive-securityreferences/api-reference.md:5Offensive-security / dual-use content (legitimate for authorised testing; review intended use)Detects code injection vulnerabilities in AWS Lambda functions by scanning function code for dangerous sinks (eval, exec, os.system, child_process.exec), auditing Lambda layers for external account de
-
low Risky intent
intent-offensive-securityreferences/api-reference.md:51Offensive-security / dual-use content (legitimate for authorised testing; review intended use)Audits execution roles for dangerous permissions (iam:PassRole, lambda:UpdateFunctionCode, sts:AssumeRole) and administrative policies. Any function with UpdateFunctionCode + PassRole is a privilege e
-
low Risky intent
intent-offensive-securityreferences/api-reference.md:121Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)| 1 | Critical injection sinks or privilege escalation paths detected |
detector -
low Secrets in code
secret-high-entropy-tokenscripts/agent.py:399High-entropy token-like string (may be an id, hash or a credential) (detector / deny-list definition)"Upda…1v2",
detector -
low Secrets in code
secret-high-entropy-tokenscripts/agent.py:400High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)"Upda…1v2",
quoted -
low Secrets in code
secret-high-entropy-tokenscripts/agent.py:402High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)"AddL…031",
quoted -
low Risky intent
intent-offensive-securitySKILL.md:5Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)malicious layer injection, runtime command execution, and IAM privilege escalation
detector -
low Risky intent
intent-offensive-securitySKILL.md:11Offensive-security / dual-use content (legitimate for authorised testing; review intended use)function event poisoning analysis, or serverless privilege escalation investigation.
-
low Risky intent
intent-offensive-securitySKILL.md:44Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)- Detecting privilege escalation paths where an adversary with `lambda:UpdateFunctionCode` and `iam:PassRole` can assume higher-privilege execution roles
detector -
low Dangerous commands
cmd-eval-dynamicSKILL.md:158Dynamic code execution from decoded/untrusted input (documentation of a security skill)os.system(f"aws s3 cp s3://{bucket}/{key} /tmp/file")security skill -
low Secrets in code
secret-high-entropy-tokenSKILL.md:239High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)"eventName": ["Upda…1v2", "Publ…031"],
quoted -
low Risky intent
intent-offensive-securitySKILL.md:245Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)### Step 5: Detect IAM Privilege Escalation via Lambda
detector -
low Risky intent
intent-offensive-securitySKILL.md:249Offensive-security / dual-use content (legitimate for authorised testing; review intended use)- **The Lambda privilege escalation pattern**: An attacker with `lambda:UpdateFunctionCode` and `iam:PassRole` permissions can:
-
low Secrets in code
secret-high-entropy-tokenSKILL.md:267High-entropy token-like string (may be an id, hash or a credential) (documentation table row)| filter eventName = "Upda…1v2"
table -
low Secrets in code
secret-high-entropy-tokenSKILL.md:288High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)"Upda…1v2",
quoted -
low Secrets in code
secret-high-entropy-tokenSKILL.md:289High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)"Upda…1v2",
quoted -
low Secrets in code
secret-high-entropy-tokenSKILL.md:438High-entropy token-like string (may be an id, hash or a credential) (detector / deny-list definition; documentation table row)| filter eventName = "Upda…1v2"
detectortable
A further 2 matches are quotations in this security skill's documentation and are not counted as findings.
Files scanned: 4. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
body-longSKILL.md body ≈ 6000 tokens (recommended < 5000); move details to references/ - note
frontmatter-keyunknown frontmatter key "domain" - note
frontmatter-keyunknown frontmatter key "subdomain" - note
frontmatter-keyunknown frontmatter key "nist_csf" - note
frontmatter-keyunknown frontmatter key "mitre_attack"
Process rating: all ten parameters 66/100
- 0Failures and branches. Linear process with no failure handling
- 50When it triggers. No condition that starts the skill
- 60Tools and files. Uses tools (bash, web, python) that frontmatter does not declare
- 60Result and completion. Output format stated, no completion criterion
- 70Inputs and preconditions. Inputs and preconditions are listed
- 70Execution cost. Instruction body is 6000 tokens
- 100Steps. 68 steps
- 100Consistency. Name and required fields are in place
- 100Running it twice. Mutating operations check current state
- 100Progress reporting. Reports progress
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- -41 reference files, but SKILL.md never points to them: the model will not open them
- -31 of 1 scripts are never mentioned in SKILL.md
- +2Single-language instructions
- +4Description says when NOT to use the skill
- +3Description length 743: enough signal without eating the budget
- +4Structure: 15 headings
- +3Step-by-step instructions: 68 items
- +3Output format is stated explicitly
- +4Has examples (32 code blocks)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 72.