Skip to content

Commit

Permalink
SC-3121:Create customRule.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Revanthathreya authored Jul 22, 2024
1 parent 30d6acc commit 4a9f9a2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .semgreprules/customRule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
rules:
- id: check-sensitive-info
message: >-
Potential sensitive information found: $1
severity: ERROR
languages:
- yaml
- go
- javascript
- java
- python
- golang
- docker
patterns:
- pattern-regex: (?i)\b(api[_-]key|api[_-]token|api[_-]secret[_-]key|api[_-]password|token|secret[_-]key|password|auth[_-]key|auth[_-]token|AUTH_PASSWORD)\s*[:=]\s*(['"]?)((?!YOUR_EXCLUSION_PATTERN_HERE)[A-Z]+.*?)\2

- id: check-logger-appconfig
message: >-
Potential Logging configuration found: $1
severity: ERROR
languages:
- yaml
- go
- javascript
- java
- python
- golang
- docker
patterns:
- pattern-regex: log\.Logger\(\).*(appConfig).*

0 comments on commit 4a9f9a2

Please sign in to comment.