Skip to content

Commit e3f6fb8

Browse files
fix: Align CI security scanning with release pipeline to prevent release failures (#39)
This change ensures consistent security checking behavior between CI and release pipelines by making CI security scans fail on issues, matching the release pipeline's strict security requirements. Changes: - Remove JSON output mode from bandit scan to enable failure on issues - Remove '|| true' from safety check to enable failure on vulnerabilities - Add security-scan as required job dependency in notify job - Remove artifact archiving for security reports as scans now fail on issues This prevents code with security issues from passing CI but failing during release, improving developer experience and ensuring early issue detection. Fixes #21 Co-authored-by: florath-ai-assistant[bot] <Andreas.Florath@telekom.de>
1 parent c9149c2 commit e3f6fb8

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,11 @@ jobs:
121121
122122
- name: Run bandit security scan
123123
run: |
124-
bandit -r src/ -ll -f json -o bandit-report.json
125-
echo "Bandit scan completed. Check bandit-report.json for details."
124+
bandit -r src/ -ll
126125
127126
- name: Run safety check
128127
run: |
129-
safety check --json --output safety-report.json || true
130-
131-
- name: Archive security reports
132-
uses: actions/upload-artifact@v4
133-
with:
134-
name: security-reports
135-
path: |
136-
bandit-report.json
137-
safety-report.json
128+
safety check
138129
139130
build:
140131
name: Build Package
@@ -451,16 +442,16 @@ jobs:
451442
name: Notify
452443
runs-on: ubuntu-latest
453444
if: always()
454-
needs: [lint-and-type-check, test, build, integration-tests, cross-platform-integration]
445+
needs: [lint-and-type-check, test, security-scan, build, integration-tests, cross-platform-integration]
455446

456447
steps:
457448
- name: Notify on success
458-
if: ${{ needs.lint-and-type-check.result == 'success' && needs.test.result == 'success' && needs.build.result == 'success' && needs.cross-platform-integration.result == 'success' }}
449+
if: ${{ needs.lint-and-type-check.result == 'success' && needs.test.result == 'success' && needs.security-scan.result == 'success' && needs.build.result == 'success' && needs.cross-platform-integration.result == 'success' }}
459450
run: |
460451
echo "✅ All checks passed!"
461452
462453
- name: Notify on failure
463-
if: ${{ needs.lint-and-type-check.result == 'failure' || needs.test.result == 'failure' || needs.build.result == 'failure' || needs.cross-platform-integration.result == 'failure' }}
454+
if: ${{ needs.lint-and-type-check.result == 'failure' || needs.test.result == 'failure' || needs.security-scan.result == 'failure' || needs.build.result == 'failure' || needs.cross-platform-integration.result == 'failure' }}
464455
run: |
465456
echo "❌ Some checks failed!"
466457
exit 1

0 commit comments

Comments
 (0)