mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
38 lines (37 loc) • 1.08 kB
YAML
rules:
- id: aws-provider-static-credentials
patterns:
- pattern-inside: |
provider "aws" {
...
secret_key = "$SECRET"
}
- focus-metavariable: $SECRET
message: >-
A hard-coded credential was detected. It is not recommended to store credentials in source-code,
as this risks secrets
being leaked and used by either an internal or external malicious adversary. It is recommended to
use environment variables to securely provide credentials or retrieve credentials from a secure
vault or HSM (Hardware Security Module).
languages:
- hcl
severity: WARNING
metadata:
technology:
- secrets
- aws
- terraform
category: security
cwe:
- 'CWE-798: Use of Hard-coded Credentials'
references:
- https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html
owasp:
- A07:2021 - Identification and Authentication Failures
cwe2022-top25: true
cwe2021-top25: true
subcategory:
- vuln
likelihood: MEDIUM
impact: MEDIUM
confidence: MEDIUM