Skip to content

fix(output): pluralize vulnerability as vulnerabilities - #927

Merged
sonukapoor merged 4 commits into
OWASP:mainfrom
felipeofdev-ai:fix/vulnerability-plural
Aug 5, 2026
Merged

fix(output): pluralize vulnerability as vulnerabilities#927
sonukapoor merged 4 commits into
OWASP:mainfrom
felipeofdev-ai:fix/vulnerability-plural

Conversation

@felipeofdev-ai

Copy link
Copy Markdown
Contributor

Summary

Fixes the scan-complete status line printing "vulnerabilitys" when findings.length !== 1.

pluralize(count, singular) defaults to ${singular}s, so pluralize(n, "vulnerability") produced the typo. Pass the irregular plural explicitly (same pattern already used in src/utils/create-pr.ts).

Changes

  • src/output/printers.ts: pass "vulnerabilities" at both scan-complete call sites
  • tests/pluralize.test.ts: regression coverage for irregular plural

Fixes #905

Test plan

  • Unit test for pluralize irregular form
  • Spot-check scan-complete output with 2+ findings

— Felipe Fernandes · Systems & Agentic AI Engineer
https://github.com/felipeofdev-ai · https://felipeofdev-ai.github.io/

Scan-complete status used pluralize(n, vulnerability) which defaults
to vulnerabilitys. Pass the irregular plural explicitly, matching
create-pr.ts, and add a regression test.

Fixes OWASP#905

Signed-off-by: Felipe Fernandes <felipe.of.dev@gmail.com>
CI runs Jest. Coverage for irregular plurals already lives in
tests/string.test.ts; extend it and remove the accidental Vitest file.

Signed-off-by: Felipe Fernandes <felipe.of.dev@gmail.com>
@felipeofdev-ai

Copy link
Copy Markdown
Contributor Author

CI follow-up

Merged upstream main (includes jest 30.4.2 / brace-expansion bump from #929). Local self-scan now reports no known vulnerabilities.

— Felipe Fernandes · Systems & Agentic AI Engineer
https://github.com/felipeofdev-ai · https://felipeofdev-ai.github.io/

@sonukapoor sonukapoor left a comment

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.

Nice catch @felipeofdev-ai. This fixes a real typo in every scan's status line, and it matches the explicit-plural pattern we already use in create-pr.ts. Merging, thanks!

@sonukapoor

Copy link
Copy Markdown
Collaborator

Merged - thank you @felipeofdev-ai!

@sonukapoor
sonukapoor merged commit 6eccc8a into OWASP:main Aug 5, 2026
6 checks passed
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