Skip to content

Cyclone dx java - matching - #2057

Open
crozzy wants to merge 3 commits into
quay:mainfrom
crozzy:cyclone-dx-java-match
Open

crozzy wants to merge 3 commits into
quay:mainfrom
crozzy:cyclone-dx-java-match

Conversation

@crozzy

@crozzy crozzy commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@crozzy
crozzy force-pushed the cyclone-dx-java-match branch 4 times, most recently from 8be49b9 to ee6f9ff Compare October 9, 2026 21:45
@crozzy crozzy changed the title Cyclone dx java match Cyclone dx java - matching Oct 9, 2026
@crozzy
crozzy force-pushed the cyclone-dx-java-match branch 8 times, most recently from 1237ce6 to f677e0d Compare October 19, 2026 22:40
@crozzy
crozzy force-pushed the cyclone-dx-java-match branch 2 times, most recently from 91b5dc7 to 3d92286 Compare October 21, 2026 17:51
@crozzy
crozzy marked this pull request as ready for review October 21, 2026 18:16
@crozzy
crozzy requested review from a team as code owners October 21, 2026 18:16
@crozzy
crozzy requested a review from hdonnay October 21, 2026 18:16
@BradLugo
BradLugo self-requested a review October 23, 2026 18:31
RepositoryKey is the key for a Red Hat product CPE attributed to a Java component.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
pkg:maven rows are now accepted. The package name is namespace:name,
ignoring repository_url and type. FixedInVersion is the PURL version
for a fixed row. Maven known_not_affected rows are skipped, and a
versioned known_affected Maven PURL is not ingested.

TODO: resolve what a version on a known_affected Maven PURL means.
TODO: move the feed URL back to the production vex-feed once Maven data is published there.
Signed-off-by: crozzy <joseph.crosland@gmail.com>
The matcher selects redhat-java-cpe-repository records. It applies the
RHEL CPE check, then compares Maven versions: an installed package is
vulnerable when it is strictly older than FixedInVersion, and an empty
FixedInVersion matches any installed version.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
@crozzy
crozzy force-pushed the cyclone-dx-java-match branch from 3d92286 to 01e8d32 Compare October 23, 2026 21:37

@BradLugo BradLugo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some other discussion points, but won't block on them for the sake of time

Comment thread rhel/java/matcher.go
slog.WarnContext(ctx, "unable to unbind repo CPE", "reason", err, "vulnerability name", vuln.Name)
return false, nil
}
if !cpe.Compare(vuln.Repo.CPE, record.Repository.CPE).IsSuperset() && !rhel.IsCPESubstringMatch(record.Repository.CPE, vuln.Repo.CPE) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect substring matching will produce unexpected results (e.g., 1 > 10)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants