From appsec
This skill should be used when the user asks to "check serverless security", "audit Lambda functions", "analyze cloud function permissions", "check IAM policies", "find serverless vulnerabilities", or mentions "serverless", "Lambda", "Cloud Functions", "Azure Functions", "IAM policy", "event injection", "overprivileged", or "/tmp reuse" in a security context.
npx claudepluginhub florianbuetow/claude-code --plugin appsecThis skill uses the workspace's default tool permissions.
Analyze serverless applications for security vulnerabilities including
Acquire memory dumps from live systems/VMs and analyze with Volatility 3 for processes, networks, DLLs, injections in incident response or malware hunts.
Provides x86-64/ARM disassembly patterns, calling conventions, control flow recognition for static analysis of executables and compiled binaries.
Identifies anti-debugging checks like IsDebuggerPresent, NtQueryInformationProcess in Windows binaries; suggests bypasses via patches/hooks/scripts for malware analysis, CTFs, authorized RE.
Analyze serverless applications for security vulnerabilities including overprivileged IAM policies, event data injection, secrets stored in plain-text environment variables, /tmp directory data reuse between invocations, excessive timeout configuration, and missing concurrency limits. Serverless architectures introduce unique attack surfaces where each function is an independent entry point with its own trust boundary.
Read ../../shared/schemas/flags.md for the full flag specification. This skill
supports all cross-cutting flags. Key flags for this skill:
--scope determines which files to analyze (default: changed)--depth standard reads code and checks function configuration--depth deep traces event flow across function triggers and IAM policy chains--severity filters output (serverless issues are often high or critical)Key CWEs in scope:
Read references/detection-patterns.md for the full catalog of code patterns,
search heuristics, language-specific examples, and false positive guidance.
Parse flags and resolve the file list per ../../shared/schemas/flags.md.
Filter to files likely to contain serverless logic:
**/handlers/**, **/functions/**, **/lambdas/**)**/serverless.yml, **/template.yaml, **/*.tf)**/iam/**, **/policies/**, **/roles/**)**/function.json, **/host.json)**/events/**, **/triggers/**)Detect scanners per ../../shared/schemas/scanners.md:
semgrep -- primary scanner for code patternscheckov -- IaC scanner for serverless misconfigurationstfsec -- Terraform-specific security scannerRecord which scanners are available and which are missing.
If semgrep is available, run with rules targeting serverless:
semgrep scan --config auto --json --quiet <target>
If checkov is available, run for IaC:
checkov -d <target> -o json --quiet
Filter results to serverless-relevant rules. Normalize output to the findings schema.
Regardless of scanner availability, perform manual code analysis:
Action: *, Resource: *, or overly broad permissions./tmp without
cleanup, which persists between warm invocations.When --depth deep, additionally trace:
Format output per ../../shared/schemas/findings.md using the SRVLS prefix
(e.g., SRVLS-001, SRVLS-002).
Include for each finding:
These are the high-signal patterns specific to serverless security. Each
maps to a detection pattern in references/detection-patterns.md.
Overprivileged IAM policies -- Functions with Action: * or
Resource: * that violate the principle of least privilege.
Event data injection -- Untrusted event data (HTTP body, S3 key, SNS message) used in SQL queries, shell commands, or file paths.
Secrets in plain-text env vars -- API keys, database passwords, and tokens defined as plain-text environment variables in IaC templates.
/tmp directory reuse -- Sensitive data written to /tmp persists across
warm invocations and may be accessible to subsequent executions.
Excessive function timeout -- Timeouts set to the maximum (15 minutes for Lambda) when the function's task requires seconds.
Missing concurrency limit -- No reserved concurrency, allowing a triggered flood to exhaust the account's concurrent execution quota.
Missing VPC configuration -- Functions accessing internal resources without VPC attachment, or VPC-attached functions without security groups.
| Scanner | Coverage | Command |
|---|---|---|
| semgrep | Event injection, code patterns | semgrep scan --config auto --json --quiet <target> |
| checkov | IAM policies, IaC misconfig | checkov -d <target> -o json --quiet |
| tfsec | Terraform IAM, Lambda config | tfsec <target> --format json |
Fallback (no scanner): Use Grep with patterns from references/detection-patterns.md
to find IAM policies, event handling, environment variable definitions, and
/tmp usage. Report findings with confidence: medium.
Use the findings schema from ../../shared/schemas/findings.md.
SRVLS (e.g., SRVLS-001)serverlessspecializedSRVLSCWE-250, CWE-94, CWE-312A05:2021 (Security Misconfiguration)E (Elevation of Privilege) or T (Tampering)Severity guidance for this category:
Action: * on Resource: *, event injection leading to RCE