SKILLEMALL.ai

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.

mukul975/Anthropic-Cybersecurity-Skills Agent Skills author: mukul975 Apache-2.0 4 files · 1 script body ≈ 6 000 tokens Open the sourcegithub.com↗ analyzed 6 d ago

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

AnalyzerAWSGoogle CloudAzureSecurityAI and agentstype and topics are labelled automatically from the skill text
JSON
Technical rating
D
77/100
safety, quality, tests
Safety 60%
81
Quality 40%
72
Run on models
none yet
Process rating
B
66/100
Nearly there
Failures and branches w 10
0
When it triggers w 12
50
Tools and files w 18
60
the three weakest of ten parameters · all ten

How to improve

  1. The SKILL.md body is over 5,000 tokens: move reference detail into references/ and load it when needed.
For the model run — optional
  • 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-security references/api-reference.md:5
    Offensive-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-security references/api-reference.md:51
    Offensive-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-security references/api-reference.md:121
    Offensive-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-token scripts/agent.py:399
    High-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-token scripts/agent.py:400
    High-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-token scripts/agent.py:402
    High-entropy token-like string (may be an id, hash or a credential) (quoted — discussed, not commanded)
    "AddL…031",
    quoted
  • low Risky intent intent-offensive-security SKILL.md:5
    Offensive-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-security SKILL.md:11
    Offensive-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-security SKILL.md:44
    Offensive-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-dynamic SKILL.md:158
    Dynamic 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-token SKILL.md:239
    High-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-security SKILL.md:245
    Offensive-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-security SKILL.md:249
    Offensive-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-token SKILL.md:267
    High-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-token SKILL.md:288
    High-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-token SKILL.md:289
    High-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-token SKILL.md:438
    High-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-long SKILL.md body ≈ 6000 tokens (recommended < 5000); move details to references/
  • note frontmatter-key unknown frontmatter key "domain"
  • note frontmatter-key unknown frontmatter key "subdomain"
  • note frontmatter-key unknown frontmatter key "nist_csf"
  • note frontmatter-key unknown 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.