Skip to content

fix: scan-complete line prints vulnerabilities correctly - #939

Closed
RohithPariki wants to merge 1 commit into
OWASP:mainfrom
RohithPariki:fix-905
Closed

fix: scan-complete line prints vulnerabilities correctly #939
RohithPariki wants to merge 1 commit into
OWASP:mainfrom
RohithPariki:fix-905

Conversation

@RohithPariki

Copy link
Copy Markdown

Summary

Fixes a spelling error where the CLI output printed "vulnerabilitys" instead of "vulnerabilities" when completing a scan.

Problem

In the final scan summary printed to the terminal, if multiple vulnerabilities were found, the CLI would naively append an "s" resulting in the grammatically incorrect output: Found N vulnerabilitys. (Issue #905).

Root Cause

The pluralize function in src/output/printers.ts was being called as pluralize(count, "vulnerability"), which defaults to just appending an "s". It did not use the optional third argument for irregular plurals.

Solution

Updated the pluralize call to explicitly pass "vulnerabilities" as the irregular plural form: pluralize(count, "vulnerability", "vulnerabilities"). Also added a regression test to ensure this edge case remains covered.

Testing & Verification

  • Unit test added in tests/output.test.ts to assert that pluralize correctly returns "vulnerabilities" when count > 1 and "vulnerability" when count === 1.
  • Verified that running npm test passes successfully.

References

Closes #905

@sonukapoor

Copy link
Copy Markdown
Collaborator

Thanks for this, @RohithPariki - it is a real bug, good catch. It actually got fixed in main earlier today via #927, so this one is already covered. Closing as resolved, but genuinely appreciate you spotting it.

@sonukapoor sonukapoor closed this Aug 5, 2026
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.

fix: scan-complete line prints "vulnerabilitys" instead of "vulnerabilities"

2 participants