mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-24 06:09:55 +02:00
fix(workflow):
This commit is contained in:
@@ -52,22 +52,8 @@ jobs:
|
||||
print(results)
|
||||
max_failure_rate = max(value["failure_rate"] for value in results.values())
|
||||
|
||||
exit(max_failure_rate > 20)
|
||||
# exit(max_failure_rate > 20)
|
||||
|
||||
EOF
|
||||
|
||||
python scan.py
|
||||
|
||||
- name: Create Issue on Failure
|
||||
if: failure()
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const maxRate = Number(process.env.max_failure_rate || 0);
|
||||
await github.rest.issues.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.name,
|
||||
title: '🚨 Security Scan Failed',
|
||||
body: `Security scan detected high failure rates (${maxRate}% > 20%).\n\nPlease check the [workflow run](${context.serverUrl}/${context.repo.owner}/${context.repo.name}/actions/runs/${context.runId}) for details.`,
|
||||
labels: ['security', 'automated']
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user