Skip to content

Commit fb05169

Browse files
fix: Use Task issue type for Jira, add vulnerability table to summary
- Changed issuetype from Bug to Task - Added vulnerability table to job summary page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cfd7844 commit fb05169

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/security-guard.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ jobs:
385385
}]
386386
}]
387387
},
388-
\"issuetype\": {\"name\": \"Bug\"},
388+
\"issuetype\": {\"name\": \"Task\"},
389389
\"priority\": {\"name\": \"$PRIORITY\"},
390390
\"labels\": [\"security\", \"automated\", \"unitoneflow\"]
391391
}
@@ -421,19 +421,41 @@ jobs:
421421
run: |
422422
echo "## 🔒 Security Guard Results" >> $GITHUB_STEP_SUMMARY
423423
echo "" >> $GITHUB_STEP_SUMMARY
424-
echo "### Scan Summary" >> $GITHUB_STEP_SUMMARY
425-
echo "- **Vulnerabilities Found:** ${{ steps.detect.outputs.count || '0' }}" >> $GITHUB_STEP_SUMMARY
426-
echo "" >> $GITHUB_STEP_SUMMARY
427424
425+
# Links section
428426
if [ "${{ steps.create_pr.outputs.pr_url }}" != "" ]; then
429427
echo "### 📝 Pull Request" >> $GITHUB_STEP_SUMMARY
430-
echo "**${{ steps.create_pr.outputs.pr_url }}**" >> $GITHUB_STEP_SUMMARY
428+
echo "${{ steps.create_pr.outputs.pr_url }}" >> $GITHUB_STEP_SUMMARY
431429
echo "" >> $GITHUB_STEP_SUMMARY
432430
fi
433431
434432
if [ "${{ steps.create_jira.outputs.jira_url }}" != "" ]; then
435433
echo "### 🎫 Jira Ticket" >> $GITHUB_STEP_SUMMARY
436-
echo "**${{ steps.create_jira.outputs.jira_url }}**" >> $GITHUB_STEP_SUMMARY
434+
echo "${{ steps.create_jira.outputs.jira_url }}" >> $GITHUB_STEP_SUMMARY
435+
echo "" >> $GITHUB_STEP_SUMMARY
436+
fi
437+
438+
echo "### 📊 Scan Summary" >> $GITHUB_STEP_SUMMARY
439+
echo "- **Vulnerabilities Found:** ${{ steps.detect.outputs.count || '0' }}" >> $GITHUB_STEP_SUMMARY
440+
echo "" >> $GITHUB_STEP_SUMMARY
441+
442+
# Vulnerability table
443+
if [ -f backend/security-report.json ]; then
444+
echo "### 🔍 Vulnerabilities Detected" >> $GITHUB_STEP_SUMMARY
445+
echo "" >> $GITHUB_STEP_SUMMARY
446+
echo "| Severity | Type | File | Line |" >> $GITHUB_STEP_SUMMARY
447+
echo "|----------|------|------|------|" >> $GITHUB_STEP_SUMMARY
448+
449+
python3 -c "
450+
import json
451+
report = json.loads(open('backend/security-report.json').read())
452+
for v in report.get('vulnerabilities', [])[:15]:
453+
sev = v.get('severity', 'unknown').upper()
454+
vtype = v.get('vulnerability_type', 'Unknown')
455+
fp = v.get('file_path', 'unknown')
456+
line = v.get('line_number', '?')
457+
print(f'| {sev} | {vtype} | \`{fp}\` | {line} |')
458+
" >> $GITHUB_STEP_SUMMARY
437459
echo "" >> $GITHUB_STEP_SUMMARY
438460
fi
439461

0 commit comments

Comments
 (0)