serverless
This skill should be used when the user asks to "check serverless security", "audit Lambda functions", "analyze cloud function permissions", "check IAM…
от florianbuetow★ 22 звезды на GitHub
Установить serverless в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Serverless Security (SRVLS)
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.
Supported Flags
Read ../../shared/schemas/flags.md for the full flag specification. This skill
supports all cross-cutting flags. Key flags for this skill:
--scopedetermines which files to analyze (default:changed)--depth standardreads code and checks function configuration--depth deeptraces event flow across function triggers and IAM policy chains--severityfilters output (serverless issues are oftenhighorcritical)
Framework Context
Key CWEs in scope:
- CWE-250: Execution with Unnecessary Privileges (overprivileged IAM)
- CWE-94: Improper Control of Generation of Code (event injection)
- CWE-312: Cleartext Storage of Sensitive Information (secrets in env)
- CWE-377: Insecure Temporary File (/tmp reuse)
- CWE-400: Uncontrolled Resource Consumption (timeout, concurrency)
Detection Patterns
Read references/detection-patterns.md for the full catalog of code patterns,
search heuristics, language-specific examples, and false positive guidance.
Workflow
1. Determine Scope
Parse flags and resolve the file list per ../../shared/schemas/flags.md.
Filter to files likely to contain serverless logic:
- Function handlers (
**/handlers/**,**/functions/**,**/lambdas/**) - Infrastructure as Code (
**/serverless.yml,**/template.yaml,**/*.tf) - IAM policies (
**/iam/**,**/policies/**,**/roles/**) - Function configuration (
**/function.json,**/host.json) - Event sources (
**/events/**,**/triggers/**)
2. Check for Available Scanners
Detect scanners per ../../shared/schemas/scanners.md:
semgrep-- primary scanner for code patternscheckov-- IaC scanner for serverless misconfigurationstfsec-- Terraform-specific security scanner
Record which scanners are available and which are missing.
3. Run Scanners (If Available)
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.
4. Claude Code Analysis
Regardless of scanner availability, perform manual code analysis:
- IAM policy audit: Parse IAM policies (SAM, Serverless Framework,
Terraform) and flag
Action: *,Resource: *, or overly broad permissions. - Event injection: Find event data (API Gateway, SQS, S3, SNS) used in SQL, shell commands, or file paths without sanitization.
- Secrets in environment: Check for secrets in plaintext environment variable definitions in IaC templates.
- /tmp reuse: Find code that writes sensitive data to
/tmpwithout cleanup, which persists between warm invocations. - Timeout configuration: Check for excessive timeouts that increase the cost and blast radius of denial-of-service attacks.
- Concurrency limits: Verify reserved concurrency is configured to prevent a single function from consuming all account capacity.
When --depth deep, additionally trace:
- Cross-function event flows and trust boundaries
- IAM role assumption chains
- VPC configuration and network isolation
5. Report Findings
Format output per ../../shared/schemas/findings.md using the SRVLS prefix
(e.g., SRVLS-001, SRVLS-002).
Include for each finding:
- Severity and confidence
- Exact file location with code snippet
- Blast radius (what the overprivileged function can access)
- Concrete fix with diff when possible
- CWE references
What to Look For
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: *orResource: *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
/tmppersists 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/detection-patterns.md
FAQ
Что делает скилл serverless?
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.
Как установить скилл serverless?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл serverless запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…