Skip to content

Commit da999d3

Browse files
authored
Merge pull request #1 from bellyliu/main
fix: Update bandit output format to SARIF and install necessary formatter
2 parents 50f640f + 6210742 commit da999d3

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
@@ -271,7 +271,7 @@ jobs:
271271
uses: github/codeql-action/upload-sarif@v4
272272
if: always()
273273
with:
274-
sarif_file: bandit-results.json
274+
sarif_file: bandit-results.sarif
275275
continue-on-error: true
276276

277277
# ===========================================================================

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ ci-build: clean ## Build package for CI
273273
.PHONY: ci-security
274274
ci-security: ## Run security scan for CI
275275
@echo "Running security scan (CI mode)..."
276-
@$(PIP) install bandit safety 2>/dev/null || true
277-
@bandit -r $(SRC_DIR)/ -f json -o bandit-results.json -ll || true
276+
@$(PIP) install bandit bandit-sarif-formatter safety 2>/dev/null || true
277+
@bandit -r $(SRC_DIR)/ --format sarif --output bandit-results.sarif -ll || true
278278
@safety check --json > safety-results.json 2>/dev/null || true
279279
@echo "Security scan complete"
280280

0 commit comments

Comments
 (0)