audit_lambda_resource_policies
Scan Lambda resource policies for overly broad invoke access. Flags wildcard or service principals lacking source conditions as risk findings.
Instructions
Audit Lambda function resource policies for overly broad invoke access.
Scans every Lambda function in the region (AWS_REGION or us-east-1 when the region argument is omitted) and inspects its resource policy, if any. An Allow statement with a wildcard principal ("" or {"AWS": ""}) and no SourceArn/SourceAccount condition is HIGH: anyone can invoke the function. A service principal (for example s3.amazonaws.com) without any source condition is MEDIUM: any account's use of that service can invoke it. Service principals scoped by a SourceArn or SourceAccount condition are normal and are not flagged.
Returns a dict {check, ok, findings, scanned} where ok is true only when no findings were produced, findings is a list of normalized finding dicts (detail includes the statement sid, the principal and whether a condition exists), and scanned is the number of functions examined.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No |