Skip to content

Commit c5ebb32

Browse files
committed
changes
1 parent 4721c5e commit c5ebb32

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
repository: ${{ steps.json.outputs.source_repo }}
4545
ref: ${{ steps.json.outputs.sha }}
46-
- run: semgrep ci
46+
- run: semgrep ci --config .github/workflows/semgrep_rules.yaml
4747
env:
4848
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN2 }}
4949
update-status:

.github/workflows/semgrep_rules.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
rules:
2+
- id: detect-os-system-calls
3+
pattern: os.system(...)
4+
message: "Unsafe use of os.system(). Consider using subprocess.run() instead."
5+
languages: [python]
6+
severity: WARNING
7+
8+
- id: detect-sql-injection
9+
pattern: 'execute("SELECT * FROM " + $TABLE)'
10+
message: "Potential SQL injection detected. Use parameterized queries."
11+
languages: [python]
12+
severity: ERROR
13+
14+
- id: detect-eval-usage
15+
pattern: eval(...)
16+
message: "Use of eval() detected. This can be dangerous if used with untrusted input."
17+
languages: [python]
18+
severity: ERROR

0 commit comments

Comments
 (0)