[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B8YC3CMN6CZ9X15MBCKK7G":3,"skill-same:01M7B8YC3CMN6CZ9X15MBCKK7G":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":13,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M7B8YC3CMN6CZ9X15MBCKK7G","performing-serverless-function-security-review",null,"Performing security reviews of serverless functions across AWS Lambda, Azure Functions, and GCP Cloud Functions to identify overly permissive execution roles, insecure environment variables, injection vulnerabilities, and missing runtime protections.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-serverless-function-security-review\ndescription: 'Performing security reviews of serverless functions across AWS Lambda,\n  Azure Functions, and GCP Cloud Functions to identify overly permissive execution\n  roles, insecure environment variables, injection vulnerabilities, and missing runtime\n  protections.\n\n  '\ndomain: cybersecurity\nsubdomain: cloud-security\ntags:\n- cloud-security\n- serverless\n- lambda\n- azure-functions\n- cloud-functions\n- security-review\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- ID.AM-08\n- GV.SC-06\n- DE.CM-01\nmitre_attack:\n- T1078.004\n- T1530\n- T1537\n- T1580\n- T1055\n---\n\n# Performing Serverless Function Security Review\n\n## When to Use\n\n- When auditing serverless applications before production deployment\n- When investigating potential data exposure through function environment variables or logs\n- When assessing the blast radius of a compromised serverless function execution role\n- When compliance reviews require documentation of serverless security controls\n- When building secure-by-default templates for serverless deployments\n\n**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).\n\n## Prerequisites\n\n- AWS CLI, Azure CLI, and gcloud CLI configured with appropriate permissions\n- Access to read function configurations, policies, and execution roles\n- Prowler or Checkov for automated serverless security scanning\n- SAM CLI or Serverless Framework for local function analysis\n- CloudTrail, Azure Monitor, or Cloud Audit Logs enabled for function invocation monitoring\n\n## Workflow\n\n### Step 1: Enumerate All Serverless Functions and Configurations\n\nList all functions across cloud providers with their runtime, memory, timeout, and network settings.\n\n```bash\n# AWS Lambda: List all functions with key security attributes\naws lambda list-functions \\\n  --query 'Functions[*].[FunctionName,Runtime,MemorySize,Timeout,Role,VpcConfig.VpcId,Layers[*].Arn]' \\\n  --output table\n\n# Check for functions using deprecated runtimes\naws lambda list-functions \\\n  --query 'Functions[?Runtime==`python3.7` || Runtime==`nodejs14.x` || Runtime==`dotnetcore3.1`].[FunctionName,Runtime]' \\\n  --output table\n\n# Azure Functions: List all function apps\naz functionapp list \\\n  --query \"[].{Name:name, Runtime:siteConfig.linuxFxVersion, ResourceGroup:resourceGroup, HttpsOnly:httpsOnly}\" \\\n  -o table\n\n# GCP Cloud Functions: List all functions\ngcloud functions list \\\n  --format=\"table(name, runtime, status, httpsTrigger.url, serviceAccountEmail, vpcConnector)\"\n```\n\n### Step 2: Audit Execution Role Permissions\n\nReview IAM roles attached to functions for overly permissive policies.\n\n```bash\n# AWS: Check each Lambda function's execution role\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  role_arn=$(aws lambda get-function-configuration --function-name \"$func\" --query 'Role' --output text)\n  role_name=$(echo \"$role_arn\" | awk -F'\u002F' '{print $NF}')\n  echo \"=== $func -> $role_name ===\"\n\n  # List attached policies\n  aws iam list-attached-role-policies --role-name \"$role_name\" \\\n    --query 'AttachedPolicies[*].[PolicyName,PolicyArn]' --output table\n\n  # Check for wildcard actions\n  for policy_arn in $(aws iam list-attached-role-policies --role-name \"$role_name\" --query 'AttachedPolicies[*].PolicyArn' --output text); do\n    version=$(aws iam get-policy --policy-arn \"$policy_arn\" --query 'Policy.DefaultVersionId' --output text)\n    aws iam get-policy-version --policy-arn \"$policy_arn\" --version-id \"$version\" \\\n      --query 'PolicyVersion.Document' --output json | python3 -c \"\nimport json, sys\ndoc = json.load(sys.stdin)\nfor stmt in doc.get('Statement', []):\n    actions = stmt.get('Action', [])\n    if isinstance(actions, str): actions = [actions]\n    resources = stmt.get('Resource', [])\n    if isinstance(resources, str): resources = [resources]\n    if '*' in actions or any(a.endswith(':*') for a in actions):\n        print(f'  WARNING: {stmt[\\\"Effect\\\"]} {actions} on {resources}')\n\" 2>\u002Fdev\u002Fnull\n  done\ndone\n```\n\n### Step 3: Check Environment Variables for Secrets\n\nScan function environment variables for hardcoded credentials, API keys, and database connection strings.\n\n```bash\n# AWS Lambda: Extract environment variables\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  envvars=$(aws lambda get-function-configuration --function-name \"$func\" \\\n    --query 'Environment.Variables' --output json 2>\u002Fdev\u002Fnull)\n  if [ \"$envvars\" != \"null\" ] && [ -n \"$envvars\" ]; then\n    echo \"=== $func ===\"\n    echo \"$envvars\" | python3 -c \"\nimport json, sys, re\nvars = json.load(sys.stdin)\nsensitive_patterns = [\n    r'(?i)(password|secret|key|token|credential|api.?key)',\n    r'(?i)(aws.?access|aws.?secret)',\n    r'(?i)(database.?url|connection.?string|db.?pass)',\n    r'AKIA[0-9A-Z]{16}'\n]\nfor key, value in vars.items():\n    for pattern in sensitive_patterns:\n        if re.search(pattern, key) or re.search(pattern, str(value)):\n            masked = value[:4] + '****' + value[-4:] if len(value) > 8 else '****'\n            print(f'  SENSITIVE: {key} = {masked}')\n            break\n\"\n  fi\ndone\n\n# Azure Functions: Check app settings\nfor app in $(az functionapp list --query \"[].name\" -o tsv); do\n  rg=$(az functionapp show --name \"$app\" --query \"resourceGroup\" -o tsv)\n  echo \"=== $app ===\"\n  az functionapp config appsettings list \\\n    --name \"$app\" --resource-group \"$rg\" \\\n    --query \"[?contains(name,'KEY') || contains(name,'SECRET') || contains(name,'PASSWORD')].{Name:name}\" \\\n    -o table 2>\u002Fdev\u002Fnull\ndone\n```\n\n### Step 4: Review Function Triggers and Access Controls\n\nVerify that function triggers have appropriate authentication and authorization.\n\n```bash\n# AWS: Check for unauthenticated Lambda function URLs\naws lambda list-function-url-configs \\\n  --function-name FUNCTION_NAME \\\n  --query 'FunctionUrlConfigs[*].[FunctionUrl,AuthType,Cors]' --output table\n\n# Check for resource-based policies allowing public invocation\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  policy=$(aws lambda get-policy --function-name \"$func\" --query 'Policy' --output text 2>\u002Fdev\u002Fnull)\n  if [ -n \"$policy\" ]; then\n    echo \"$policy\" | python3 -c \"\nimport json, sys\ndoc = json.loads(sys.stdin.read())\nfor stmt in doc.get('Statement', []):\n    principal = stmt.get('Principal', {})\n    if principal == '*' or principal == {'AWS': '*'}:\n        print(f'WARNING: $func has public invoke policy: {stmt.get(\\\"Sid\\\", \\\"unnamed\\\")}')\" 2>\u002Fdev\u002Fnull\n  fi\ndone\n\n# GCP: Check for unauthenticated Cloud Functions\ngcloud functions list --format=json | python3 -c \"\nimport json, sys\nfunctions = json.load(sys.stdin)\nfor func in functions:\n    name = func.get('name', '').split('\u002F')[-1]\n    trigger = func.get('httpsTrigger', {})\n    if trigger and func.get('ingressSettings') == 'ALLOW_ALL':\n        print(f'WARNING: {name} allows all ingress traffic')\n\"\n```\n\n### Step 5: Analyze Function Code for Security Vulnerabilities\n\nReview function code for common serverless security issues.\n\n```bash\n# Download Lambda function code for review\naws lambda get-function --function-name FUNCTION_NAME \\\n  --query 'Code.Location' --output text | xargs curl -o function.zip\nunzip function.zip -d function-code\u002F\n\n# Scan with Bandit (Python) or ESLint security plugin (Node.js)\n# Python functions\npip install bandit\nbandit -r function-code\u002F -f json -o bandit-results.json\n\n# Node.js functions\nnpm install -g eslint @microsoft\u002Feslint-plugin-sdl\neslint --ext .js function-code\u002F\n\n# Check for common serverless vulnerabilities:\n# 1. SQL injection in database queries\n# 2. Command injection via os.system or subprocess\n# 3. Insecure deserialization\n# 4. Event data injection (untrusted event parameters)\n# 5. Excessive function permissions\ngrep -rn \"os.system\\|subprocess\\|eval(\\|exec(\" function-code\u002F || echo \"No obvious injection patterns\"\ngrep -rn \"pickle.loads\\|yaml.load\\b\" function-code\u002F || echo \"No deserialization risks\"\n```\n\n### Step 6: Run Automated Serverless Security Scanning\n\nExecute Checkov and Prowler for automated compliance checks on serverless resources.\n\n```bash\n# Checkov scan for serverless frameworks\ncheckov -d .\u002Fserverless-project\u002F \\\n  --framework serverless \\\n  --output json > checkov-serverless.json\n\n# Prowler Lambda-specific checks\nprowler aws \\\n  --checks lambda_function_no_secrets_in_variables \\\n           lambda_function_url_auth_type \\\n           lambda_function_using_supported_runtimes \\\n           lambda_function_not_publicly_accessible \\\n  -M json-ocsf \\\n  -o .\u002Fprowler-lambda\u002F\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Execution Role | IAM role assumed by a serverless function during execution that defines what AWS\u002Fcloud resources the function can access |\n| Event Injection | Serverless-specific attack where untrusted data in the event trigger payload is used unsafely in function logic |\n| Function URL | Direct HTTP(S) endpoint for invoking Lambda functions without API Gateway, which may be configured without authentication |\n| Cold Start | Initial function execution that includes container provisioning, during which security agents and extensions must initialize |\n| Resource-Based Policy | Policy attached to the function itself that defines who can invoke it, separate from the execution role |\n| Secrets Manager Integration | Pattern of retrieving sensitive configuration from a secrets management service rather than storing in environment variables |\n\n## Tools & Systems\n\n- **AWS Lambda**: Primary serverless compute platform with execution roles, layers, and resource policies\n- **Checkov**: Static analysis tool for infrastructure-as-code with serverless-specific security policies\n- **Prowler**: Cloud security tool with Lambda-specific checks for permissions, public access, and runtime versions\n- **Bandit**: Python static analysis tool for detecting security issues in function source code\n- **OWASP Serverless Top 10**: Security risk framework specific to serverless architectures\n\n## Common Scenarios\n\n### Scenario: Lambda Function with Admin Role Leaking Secrets via Environment Variables\n\n**Context**: A security review discovers a Lambda function with `AdministratorAccess` execution role and database credentials stored in plaintext environment variables visible in CloudWatch logs.\n\n**Approach**:\n1. Enumerate the function's execution role and discover `AdministratorAccess` managed policy\n2. Check environment variables and find `DB_PASSWORD`, `API_KEY`, and `STRIPE_SECRET_KEY` in plaintext\n3. Review CloudWatch logs and find credentials printed in debug log statements\n4. Create a scoped IAM policy granting only the specific DynamoDB and S3 actions needed\n5. Migrate secrets to AWS Secrets Manager and update function to retrieve at runtime\n6. Remove debug logging that outputs sensitive data\n7. Rotate all exposed credentials and enable Lambda function encryption with KMS\n\n**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.\n\n## Output Format\n\n```\nServerless Function Security Review\n=======================================\nAccount: 123456789012\nFunctions Reviewed: 34\nReview Date: 2026-02-23\n\nCRITICAL FINDINGS:\n[SRVL-001] Overly Permissive Execution Role\n  Function: payment-processor\n  Role: AdministratorAccess (full AWS access)\n  Required Permissions: DynamoDB:PutItem, S3:GetObject (2 actions)\n  Remediation: Create scoped policy with only required permissions\n\n[SRVL-002] Secrets in Environment Variables\n  Function: payment-processor\n  Variables: DB_PASSWORD, STRIPE_SECRET_KEY, API_KEY\n  Risk: Visible in console, API, and CloudWatch logs\n  Remediation: Migrate to Secrets Manager, remove from env vars\n\nSUMMARY:\n  Functions with admin roles:           3 \u002F 34\n  Functions with secrets in env vars:   8 \u002F 34\n  Functions with deprecated runtimes:   5 \u002F 34\n  Functions with public access:         2 \u002F 34\n  Functions without VPC:               28 \u002F 34\n  Functions with wildcard permissions: 12 \u002F 34\n```\n","# Performing Serverless Function Security Review\n\n## When to Use\n\n- When auditing serverless applications before production deployment\n- When investigating potential data exposure through function environment variables or logs\n- When assessing the blast radius of a compromised serverless function execution role\n- When compliance reviews require documentation of serverless security controls\n- When building secure-by-default templates for serverless deployments\n\n**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).\n\n## Prerequisites\n\n- AWS CLI, Azure CLI, and gcloud CLI configured with appropriate permissions\n- Access to read function configurations, policies, and execution roles\n- Prowler or Checkov for automated serverless security scanning\n- SAM CLI or Serverless Framework for local function analysis\n- CloudTrail, Azure Monitor, or Cloud Audit Logs enabled for function invocation monitoring\n\n## Workflow\n\n### Step 1: Enumerate All Serverless Functions and Configurations\n\nList all functions across cloud providers with their runtime, memory, timeout, and network settings.\n\n```bash\n# AWS Lambda: List all functions with key security attributes\naws lambda list-functions \\\n  --query 'Functions[*].[FunctionName,Runtime,MemorySize,Timeout,Role,VpcConfig.VpcId,Layers[*].Arn]' \\\n  --output table\n\n# Check for functions using deprecated runtimes\naws lambda list-functions \\\n  --query 'Functions[?Runtime==`python3.7` || Runtime==`nodejs14.x` || Runtime==`dotnetcore3.1`].[FunctionName,Runtime]' \\\n  --output table\n\n# Azure Functions: List all function apps\naz functionapp list \\\n  --query \"[].{Name:name, Runtime:siteConfig.linuxFxVersion, ResourceGroup:resourceGroup, HttpsOnly:httpsOnly}\" \\\n  -o table\n\n# GCP Cloud Functions: List all functions\ngcloud functions list \\\n  --format=\"table(name, runtime, status, httpsTrigger.url, serviceAccountEmail, vpcConnector)\"\n```\n\n### Step 2: Audit Execution Role Permissions\n\nReview IAM roles attached to functions for overly permissive policies.\n\n```bash\n# AWS: Check each Lambda function's execution role\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  role_arn=$(aws lambda get-function-configuration --function-name \"$func\" --query 'Role' --output text)\n  role_name=$(echo \"$role_arn\" | awk -F'\u002F' '{print $NF}')\n  echo \"=== $func -> $role_name ===\"\n\n  # List attached policies\n  aws iam list-attached-role-policies --role-name \"$role_name\" \\\n    --query 'AttachedPolicies[*].[PolicyName,PolicyArn]' --output table\n\n  # Check for wildcard actions\n  for policy_arn in $(aws iam list-attached-role-policies --role-name \"$role_name\" --query 'AttachedPolicies[*].PolicyArn' --output text); do\n    version=$(aws iam get-policy --policy-arn \"$policy_arn\" --query 'Policy.DefaultVersionId' --output text)\n    aws iam get-policy-version --policy-arn \"$policy_arn\" --version-id \"$version\" \\\n      --query 'PolicyVersion.Document' --output json | python3 -c \"\nimport json, sys\ndoc = json.load(sys.stdin)\nfor stmt in doc.get('Statement', []):\n    actions = stmt.get('Action', [])\n    if isinstance(actions, str): actions = [actions]\n    resources = stmt.get('Resource', [])\n    if isinstance(resources, str): resources = [resources]\n    if '*' in actions or any(a.endswith(':*') for a in actions):\n        print(f'  WARNING: {stmt[\\\"Effect\\\"]} {actions} on {resources}')\n\" 2>\u002Fdev\u002Fnull\n  done\ndone\n```\n\n### Step 3: Check Environment Variables for Secrets\n\nScan function environment variables for hardcoded credentials, API keys, and database connection strings.\n\n```bash\n# AWS Lambda: Extract environment variables\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  envvars=$(aws lambda get-function-configuration --function-name \"$func\" \\\n    --query 'Environment.Variables' --output json 2>\u002Fdev\u002Fnull)\n  if [ \"$envvars\" != \"null\" ] && [ -n \"$envvars\" ]; then\n    echo \"=== $func ===\"\n    echo \"$envvars\" | python3 -c \"\nimport json, sys, re\nvars = json.load(sys.stdin)\nsensitive_patterns = [\n    r'(?i)(password|secret|key|token|credential|api.?key)',\n    r'(?i)(aws.?access|aws.?secret)',\n    r'(?i)(database.?url|connection.?string|db.?pass)',\n    r'AKIA[0-9A-Z]{16}'\n]\nfor key, value in vars.items():\n    for pattern in sensitive_patterns:\n        if re.search(pattern, key) or re.search(pattern, str(value)):\n            masked = value[:4] + '****' + value[-4:] if len(value) > 8 else '****'\n            print(f'  SENSITIVE: {key} = {masked}')\n            break\n\"\n  fi\ndone\n\n# Azure Functions: Check app settings\nfor app in $(az functionapp list --query \"[].name\" -o tsv); do\n  rg=$(az functionapp show --name \"$app\" --query \"resourceGroup\" -o tsv)\n  echo \"=== $app ===\"\n  az functionapp config appsettings list \\\n    --name \"$app\" --resource-group \"$rg\" \\\n    --query \"[?contains(name,'KEY') || contains(name,'SECRET') || contains(name,'PASSWORD')].{Name:name}\" \\\n    -o table 2>\u002Fdev\u002Fnull\ndone\n```\n\n### Step 4: Review Function Triggers and Access Controls\n\nVerify that function triggers have appropriate authentication and authorization.\n\n```bash\n# AWS: Check for unauthenticated Lambda function URLs\naws lambda list-function-url-configs \\\n  --function-name FUNCTION_NAME \\\n  --query 'FunctionUrlConfigs[*].[FunctionUrl,AuthType,Cors]' --output table\n\n# Check for resource-based policies allowing public invocation\nfor func in $(aws lambda list-functions --query 'Functions[*].FunctionName' --output text); do\n  policy=$(aws lambda get-policy --function-name \"$func\" --query 'Policy' --output text 2>\u002Fdev\u002Fnull)\n  if [ -n \"$policy\" ]; then\n    echo \"$policy\" | python3 -c \"\nimport json, sys\ndoc = json.loads(sys.stdin.read())\nfor stmt in doc.get('Statement', []):\n    principal = stmt.get('Principal', {})\n    if principal == '*' or principal == {'AWS': '*'}:\n        print(f'WARNING: $func has public invoke policy: {stmt.get(\\\"Sid\\\", \\\"unnamed\\\")}')\" 2>\u002Fdev\u002Fnull\n  fi\ndone\n\n# GCP: Check for unauthenticated Cloud Functions\ngcloud functions list --format=json | python3 -c \"\nimport json, sys\nfunctions = json.load(sys.stdin)\nfor func in functions:\n    name = func.get('name', '').split('\u002F')[-1]\n    trigger = func.get('httpsTrigger', {})\n    if trigger and func.get('ingressSettings') == 'ALLOW_ALL':\n        print(f'WARNING: {name} allows all ingress traffic')\n\"\n```\n\n### Step 5: Analyze Function Code for Security Vulnerabilities\n\nReview function code for common serverless security issues.\n\n```bash\n# Download Lambda function code for review\naws lambda get-function --function-name FUNCTION_NAME \\\n  --query 'Code.Location' --output text | xargs curl -o function.zip\nunzip function.zip -d function-code\u002F\n\n# Scan with Bandit (Python) or ESLint security plugin (Node.js)\n# Python functions\npip install bandit\nbandit -r function-code\u002F -f json -o bandit-results.json\n\n# Node.js functions\nnpm install -g eslint @microsoft\u002Feslint-plugin-sdl\neslint --ext .js function-code\u002F\n\n# Check for common serverless vulnerabilities:\n# 1. SQL injection in database queries\n# 2. Command injection via os.system or subprocess\n# 3. Insecure deserialization\n# 4. Event data injection (untrusted event parameters)\n# 5. Excessive function permissions\ngrep -rn \"os.system\\|subprocess\\|eval(\\|exec(\" function-code\u002F || echo \"No obvious injection patterns\"\ngrep -rn \"pickle.loads\\|yaml.load\\b\" function-code\u002F || echo \"No deserialization risks\"\n```\n\n### Step 6: Run Automated Serverless Security Scanning\n\nExecute Checkov and Prowler for automated compliance checks on serverless resources.\n\n```bash\n# Checkov scan for serverless frameworks\ncheckov -d .\u002Fserverless-project\u002F \\\n  --framework serverless \\\n  --output json > checkov-serverless.json\n\n# Prowler Lambda-specific checks\nprowler aws \\\n  --checks lambda_function_no_secrets_in_variables \\\n           lambda_function_url_auth_type \\\n           lambda_function_using_supported_runtimes \\\n           lambda_function_not_publicly_accessible \\\n  -M json-ocsf \\\n  -o .\u002Fprowler-lambda\u002F\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Execution Role | IAM role assumed by a serverless function during execution that defines what AWS\u002Fcloud resources the function can access |\n| Event Injection | Serverless-specific attack where untrusted data in the event trigger payload is used unsafely in function logic |\n| Function URL | Direct HTTP(S) endpoint for invoking Lambda functions without API Gateway, which may be configured without authentication |\n| Cold Start | Initial function execution that includes container provisioning, during which security agents and extensions must initialize |\n| Resource-Based Policy | Policy attached to the function itself that defines who can invoke it, separate from the execution role |\n| Secrets Manager Integration | Pattern of retrieving sensitive configuration from a secrets management service rather than storing in environment variables |\n\n## Tools & Systems\n\n- **AWS Lambda**: Primary serverless compute platform with execution roles, layers, and resource policies\n- **Checkov**: Static analysis tool for infrastructure-as-code with serverless-specific security policies\n- **Prowler**: Cloud security tool with Lambda-specific checks for permissions, public access, and runtime versions\n- **Bandit**: Python static analysis tool for detecting security issues in function source code\n- **OWASP Serverless Top 10**: Security risk framework specific to serverless architectures\n\n## Common Scenarios\n\n### Scenario: Lambda Function with Admin Role Leaking Secrets via Environment Variables\n\n**Context**: A security review discovers a Lambda function with `AdministratorAccess` execution role and database credentials stored in plaintext environment variables visible in CloudWatch logs.\n\n**Approach**:\n1. Enumerate the function's execution role and discover `AdministratorAccess` managed policy\n2. Check environment variables and find `DB_PASSWORD`, `API_KEY`, and `STRIPE_SECRET_KEY` in plaintext\n3. Review CloudWatch logs and find credentials printed in debug log statements\n4. Create a scoped IAM policy granting only the specific DynamoDB and S3 actions needed\n5. Migrate secrets to AWS Secrets Manager and update function to retrieve at runtime\n6. Remove debug logging that outputs sensitive data\n7. Rotate all exposed credentials and enable Lambda function encryption with KMS\n\n**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.\n\n## Output Format\n\n```\nServerless Function Security Review\n=======================================\nAccount: 123456789012\nFunctions Reviewed: 34\nReview Date: 2026-02-23\n\nCRITICAL FINDINGS:\n[SRVL-001] Overly Permissive Execution Role\n  Function: payment-processor\n  Role: AdministratorAccess (full AWS access)\n  Required Permissions: DynamoDB:PutItem, S3:GetObject (2 actions)\n  Remediation: Create scoped policy with only required permissions\n\n[SRVL-002] Secrets in Environment Variables\n  Function: payment-processor\n  Variables: DB_PASSWORD, STRIPE_SECRET_KEY, API_KEY\n  Risk: Visible in console, API, and CloudWatch logs\n  Remediation: Migrate to Secrets Manager, remove from env vars\n\nSUMMARY:\n  Functions with admin roles:           3 \u002F 34\n  Functions with secrets in env vars:   8 \u002F 34\n  Functions with deprecated runtimes:   5 \u002F 34\n  Functions with public access:         2 \u002F 34\n  Functions without VPC:               28 \u002F 34\n  Functions with wildcard permissions: 12 \u002F 34\n```\n",{"name":5,"tags":24,"author":31,"domain":32,"license":14,"version":33,"nist_csf":34,"subdomain":25,"description":39,"mitre_attack":40},[25,26,27,28,29,30],"cloud-security","serverless","lambda","azure-functions","cloud-functions","security-review","mahipal","cybersecurity","1.0",[35,36,37,38],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","Performing security reviews of serverless functions across AWS Lambda, Azure Functions, and GCP Cloud Functions to identify overly permissive execution roles, insecure environment variables, injection vulnerabilities, and missing runtime protections.\n",[41,42,43,44,45],"T1078.004","T1530","T1537","T1580","T1055","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill performing-serverless-function-security-review",{"tool":58,"command":59},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill performing-serverless-function-security-review",{"tool":61,"command":62},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill performing-serverless-function-security-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review\u002FSKILL.md",true,[66,70,76],{"path":67,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fapi-reference.md","REFERENCE","参考文档",2793,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review\u002Freferences\u002Fapi-reference.md",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Fagent.py","SCRIPT","脚本",5343,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-serverless-function-security-review\u002Fscripts\u002Fagent.py",[83,91,98,105,112,119],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]