René's URL Explorer Experiment


Title: ROX-32846: Add repository-to-CPE mapping API to indexer by BradLugo · Pull Request #18705 · stackrox/stackrox · GitHub

Open Graph Title: ROX-32846: Add repository-to-CPE mapping API to indexer by BradLugo · Pull Request #18705 · stackrox/stackrox

X Title: ROX-32846: Add repository-to-CPE mapping API to indexer by BradLugo · Pull Request #18705 · stackrox/stackrox

Description: Description Adds a new RPC, GetRepositoryToCPEMapping, to the Indexer service that returns the Red Hat repository-to-CPE mapping used for RHEL package vulnerability matching. The matcher's ScanSBOM API will need this mapping to enrich RHEL packages with CPE information during SBOM vulnerability scanning. The Indexer acts as a stateless proxy to the repository-to-CPE mapping file from Central, while the matcher caches the data locally with periodic background refresh. The GetRepositoryToCPEMapping supports conditional fetch via If-Modified-Since to minimize data transfer on refresh. Alternatives Individual repository-to-cpe lookup: Frankly, this would be my long-term solution if we weren't planning on moving toward other indexing improvements (i.e., "slim index reports"), which is really my preferred solution here. This is a valid option, and we could prove whether it's better than sending the entire mapping over with performance testing, but the current changes seemed easier to implement at the time. We can revisit this during the Tech Preview implementation. repository-to-cpe mapping in Matcher: We'd need to have the same repository-to-cpe related configurations in the Matcher, which requires deployment configuration changes. Given that this is meant to be a somewhat temporary solution, I didn't see the benefit in that effort. SBOM parsing in the Indexer: Some of the SBOMs are already too large to send over the wire as-is. Sending that data between the Indexer and Matcher seemed like too much. The repository-to-cpe data is much smaller. Eager initialization in the Matcher: The updater could fetch the mapping on startup, but lazy initialization avoids unnecessary work for matchers that never use the repo-to-CPE data. Especially relevant, since not all (read: most) users won't use this feature initially, and I expect the implementation to change substantially over time. PR stack: master #18484 👉 #18705 #18716 User-facing documentation CHANGELOG.md is updated OR update is not needed documentation PR is created and is linked above OR is not needed Testing and quality the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag CI results are inspected Automated testing added unit tests added e2e tests added regression tests added compatibility tests modified existing tests How I validated my change Deploy stackrox Optionally set the ROX_SBOM_SCANNING feature flag: ❯ kubectl set env deploy/scanner-v4-indexer ROX_SBOM_SCANNING=true Port forward Indexer ❯ kubectl port-forward svc/scanner-v4-indexer 8443 Hit the endpoint ❯ grpcurl -insecure \ -import-path proto \ -proto internalapi/scanner/v4/indexer_service.proto \ localhost:8443 scanner.v4.Indexer/GetRepositoryToCPEMapping | head { "modified": true, "lastModified": "Mon, 13 Apr 2026 00:45:11 GMT", "mapping": { "3scale-amp-2-for-rhel-8-ppc64le-debug-rpms": { "cpes": [ "cpe:/a:redhat:3scale:2.13::el8", "cpe:/a:redhat:3scale:2.14::el8", "cpe:/a:redhat:3scale:2.15::el8", "cpe:/a:redhat:3scale:2.16::el8",

Open Graph Description: Description Adds a new RPC, GetRepositoryToCPEMapping, to the Indexer service that returns the Red Hat repository-to-CPE mapping used for RHEL package vulnerability matching. The matcher's Scan...

X Description: Description Adds a new RPC, GetRepositoryToCPEMapping, to the Indexer service that returns the Red Hat repository-to-CPE mapping used for RHEL package vulnerability matching. The matcher's ...

