Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix vulnerability table duplication across manifests in comment summary#953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
alecbuchanan wants to merge1 commit intoactions:main
base:main
Choose a base branch
Loading
fromalecbuchanan:fix/vulnerability-table-duplication

Conversation

@alecbuchanan
Copy link

Move vulnerability table row array initialization inside manifest loop to prevent cross-contamination of vulnerability data between different manifest files (package.json, requirements.txt, etc).

Previously, when multiple manifests contained vulnerabilities, the same rows array was being reused across all manifests, causing vulnerabilities to appear duplicated in subsequent manifest tables. This was due to the rows array being declared once outside the manifest iteration loop.

The fix ensures each manifest gets its own clean array by moving theconst rows: SummaryTableRow[] = [] declaration inside the for loop that iterates over manifests.

Added comprehensive test coverage:

  • Separate table creation for different manifests
  • Vulnerability deduplication across manifest tables
  • Multiple vulnerabilities per package in different manifests
  • Correct vulnerability grouping within manifests

All existing tests continue to pass, confirming no regression in functionality.

Move vulnerability table row array initialization inside manifest loopto prevent cross-contamination of vulnerability data between differentmanifest files (package.json, requirements.txt, etc).Previously, when multiple manifests contained vulnerabilities, the samerows array was being reused across all manifests, causing vulnerabilitiesto appear duplicated in subsequent manifest tables. This was due to therows array being declared once outside the manifest iteration loop.The fix ensures each manifest gets its own clean array by moving the`const rows: SummaryTableRow[] = []` declaration inside the for loopthat iterates over manifests.Added comprehensive test coverage:- Separate table creation for different manifests- Vulnerability deduplication across manifest tables- Multiple vulnerabilities per package in different manifests- Correct vulnerability grouping within manifestsAll existing tests continue to pass, confirming no regression infunctionality.
CopilotAI review requested due to automatic review settingsJuly 29, 2025 16:08
@alecbuchananalecbuchanan requested a review froma team as acode ownerJuly 29, 2025 16:08
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where vulnerability table rows were being duplicated across different manifest files due to shared array reference. The fix moves the rows array initialization inside the manifest loop to ensure each manifest gets its own clean array.

  • Movesrows array declaration inside the manifest iteration loop
  • Adds comprehensive test coverage for multi-manifest vulnerability scenarios
  • Ensures proper isolation of vulnerability data between manifests

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

FileDescription
src/summary.tsMoves rows array initialization inside manifest loop to prevent cross-contamination
tests/summary.test.tsAdds comprehensive test coverage for multi-manifest vulnerability scenarios

@alecbuchanan
Copy link
Author

alecbuchanan commentedJul 29, 2025
edited
Loading

@alecbuchananalecbuchanan changed the titleFix vulnerability table duplication across manifestsFix vulnerability table duplication across manifests in comment summaryJul 30, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@alecbuchanan

[8]ページ先頭

©2009-2025 Movatter.jp