also looking at this
Gate releases on shipped artifact findings
#316
11 files
+454
-25
| @@ -58,7 +58,7 @@ if (import.meta.main) { | ||
| 58 | 58 | const setting = process.env.CRAFT_FAIL_HIGH ?? 'false' |
| 59 | 59 | if (!['true', 'false'].includes(setting)) throw new Error('CRAFT_FAIL_HIGH must be true or false') |
| 60 | 60 | const { counts } = scanSbom(process.argv[2] || 'sbom/full-sbom.cyclonedx.json', process.argv[3] || 'scan-results') |
| 61 | const summary = ['## Vulnerability scan results', '', '| Severity | Count |', '| --- | --- |', ...severities.map(severity => `| ${severity} | ${counts[severity]} |`), '', 'Policy: Critical findings fail every scan. High findings fail release scans; they remain review items on main (#279).', ''].join('\n') | |
| 61 | const summary = ['## Vulnerability scan results', '', '| Severity | Count |', '| --- | --- |', ...severities.map(severity => `| ${severity} | ${counts[severity]} |`), '', 'Policy: Critical findings fail every scan. High findings in this full-source scan remain review items; release artifacts and production dependencies have a separate High gate (#279).', ''].join('\n') | |
| 62 | 62 | console.log(summary) |
| 63 | 63 | if (process.env.GITHUB_STEP_SUMMARY) appendFileSync(process.env.GITHUB_STEP_SUMMARY, summary) |
| 64 | 64 | if (counts.High > 0 && setting === 'false') console.warn('::warning::High vulnerability findings require review under #279') |