Skip to content

Commit 42750af

Browse files
authored
Merge pull request #1 from bellyliu/main
Fix Upload Bandit SARIF at security scan action
2 parents 8496f01 + 245fced commit 42750af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ jobs:
297297
uses: github/codeql-action/upload-sarif@v4
298298
if: always()
299299
with:
300-
sarif_file: bandit-results.json
300+
sarif_file: bandit-results.sarif
301301
continue-on-error: true
302302

303303
# ===========================================================================

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ ci-build: clean
409409
## CI: Security scan
410410
ci-security:
411411
@echo "$(GREEN)Running security scan (CI mode)...$(NC)"
412-
@$(PIP) install bandit safety 2>/dev/null || true
413-
@bandit -r $(SRC_DIR)/ -f json -o bandit-results.json -ll || true
412+
@$(PIP) install bandit bandit-sarif-formatter safety 2>/dev/null || true
413+
@bandit -r $(SRC_DIR)/ --format sarif --output bandit-results.sarif -ll || true
414414
@safety check --json > safety-results.json 2>/dev/null || true
415415
@echo "$(GREEN)Security scan complete$(NC)"
416416

0 commit comments

Comments
 (0)