agentflocks/flocks/performing-serverless-function-security-review
Claude Code and agent skill by agentflocks/flocks
- community
Checking that the SKILL.md file is still in the repository.
'Performing security reviews of serverless functions across AWS Lambda, Azure Functions, and GCP Cloud Functions
Install
npx vskill@latest install agentflocks/flocks/performing-serverless-function-security-reviewSKILL.md
The same SKILL.md was published earlier as agentflocks/flocks/performing-serverless-function-security-review.
Performing Serverless Function Security Review
When to Use
- When auditing serverless applications before production deployment
- When investigating potential data exposure through function environment variables or logs
- When assessing the blast radius of a compromised serverless function execution role
- When compliance reviews require documentation of serverless security controls
- When building secure-by-default templates for serverless deployments
Do not use for container or VM security assessments (use container scanning tools), for API security testing (use DAST tools on the API Gateway layer), or for real-time serverless threat detection (use AWS Lambda Extensions with security agents).
Prerequisites
- AWS CLI, Azure CLI, and gcloud CLI configured with appropriate permissions
- Access to read function configurations, policies, and execution roles
- Prowler or Checkov for automated serverless security scanning
- SAM CLI or Serverless Framework for local function analysis
- CloudTrail, Azure Monitor, or Cloud Audit Logs enabled for function invocation monitoring
Workflow
Step 1: Enumerate All Serverless Functions and Configurations
List all functions across cloud providers with their runtime, memory, timeout, and network settings.
Step 2: Audit Execution Role Permissions
Review IAM roles attached to functions for overly permissive policies.
Step 3: Check Environment Variables for Secrets
Scan function environment variables for hardcoded credentials, API keys, and database connection strings.
Step 4: Review Function Triggers and Access Controls
Verify that function triggers have appropriate authentication and authorization.
Step 5: Analyze Function Code for Security Vulnerabilities
Review function code for common serverless security issues.
Step 6: Run Automated Serverless Security Scanning
Execute Checkov and Prowler for automated compliance checks on serverless resources.
Key Concepts
| Term | Definition | |
|---|---|---|
| Execution Role | IAM role assumed by a serverless function during execution that defines what AWS/cloud resources the function can access | |
| Event Injection | Serverless-specific attack where untrusted data in the event trigger payload is used unsafely in function logic | |
| Function URL | Direct HTTP(S) endpoint for invoking Lambda functions without API Gateway, which may be configured without authentication | |
| Cold Start | Initial function execution that includes container provisioning, during which security agents and extensions must initialize | |
| Resource-Based Policy | Policy attached to the function itself that defines who can invoke it, separate from the execution role | |
| Secrets Manager Integration | Pattern of retrieving sensitive configuration from a secrets management service rather than storing in environment variables |
Tools & Systems
- AWS Lambda: Primary serverless compute platform with execution roles, layers, and resource policies
- Checkov: Static analysis tool for infrastructure-as-code with serverless-specific security policies
- Prowler: Cloud security tool with Lambda-specific checks for permissions, public access, and runtime versions
- Bandit: Python static analysis tool for detecting security issues in function source code
- OWASP Serverless Top 10: Security risk framework specific to serverless architectures
Common Scenarios
Scenario: Lambda Function with Admin Role Leaking Secrets via Environment Variables
Context: A security review discovers a Lambda function with AdministratorAccess execution role and database credentials stored in plaintext environment variables visible in CloudWatch logs.
Approach:
- Enumerate the function's execution role and discover
AdministratorAccessmanaged policy - Check environment variables and find
DB_PASSWORD,API_KEY, andSTRIPE_SECRET_KEYin plaintext - Review CloudWatch logs and find credentials printed in debug log statements
- Create a scoped IAM policy granting only the specific DynamoDB and S3 actions needed
- Migrate secrets to AWS Secrets Manager and update function to retrieve at runtime
- Remove debug logging that outputs sensitive data
- Rotate all exposed credentials and enable Lambda function encryption with KMS
Pitfalls: Changing a function's execution role can break it if the new role is too restrictive. Test in a staging environment first. Environment variable changes trigger a new function version, so ensure aliases and triggers are updated. Secrets Manager calls add latency; cache secrets within the execution context to avoid per-invocation lookups.
Output Format
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.flocks/flockshub/plugins/skills/Anthropic-Cybersecurity-Skills/performing-serverless-function-security-review/SKILL.md
Popularity
- Repository stars
- 480
- Repository forks
- 90
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/agentflocks/flocks/performing-serverless-function-security-review)