Skip to content

Add show-fixes-in-summary to surface vulnerabilities resolved by a PR#1103

Draft
felickz wants to merge 1 commit into
actions:mainfrom
forks-felickz:main
Draft

Add show-fixes-in-summary to surface vulnerabilities resolved by a PR#1103
felickz wants to merge 1 commit into
actions:mainfrom
forks-felickz:main

Conversation

@felickz
Copy link
Copy Markdown
Contributor

@felickz felickz commented May 13, 2026

This pull request introduces a new feature that allows the summary to highlight vulnerabilities fixed by the pull request, in addition to the existing reporting of new issues. It adds a new configuration option, updates documentation and input schemas, and implements logic and tests to support a new "🎉 Issues Fixed" section in the summary output.

The dependency review action only surfaces introduced vulnerabilities — when a PR removes a vulnerable dependency, that positive signal is invisible. This adds an opt-in show-fixes-in-summary input (default false) that restructures the summary into three sections when fixes are detected:

Before:

# Dependency Review

The following issues were found:

❌ 1 vulnerable package(s)
✅ 0 package(s) with incompatible licenses
✅ 0 package(s) with invalid SPDX license definitions
⚠️ 2 package(s) with unknown licenses.

After:

# Dependency Review

❌ Action Needed
• 1 vulnerable package(s)

🎉 Issues Fixed
• Fixed: Insecure Temporary File in some-package@1.0.0 (high severity)
• Fixed: CVE-2022-XXXX in other-package@2.0.0 (critical severity)

✅ Checks Passed
• No incompatible licenses
• No invalid SPDX license definitions

New Feature: "Issues Fixed" Summary Section

  • Added a new configuration option show-fixes-in-summary (exposed in action.yml, README.md, and config schema) that, when set to true, includes a section in the summary showing vulnerabilities resolved by the PR. [1] [2] [3]

Configuration and Data Flow Updates

  • Updated config parsing and default values to support the new show_fixes_in_summary option, ensuring it is read from inputs and included in the configuration object. [1] [2] [3]

Summary Rendering Enhancements

  • Modified the summary generation logic (addSummaryToSummary in src/summary.ts) to render a three-section layout ("Action Needed", "Issues Fixed", "Checks Passed") when fixes are present and the feature is enabled, or fall back to the old layout otherwise. Added helper functions for building each section. [1] [2] [3] [4]

  • Implemented addFixedVulnerabilitiesToSummary to render a detailed table of fixed vulnerabilities, grouped by manifest, when the feature is enabled. [1] [2]

Main Workflow and Test Coverage

  • Updated the main workflow to identify and pass fixed vulnerabilities to the summary logic based on the new configuration. [1] [2]

  • Added comprehensive tests to verify that the summary displays the correct sections and details depending on the configuration and presence of fixed vulnerabilities.

…PR (#10)

* Initial plan

* Add show-fixes-in-summary feature to display fixed vulnerabilities in PR summary

Agent-Logs-Url: https://github.com/forks-felickz/dependency-review-action/sessions/d4753d81-a434-4948-8f3d-48fd04a79bf9

Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>

* fix: gate hasIssues on enabled checks and document show-fixes-in-summary

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
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.

2 participants