Skip to content

feat(report): add risk and next-action guidance#602

Open
omobolajiadeyan wants to merge 1 commit into
OWASP:mainfrom
omobolajiadeyan:feature/issue-233-html-risk-guidance
Open

feat(report): add risk and next-action guidance#602
omobolajiadeyan wants to merge 1 commit into
OWASP:mainfrom
omobolajiadeyan:feature/issue-233-html-risk-guidance

Conversation

@omobolajiadeyan

Copy link
Copy Markdown

Summary

  • reuse the existing terminal summarizeRisk() and summarizeNextAction() logic in HTML reports
  • show escaped Risk summary and Next action fields in expanded finding details
  • support both single-project and multi-folder HTML reports
  • keep normal JSON serialization backward compatible
  • document the new HTML report fields

Tests

  • npm test -- --runInBand (30 suites passed; 440 passed, 1 skipped)
  • npm run build
  • npm audit --omit=dev (0 vulnerabilities)

Coverage includes direct, transitive, and malicious-package guidance plus HTML escaping and JSON-contract protection.

Closes #233

AI assistance disclosure

OpenAI Codex assisted with implementation, tests, and documentation. I reviewed the changes and verified the full Jest suite, TypeScript build, and runtime dependency audit. I remain responsible for the contribution.

<h4>Description</h4>
<p>${escapeHtml(description)}</p>
<h4 class="detail-subheading">Risk summary</h4>
<p>${escapeHtml(finding.riskSummary)}</p>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move Risk Summary and Next Action into the third column (Recommended Action), not the first. Description tells the reader what is wrong - Risk Summary and Next Action tell them what to do about it, which belongs alongside the fix command. Column 3 should read: fix command, then Risk Summary, then Next Action.

Same change applies to multi-folder-html-reporter.ts if you added it there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add risk summary and next action text to HTML report finding detail

2 participants