fix(output): pluralize vulnerability as vulnerabilities - #927
Merged
Conversation
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>
Contributor
Author
CI follow-upMerged 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 |
sonukapoor
approved these changes
Aug 5, 2026
sonukapoor
left a comment
Collaborator
There was a problem hiding this comment.
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!
Collaborator
|
Merged - thank you @felipeofdev-ai! |
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the scan-complete status line printing "vulnerabilitys" when findings.length !== 1.
pluralize(count, singular)defaults to${singular}s, sopluralize(n, "vulnerability")produced the typo. Pass the irregular plural explicitly (same pattern already used insrc/utils/create-pr.ts).Changes
src/output/printers.ts: pass"vulnerabilities"at both scan-complete call sitestests/pluralize.test.ts: regression coverage for irregular pluralFixes #905
Test plan
— Felipe Fernandes · Systems & Agentic AI Engineer
https://github.com/felipeofdev-ai · https://felipeofdev-ai.github.io/