davsclaus opened a new pull request, #1890:
URL: https://github.com/apache/camel-website/pull/1890
Fixes #1877
## Analysis
`/security/` rendered all 137 advisories (109 from 2026) in one table, and
the affected and fixed versions existed only as free text in several formats.
The ticket proposed adding structured fields to the advisory front matter. That
doesn't work for published advisories: each `CVE-*.md` is signed byte for byte
as `CVE-*.txt.asc` (see 9c307c8f and 057aa1be, where front matter edits were
re-signed), so adding a field would make the page differ from its signed text.
## What changed
- **Structured data:** this lives in **`data/security-advisories.yaml`**,
keyed by CVE. Each entry has the project, the components, the affected ranges
(`{from, before}` exclusive, `{from, to}` inclusive) and the fixed versions. A
new advisory can carry the same fields (`project`, `components`,
`affected_ranges`, `fixed_versions`) in its front matter before it is signed,
and those take precedence.
- **`scripts/security-advisory-data.js`** parses the free text and adds
entries for new advisories. It never rewrites existing entries, and `--check`
fails if an advisory has no data. The migration parsed all 137 advisories, with
these exceptions:
- CVE-2026-47323 lists the empty range "from 4.19.0 before 4.19.0"; it was
dropped. The 4.14.x and 4.18.x ranges remain.
- CVE-2018-8041's front matter says "2.21.0 up to 2.21.1" was fixed in
2.21.1. Its mitigation and cve.org say 2.21.2, and the data uses 2.21.2.
- The components of the advisories whose summary has no `Camel-Xxx:`
prefix were set by hand, using the artifact at the time (for example camel-core
for 2.x XSLT/file). CVE-2020-11994 ("templating components") has no components,
because the advisory doesn't name them.
- **Filters on `/security/`:** project, your version, component (with
suggestions), severity and free text. The values are kept in the query string,
for example `/security/?version=4.18.4`.
- The version filter evaluates the ranges. If no project is chosen, it
uses Apache Camel.
- For Apache Camel, the status line also points to the newer patch release
on your line, or says that the line no longer receives fixes.
- The page works without JavaScript: the filters then stay hidden.
- **Per-year `<details>`:** only the newest year with advisories starts
open. While a filter is active, years with matches open and the other years
hide.
- **Context header:** the advisories section now has a short intro, plus a
list of the supported Camel releases.
- That list is computed from the release notes' `kind`/`eol` and currently
reads 4.23.0 latest, 4.22.3 LTS and 4.18.5 LTS. It links to `/download/`.
- The intro also links the batch announcement posts
(`camel-security-advisories-*`) and the Security blog category.
- The Security Model and reporting cards already existed above it.
- **"Security fixes in this release" on release notes:** advisories are
matched on release category plus fixed version. The index is built once with
`partialCached`. The counts match the blog posts:
| Release | Fixes listed |
|---|---|
| 4.21.0 | 32 |
| 4.18.3 | 34 |
| 4.14.8 | 27 |
| 4.22.1 | 39 (the 38 from the batch plus CVE-2026-88900) |
Camel K and Camel Quarkus releases are covered too. Karavan has no release
notes.
- **CSS:** styles were added to the page-scoped `security.css`, and a small
rule to `release.css`. The UI bundle was regenerated.
## How verified
- `yarn test`: 30/30 pass, including a new
`test/security-advisories-test.js`. It checks that:
- every advisory has data and every data entry has an advisory;
- versions are well formed;
- no fixed version falls inside an affected range;
- the parser handles every phrasing in use.
- I built Hugo from `origin/main` and from this branch with the same UI
bundle and diffed the output.
- Only `/security/`, the 60 release notes that list fixes, and the new JS
file differ.
- The advisory pages and all `.txt.asc` files are byte-identical.
- `.well-known/security.txt` differs only in its time-based `Expires`.
- In headless Chrome:
- `?version=4.18.4` gives 46. 4.18.5 gives 1, CVE-2026-66908, which
publishes no 4.18.x fix.
- `?project=camel-k&version=2.9.2` gives 3, and
`?version=2.21.1&component=mail` gives 2.
- A partial version such as `4.18` asks for a full version.
- I took screenshots at 1440 and 626 px.
- html-validate on the changed pages adds no findings in the rules CI
enables.
- `gulp lint` passes.
## Follow-up
- Release notes could also link the advisories from the per-release blog
posts.
- The component data is only as good as the advisory text. A reviewer from
the security team may want to skim the hand-set components in
`data/security-advisories.yaml`.
- The advisory workflow, wherever advisories are drafted, should run `node
scripts/security-advisory-data.js` after a new advisory is added. Otherwise
`yarn test` fails.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016Y4dDj46SB6GniXf8mX2U6
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]