mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
36 lines (35 loc) • 961 B
YAML
rules:
- id: secure-parameter-for-secrets
patterns:
- pattern: param $NAME string
- pattern-not-inside: |
@secure()
param $NAME string
- metavariable-regex:
metavariable: $NAME
regex: (?i).*(password|secret|token)
message: >-
Mark sensitive parameters with the @secure() decorator.
This avoids logging the value or displaying it in the Azure portal, Azure CLI, or Azure PowerShell.
metadata:
category: security
technology:
- bicep
cwe:
- 'CWE-532: Insertion of Sensitive Information into Log File'
references:
- https://cwe.mitre.org/data/definitions/532.html
- https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/scenarios-secrets
owasp:
- A09:2021 - Security Logging and Monitoring Failures
subcategory:
- audit
likelihood: LOW
impact: LOW
confidence: LOW
languages:
- generic
paths:
include:
- '*.bicep'
severity: WARNING