Skip to content

Add OSS Scanner audit configuration - #6874

Merged
rdimitrov merged 2 commits into
mainfrom
rdimitrov/oss-scanner-config
Oct 20, 2026
Merged

rdimitrov merged 2 commits into
mainfrom
rdimitrov/oss-scanner-config

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

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/Dockerfile builds ToolHive and all four binaries (thv, thv-operator, thv-proxyrunner, vmcp), runs the unit tests once so every test binary is cached, then sets GOPROXY=off. The scanner builds the image with network access and audits it offline.
  • .oss-scanner/threat_model.md tells 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

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe): security tooling configuration; no code changes

Test plan

  • Manual testing (describe below)

  • Built the image with the scanner's own build steps (check_build.py from 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.py from anthropics/oss-scanner passes for the planned projects/toolhive/project.yaml.

Does this introduce a user-facing change?

No.

Special notes for reviewers

  • The threat model's severity scale decides how the scanner ranks findings, so it deserves the closest review.
  • Once this merges, the enrollment PR to anthropics/oss-scanner adds projects/toolhive/project.yaml with primary_contact: security@stacklok.com (the contact listed in SECURITY.md). Reports go only to that address.
  • Merge after Make unit tests pass as root and without a container runtime #6875: the threat model says the unit suite passes in the image, which holds only once those test fixes are on main.

🤖 Generated with Claude Code

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>
@rdimitrov
rdimitrov requested a review from JAORMX as a code owner October 20, 2026 07:21
@github-actions github-actions Bot added the size/S Small PR: 100-299 lines changed label Oct 20, 2026
jhrozek
jhrozek previously approved these changes Oct 20, 2026
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.76%. Comparing base (89b1bd2) to head (6015b1e).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@github-actions github-actions Bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Oct 20, 2026
@rdimitrov
rdimitrov merged commit b474553 into main Oct 20, 2026
43 of 44 checks passed
@rdimitrov
rdimitrov deleted the rdimitrov/oss-scanner-config branch October 20, 2026 08:20
@github-actions github-actions Bot mentioned this pull request Oct 22, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants