Repository navigation
fix: make the container image able to run scans again - #418
Merged
Merged
Conversation
The image ships pvtr and the github-repo plugin binary but no
plugins.json manifest. Since privateer began resolving installed
plugins from the manifest, 'pvtr run' inside the container exits
with 'requested plugin that is not installed: github-repo' before
writing any results. The entrypoint discarded all output, so the
container appeared to succeed while producing nothing.
- Write plugins.json into /.privateer/bin in the Dockerfile,
matching the manifest .github/scripts/ci.sh already creates
- Pass an absolute --binaries-path: filepath.Join('.', 'github-repo')
cleans to a bare name, which exec resolves via PATH instead of the
binaries directory
- Capture pvtr output instead of discarding it, surface it on stderr
and propagate the exit code when the run crashes (exit > 1)
- Add a CI smoke test that builds the image and runs it the same way
osps-baseline-action does, asserting a log file is written; the
existing plugin test exercises the raw binaries only, which is how
the broken image shipped unnoticed
Signed-off-by: jmeridth <jmeridth@gmail.com>
jmeridth
marked this pull request as ready for review
July 31, 2026 21:37
jmeridth
enabled auto-merge (squash)
July 31, 2026 22:27
eddie-knight
approved these changes
Aug 1, 2026
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.
What/Why
The published container image cannot run scans: it ships
pvtrand thegithub-repoplugin binary but noplugins.jsonmanifest, so since privateer began resolving installed plugins from the manifest,pvtr runexits withrequested plugin that is not installed: github-repobefore writing any results. The entrypoint discarded all output (> /dev/null 2>&1), so the container exited 0 while producing nothing, which surfaces downstream as revanite-io/osps-baseline-action CI failing with "OSPS scanner produced no log file".Broken downstream runs (started when the action bumped the image from v0.22.0 to v0.27.0):
Changes:
plugins.jsoninto/.privateer/binin the Dockerfile (same manifest.github/scripts/ci.shalready creates for the plugin test)--binaries-path:filepath.Join(".", "github-repo")cleans to a bare name, whichexecresolves via$PATHinstead of the binaries directoryimage-smoke-testCI job that builds the image and runs it exactly the way osps-baseline-action does, asserting a log file is written. The existing plugin test exercises the raw binaries with a hand-built manifest, which is how the broken image shipped unnoticedProof it works
Built the image locally (
--build-arg PLATFORM=Linux_arm64) and ran it with a mounted config and results directory against this repo:--binaries-pathfix, the entrypoint surfacedexec: "github-repo": executable file not found in $PATH(previously hidden by/dev/null)evaluation_results/pvtr/pvtr.logandpvtr.yamlare written to the host mount, log contents printed, exit 0 (17 Passed, 0 Warnings, 0 Failed)requested plugin that is not installedto stderr and the container exits with pvtr's exit codeimage-smoke-testjob repeats the happy-path verification in CI on x86_64Risk + AI role
Low -- touches only the container packaging, entrypoint, and CI; no plugin or evaluation logic. Diagnosed and written with AI assistance, manually verified end to end.
Review focus
GITHUB_TOKEN; confirm that token's rate limits/permissions are acceptable for every CI run