-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BLAZ-886] Added semgrep rules for aws data
- Loading branch information
1 parent
3b08a81
commit ead4568
Showing
13 changed files
with
87 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/returntocorp/semgrep | ||
rev: 'v1.14.0' | ||
rev: 'v1.89.0' | ||
hooks: | ||
- id: semgrep | ||
exclude: "(.)*/tests|tests" | ||
args: [ | ||
'--metrics=off', | ||
'--config', | ||
'p/owasp-top-ten', | ||
'--config', | ||
'p/cwe-top-25', | ||
'--config', | ||
'p/gitleaks', | ||
'--config', | ||
'r/generic.secrets.security.detected-aws-account-id.detected-aws-account-id', | ||
'--config', | ||
'.semgrep/rules/detected-aws-account-id-in-arn.yaml', | ||
'--config', | ||
'r/generic.secrets.security.detected-aws-secret-access-key.detected-aws-secret-access-key', | ||
'--error', | ||
'--skip-unknown-extensions', | ||
'--exclude-rule=python.sqlalchemy.security.audit.avoid-sqlalchemy-text.avoid-sqlalchemy-text' | ||
] | ||
stages: [commit] | ||
stages: [pre-commit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
rules: | ||
- id: detected-aws-account-id-in-arn | ||
patterns: | ||
- pattern-regex: ((?i:aws|arn)[^\d]+\d{12}[^\d]+) | ||
- pattern-not-regex: 12345|00000 | ||
languages: | ||
- regex | ||
message: AWS Account ID detected in arn. | ||
severity: ERROR | ||
metadata: | ||
cwe: | ||
- "CWE-798: Use of Hard-coded Credentials" | ||
source-rule-url: https://github.com/grab/secret-scanner/blob/master/scanner/signatures/pattern.go | ||
category: security | ||
technology: | ||
- secrets | ||
- aws | ||
confidence: LOW | ||
owasp: | ||
- A07:2021 - Identification and Authentication Failures | ||
references: | ||
- https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures | ||
cwe2022-top25: true | ||
cwe2021-top25: true | ||
subcategory: | ||
- audit | ||
likelihood: LOW | ||
impact: HIGH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters