Repository navigation
Add OSS Scanner audit configuration - #6874
Merged
Merged
Conversation
Register ToolHive with Anthropic's OSS Scanner. The Dockerfile gives the scanner a reproducible build that runs the unit tests, and the threat model tells it which inputs are untrusted and which failures count as vulnerabilities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
jhrozek
previously approved these changes
Oct 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6874 +/- ##
==========================================
- Coverage 79.77% 79.76% -0.02%
==========================================
Files 820 820
Lines 83723 83723
==========================================
- Hits 66791 66780 -11
- Misses 16927 16938 +11
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The environment-dependent unit tests now skip or use mocks (#6875), so the suite passes in the scanner image and the expected-failure list is no longer accurate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
ToolHive is being enrolled in Anthropic's OSS Scanner, a free service that scans critical open-source projects for vulnerabilities and privately emails findings, with reproducers and proposed patches, to the project's security contact. Enrollment is a PR to anthropics/oss-scanner that points at a Dockerfile and threat model kept in this repository, so we can update them without going through Anthropic.
.oss-scanner/Dockerfilebuilds ToolHive and all four binaries (thv,thv-operator,thv-proxyrunner,vmcp), runs the unit tests once so every test binary is cached, then setsGOPROXY=off. The scanner builds the image with network access and audits it offline..oss-scanner/threat_model.mdtells the scanner what ToolHive protects, which inputs are untrusted, what is in and out of scope, how to exercise the code without a container runtime, and how we rate severity.Type of change
Test plan
Manual testing (describe below)
Built the image with the scanner's own build steps (
check_build.pyfrom anthropics/oss-scanner, run against a local clone of this branch). It builds in about 6 minutes against a 45-minute limit, the scanner's Claude Code layer installs on it, and the finished image starts with no network.Ran the full unit suite inside the finished image with
--network none --cpus 2 --memory 8g, the scanner agent's limits, with Make unit tests pass as root and without a container runtime #6875 applied. Every package passes; tests that need a keyring or a non-root user skip with their reason. No test needs internet access. The Dockerfile still does not let a test failure fail the build, as the scanner template recommends.tools/validate.pyfrom anthropics/oss-scanner passes for the plannedprojects/toolhive/project.yaml.Does this introduce a user-facing change?
No.
Special notes for reviewers
projects/toolhive/project.yamlwithprimary_contact: security@stacklok.com(the contact listed inSECURITY.md). Reports go only to that address.main.🤖 Generated with Claude Code