mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
45 lines (44 loc) • 1.37 kB
YAML
rules:
- id: aws-iam-admin-policy-ssoadmin
patterns:
- pattern-inside: |
resource "aws_ssoadmin_permission_set_inline_policy" $ANYTHING {
...
}
- pattern: inline_policy = "$STATEMENT"
- metavariable-pattern:
metavariable: $STATEMENT
language: json
patterns:
- pattern-not-inside: |
{..., "Effect": "Deny", ...}
- pattern-either:
- pattern: |
{..., "Action": [..., "*", ...], "Resource": [..., "*", ...], ...}
- pattern: |
{..., "Action": "*", "Resource": "*", ...}
- pattern: |
{..., "Action": "*", "Resource": [...], ...}
- pattern: |
{..., "Action": [...], "Resource": "*", ...}
message: >-
Detected admin access granted in your policy. This means anyone with this policy can perform administrative
actions. Instead, limit actions and resources to what you need according to least privilege.
metadata:
category: security
technology:
- aws
owasp:
- A05:2021 - Security Misconfiguration
cwe:
- 'CWE-732: Incorrect Permission Assignment for Critical Resource'
references:
- https://cwe.mitre.org/data/definitions/732.html
cwe2021-top25: true
subcategory:
- vuln
likelihood: MEDIUM
impact: MEDIUM
confidence: MEDIUM
languages: [hcl]
severity: ERROR