Opengraph URL: https://github.com/stackrox/stackrox/pull/18705

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:abadc826-8f89-8e2d-d127-dcaa1f7a818a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDAF8:3D017:1853B41:2361475:6A4E5041
html-safe-nonced75a0c2f10083511d3d263476a2b66630c366004494016bb40a95b4a50e1eb26
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUY4OjNEMDE3OjE4NTNCNDE6MjM2MTQ3NTo2QTRFNTA0MSIsInZpc2l0b3JfaWQiOiIyNjEwMTc3MjI1MjkxMzU0MTc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace2cec6e99ae7bf6376a3b1a061c5625e84f2d21c099c4a2d79f332f5637adb9f
hovercard-subject-tagpull_request:3216191963
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/stackrox/stackrox/pull/18705/files
twitter:imagehttps://avatars.githubusercontent.com/u/4405183?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4405183?s=400&v=4
og:image:altDescription Adds a new RPC, GetRepositoryToCPEMapping, to the Indexer service that returns the Red Hat repository-to-CPE mapping used for RHEL package vulnerability matching. The matcher's Scan...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/stackrox/stackrox git https://github.com/stackrox/stackrox.git
octolytics-dimension-user_id40638982
octolytics-dimension-user_loginstackrox
octolytics-dimension-repository_id434017296
octolytics-dimension-repository_nwostackrox/stackrox
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id434017296
octolytics-dimension-repository_network_root_nwostackrox/stackrox
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef344f1eab54fc7dfc02d0d018cda7e158c3db65c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/stackrox/stackrox/pull/18705/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackrox%2Fstackrox%2Fpull%2F18705%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackrox%2Fstackrox%2Fpull%2F18705%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=stackrox%2Fstackrox
Reloadhttps://github.com/stackrox/stackrox/pull/18705/files
Reloadhttps://github.com/stackrox/stackrox/pull/18705/files
Reloadhttps://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
stackrox https://github.com/stackrox
stackroxhttps://github.com/stackrox/stackrox
Notifications https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Fork 180 https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Star 1.3k https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Code https://github.com/stackrox/stackrox
Issues 53 https://github.com/stackrox/stackrox/issues
Pull requests 563 https://github.com/stackrox/stackrox/pulls
Actions https://github.com/stackrox/stackrox/actions
Security and quality 0 https://github.com/stackrox/stackrox/security
Insights https://github.com/stackrox/stackrox/pulse
Code https://github.com/stackrox/stackrox
Issues https://github.com/stackrox/stackrox/issues
Pull requests https://github.com/stackrox/stackrox/pulls
Actions https://github.com/stackrox/stackrox/actions
Security and quality https://github.com/stackrox/stackrox/security
Insights https://github.com/stackrox/stackrox/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fstackrox%2Fstackrox%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fstackrox%2Fstackrox%2Fissues%2Fnew%2Fchoose
BradLugohttps://github.com/BradLugo
masterhttps://github.com/stackrox/stackrox/tree/master
blugo/ROX-32846-GetRepositoryToCPEMappinghttps://github.com/stackrox/stackrox/tree/blugo/ROX-32846-GetRepositoryToCPEMapping
Conversation 25 https://github.com/stackrox/stackrox/pull/18705
Commits 15 https://github.com/stackrox/stackrox/pull/18705/commits
Checks 93 https://github.com/stackrox/stackrox/pull/18705/checks
Files changed https://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
ROX-32846: Add repository-to-CPE mapping API to indexer https://github.com/stackrox/stackrox/pull/18705/files#top
Show all changes 15 commits https://github.com/stackrox/stackrox/pull/18705/files
59962b6 ROX-32846: Add repository-to-CPE mapping API to indexer BradLugo Jan 26, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/59962b652956f23378831ee7dff9a32d297fb7b4
52717ba Move repository-to-CPE mapping caching from indexer to matcher BradLugo Jan 26, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/52717ba945232f59cae90a21a77a88144d93e75a
93b6ef9 Add lazy initialization to repo2cpe updater BradLugo Apr 13, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/93b6ef93116bc37d461cb6c95b65bb71c5d3d176
a8a3e05 Run file generation BradLugo Apr 13, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/a8a3e059363187a2ea1167c1d676f9ee24cb1ac9
64af78c Use zlog.Test during unit testing BradLugo Apr 14, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/64af78c39441a8691516ac16b139aae8afaeccd7
0d29bd6 Change sync usage to rox/pkg/sync BradLugo Apr 14, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/0d29bd62527e1714df009f2a4dbd8833995b1a5f
5d8ecd6 Use mockgen-wrapper for repo2cpe updater BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/5d8ecd606fe132ad60c9aeb678fd6ee116546e86
b2ceec6 Remove default rhel URL from repositorytocpefetcher BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/b2ceec618a0bb8fc1a5bc066868eabfba1d6e6a2
8ac92a5 Retry on initial (lazy) repo2cpe updater failure BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/8ac92a5006400053e85a0aadeba72b96fd21ea53
213f797 Use a separate, shorter timer for the repo2cpe updater on failures BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/213f79721c4bffce3f5024add6c904cbe0593079
39b2429 Return error on repo2cpe Get failures BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/39b24297bb2a5a5306406c37e8dca65cae115454
ebfa6d0 Use defined RemoteIndexer for repo2cpeUpdater BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/ebfa6d0efdf87d2d6fafe188fd911b0690a79083
80b3114 Error log in Indexer when repo2repo url is empty and SBOM scanning is… BradLugo Apr 29, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/80b31145a683df8c74ec9c70e51de8b625ea965a
44cd2fc Minor improvements BradLugo Apr 30, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/44cd2fc84b7a6889f494f28d6d325b5ea835af2b
566e043 Initial file load for repositorytocpefetcher BradLugo Apr 30, 2026 https://github.com/stackrox/stackrox/pull/18705/commits/566e0436c28746cb797ad44580a658e7543bc1e6
Clear filters https://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
indexer_service.pb.go https://github.com/stackrox/stackrox/pull/18705/files#diff-04ac671bfb5ffabf8ba0a86168595fe972096fb4e69f532159bc9eeb1232339a
indexer_service_grpc.pb.go https://github.com/stackrox/stackrox/pull/18705/files#diff-9251f983a148fbba4e87cfc011ce0b82b02c3c71e3ab7441a25786c9123a86cf
indexer_service_vtproto.pb.go https://github.com/stackrox/stackrox/pull/18705/files#diff-71516c9925c9a32cd4662f796368a44dec53acd7945c92d0356974149e3a8cb2
client.go https://github.com/stackrox/stackrox/pull/18705/files#diff-c3f9cc13b0a0d7e25aeb69067e0e4fb33e0199682a8c6c3197fee97a676a3fbf
client.go https://github.com/stackrox/stackrox/pull/18705/files#diff-dcb90b4f1afff1a819233076bcd9d18762478526a72dc0118e95fc4ebb61981a
mappingfile.go https://github.com/stackrox/stackrox/pull/18705/files#diff-9612d35bcbb333d23b70aef7392810d3618231a88a3fa3796803e01e51d3570f
mappingfile_test.go https://github.com/stackrox/stackrox/pull/18705/files#diff-5dbe7a8e05f7884f4bd059c91f3b05cbdc0df0598fe3df68fbba936a16e76103
indexer_service.proto https://github.com/stackrox/stackrox/pull/18705/files#diff-d9bec1c540ba470e3fd3e93723d359fc6743294ccd0e54ac943cb48f98d15649
main.go https://github.com/stackrox/stackrox/pull/18705/files#diff-2e3a957f2fd5cd830988ac7922af69a7691da4d8ffd798d95bfc126cde49784b
indexer.go https://github.com/stackrox/stackrox/pull/18705/files#diff-badd4e55408c7f991707040550cdf63a2f02c34a904eb0d2c1743ebe3e8e83f5
indexer.go https://github.com/stackrox/stackrox/pull/18705/files#diff-a1e68ba627fc74b2b8d8a8e62c7f616b7d5853f8022f0af4392ad00aaeb084cb
remote.go https://github.com/stackrox/stackrox/pull/18705/files#diff-d4cbfb75c9a06d99a92d2a7f7e091379658b7b110c37f9d98388a4010821b855
repositorytocpefetcher.go https://github.com/stackrox/stackrox/pull/18705/files#diff-cd7723eebfd70912b98e73b3193246b7587a0531ab45aad84ddb528f8ba0d5c0
repositorytocpefetcher_test.go https://github.com/stackrox/stackrox/pull/18705/files#diff-f8bd681881a252c75301a783865168951d2a36d5f6c688bcebe7ca469b43b53a
matcher.go https://github.com/stackrox/stackrox/pull/18705/files#diff-69a05cf57889675bb9af0cbdab00ebe2799ee393e0e73c74ca37c411b3fa45ce
updater.go https://github.com/stackrox/stackrox/pull/18705/files#diff-c8381df15ba6a0f2044e7905ca69cbb8044e7aae224ccfb732d5e30ebac57907
updater.go https://github.com/stackrox/stackrox/pull/18705/files#diff-90633de891cc2287094d153ab31796ea03aebf2cc27a7f000228222ce7b253f9
updater_test.go https://github.com/stackrox/stackrox/pull/18705/files#diff-f0a7c78b9537d015b4595a981f0145dcafb9728d3d5733664a9703b5338e4357
indexer.go https://github.com/stackrox/stackrox/pull/18705/files#diff-f5f6a6cf4b9088ac53bf33c254863b3f9de245541deaaae51c729a19654658d9
indexer_test.go https://github.com/stackrox/stackrox/pull/18705/files#diff-ef0514a49e24002573e77ea135c8357d69f0dcc10b4eb32fa4d8aa73915cc4f8
generated/internalapi/scanner/v4/indexer_service.pb.gohttps://github.com/stackrox/stackrox/pull/18705/files#diff-04ac671bfb5ffabf8ba0a86168595fe972096fb4e69f532159bc9eeb1232339a
View file https://github.com/stackrox/stackrox/blob/566e0436c28746cb797ad44580a658e7543bc1e6/generated/internalapi/scanner/v4/indexer_service.pb.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
generated/internalapi/scanner/v4/indexer_service_grpc.pb.gohttps://github.com/stackrox/stackrox/pull/18705/files#diff-9251f983a148fbba4e87cfc011ce0b82b02c3c71e3ab7441a25786c9123a86cf
View file https://github.com/stackrox/stackrox/blob/566e0436c28746cb797ad44580a658e7543bc1e6/generated/internalapi/scanner/v4/indexer_service_grpc.pb.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/18705/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.