Skip to content

fix(report): move fix version column next to current version in HTML findings table (#388)#392

Merged
sonukapoor merged 1 commit into
OWASP:mainfrom
coder-Yash886:fix-html-column-order
May 22, 2026
Merged

fix(report): move fix version column next to current version in HTML findings table (#388)#392
sonukapoor merged 1 commit into
OWASP:mainfrom
coder-Yash886:fix-html-column-order

Conversation

@coder-Yash886
Copy link
Copy Markdown
Contributor

Screenshot From 2026-05-22 23-59-19 Screenshot From 2026-05-22 23-59-19 This PR moves the Fix version column (labeled as Fix available in the HTML report) immediately next to the Current version (rendered within the Package column) inside the findings table of the HTML report (--report).

Previously, these two columns were far apart, making it difficult for users to quickly compare the before/after version changes at a glance.

Proposed Column Order 🛠️
| Package | Fix available | Severity | Type | CVE / Advisory | (Previously, Fix available was located at the end of the table).

Key Changes & Approach 💻
HTML Structure Update (src/output/html-reporter.ts):

Shifted the Fix available header inside to be right next to the Package header.
Reordered the cells inside renderFindingRow() to align with the new header sequence, rendering ${fixHtml} immediately after the Package/Version cell.
Ensured that ⚠ Malicious and ⚠ No fix badges continue to render correctly inside the reordered cell.
Sorting Logic Sync (src/output/html-reporter.ts):

Since the column indices changed, the sorting indicator class updates inside the sortBy() JavaScript function were out of sync.
Updated the colIndex lookup array mapping to align with the new column layout:
javascript

const colIndex = ['', 'package', '', 'severity', 'relationship'].indexOf(col);
This fixes the sorting headers highlights and arrows, making sure that clicking headers correctly targets the active sorted column.

@coder-Yash886
Copy link
Copy Markdown
Contributor Author

@sonukapoor please review the pr

@sonukapoor
Copy link
Copy Markdown
Collaborator

Thanks for picking this up — the column reorder and the colIndex fix look correct.

Two things to address before we can merge:

  1. Remove cve-lite-scan-2026-05-22T17-18-06.json — this is a local scan output file that got accidentally included. Please remove it from the branch and amend the commit.

  2. Rebase on main — the branch is behind main. Please run git fetch origin && git rebase origin/main and force-push.

Once those are done this is good to go.

@coder-Yash886 coder-Yash886 force-pushed the fix-html-column-order branch from 33b210e to ef538eb Compare May 22, 2026 18:46
@coder-Yash886
Copy link
Copy Markdown
Contributor Author

coder-Yash886 commented May 22, 2026

@sonukapoor Done! Rebased and amended the commit. when you have free time please review it.

@sonukapoor
Copy link
Copy Markdown
Collaborator

Clean — JSON file removed, tests passing. Merging. Thanks for the contribution!

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