Skip to content

Commit 635e1f2

Browse files
authored
Merge pull request #3 from davidapp/feat/add_ai_audit
feat(ci): fail on critical vulnerabilities
2 parents 9c04214 + a02b9ab commit 635e1f2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ai-security-audit.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ jobs:
145145
# Post new comment
146146
gh pr comment "$PR_NUMBER" --body-file comment_body.md
147147
148+
- name: Fail if critical issues found
149+
if: steps.check.outputs.skip != 'true'
150+
run: |
151+
if grep -qi '\[CRITICAL\]' audit_result.md; then
152+
CRITICAL_COUNT=$(grep -ci '\[CRITICAL\]' audit_result.md)
153+
echo "::error::AI security audit found ${CRITICAL_COUNT} CRITICAL issue(s). Please fix them before merging."
154+
exit 1
155+
fi
156+
148157
- name: Post skip comment
149158
if: steps.check.outputs.skip == 'true'
150159
env:

0 commit comments

Comments
 (0)