Skip to content

fix(cve5): look for the word Apache, not the string, in the title - #308

Merged
raboof merged 1 commit into
apache:mainfrom
ppkarwasz:fix/title-apache-word
Nov 19, 2026
Merged

raboof merged 1 commit into
apache:mainfrom
ppkarwasz:fix/title-apache-word

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

The product names are prepended to the published CVE title and to the announcement email subject, unless the title already names the product.
That was decided by looking for the string Apache in the first 40 characters of the title,
so a title that mentions an identifier such as ApacheHttpClient.execute() was published without the product name.

Changes

  • New titleNamesProduct(title) in custom/cve5/script.js: true when Apache appears as a whole word (/\bApache\b/) anywhere in the title.
  • Used by textUtil.reduceJSON (publication and JSON download), the email subject in custom/cve5/edit.pug, and the title validator in custom/cve5/conf.js.
    The validator now warns exactly when the prefix would be skipped.
    It no longer compares the title with the first product name, so a title naming the product without the word "Apache" is not flagged.
  • customRoutes/publishcve.js exposes the helper as a global for the server-side publish.
  • public/js/vg-editor.js rebuilt with npm run bundle:editor.

Tests

unittest/test.js and unittest/validation.js cover a leading product name, Apache late in a long title, and Apache inside an identifier.
npm run unittest passes with VULNOGRAM_TLS_KEY=unittest/key.pem VULNOGRAM_TLS_CERT=unittest/cert.pem.

🤖 Generated with Claude Code

The product names are prepended to the published title and to the
announcement subject unless the title already names the product.
That was judged by the string "Apache" in the first 40 characters,
so a title mentioning an identifier such as ApacheHttpClient
was published without the product name.

Move the test into titleNamesProduct in custom/cve5/script.js,
which looks for "Apache" as a whole word anywhere in the title,
and use it for the title, the email subject and the title validator,
so the validator warns exactly when the prefix is skipped.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@raboof
raboof merged commit 2d800d2 into apache:main Nov 19, 2026
3 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.

2 participants