feat(verify): add trusted_root support for private Sigstore instances - #788
Open
trevor-vaughan wants to merge 1 commit into
Open
feat(verify): add trusted_root support for private Sigstore instances#788trevor-vaughan wants to merge 1 commit into
trevor-vaughan wants to merge 1 commit into
Conversation
trevor-vaughan
force-pushed
the
opsx/768-trusted_root-support
branch
from
July 29, 2026 14:44
6b34744 to
b85c7aa
Compare
Contributor
✅ CRAP Load Analysis: PASSSummary
Quadrant Distribution
Regressions
Improvements
New Functions
|
trevor-vaughan
force-pushed
the
opsx/768-trusted_root-support
branch
from
July 29, 2026 17:13
b85c7aa to
e8b86dc
Compare
VerificationConfig gains a trusted_root field pointing to a local trusted_root.json file. When set, NewKeylessVerifier loads the trust anchor from disk instead of fetching the public Sigstore TUF root, so keyless verification works with private deployments. Validation rejects trusted_root combined with key-based verification, requires issuer + identity, and checks file existence after filepath.Clean. - test(config): add validation tests for trusted_root field - Mutual exclusivity, missing keyless fields, file existence, path sanitization, YAML round-trip - test(verify): add verifier construction tests for custom trusted root - test(cli): add builder passthrough tests for TrustedRoot field - docs(changelog): add trusted_root feature entry - docs(threats): add THR02.MIT05 for user-supplied trust anchor risk - docs(agents): add custom-trusted-root to recent changes - docs(openspec): add custom-trusted-root change artifacts Fixes #768 Assisted-by: Claude Opus 4.6 Signed-off-by: Trevor Vaughan <tvaughan@redhat.com>
trevor-vaughan
force-pushed
the
opsx/768-trusted_root-support
branch
from
July 30, 2026 13:03
e8b86dc to
f56824d
Compare
This was referenced Jul 31, 2026
sonupreetam
approved these changes
Jul 31, 2026
sonupreetam
left a comment
Member
There was a problem hiding this comment.
LGTM. Added some considerations after further investigation and opened issues #798 and #799 as alternatives/improvements. The threat model accepts filesystem trust as the baseline, but there are concrete mechanisms that could layer additional protection on top without abandoning the local-file approach.
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
Add
trusted_rootsupport for private Sigstore instances tocomplyctl getsignature verification.Organizations running private Sigstore deployments (self-hosted Fulcio CA and Rekor transparency log) could not use
complyctl get --verificationbecauseNewKeylessVerifier()hardcoded the public Sigstore TUF root. This change introduces atrusted_rootfield inVerificationConfigthat accepts a filesystem path to atrusted_root.jsonfile, allowing keyless verification against non-public Sigstore infrastructure.Key changes:
internal/complytime/config.go):VerificationConfiggainsTrustedRoot stringfield withyaml:"trusted_root,omitempty"tag.ValidateVerificationConfig()enforces mutual exclusivity withkey, requiresissuer+identity, and validates file existence afterfilepath.Cleanpath sanitization.internal/cache/verify.go):NewKeylessVerifier()gainstrustedRootPath stringparameter. When non-empty, loads trust anchor viaroot.NewTrustedRootFromPath()instead of TUF fetch. Empty value preserves existing behavior.cmd/complyctl/cli/get.go):buildVerifierFromConfig()passescfg.TrustedRoottoNewKeylessVerifier().Related Issues
Review Hints
Start with
internal/complytime/config.go-- theVerificationConfigstruct change andValidateVerificationConfig()additions are the entry point. Then follow through tointernal/cache/verify.go(NewKeylessVerifier) andcmd/complyctl/cli/get.go(buildVerifierFromConfigone-line change).The
openspec/changes/custom-trusted-root/design.mdfile documents the four design decisions (D1-D4) and their rationale -- useful context for why this is a file path rather than inline JSON, and why a signature change was preferred over a separate constructor.Test coverage is organized in three groups: config validation (
internal/complytime/config_test.go), verifier construction (internal/cache/verify_test.go), and builder passthrough (cmd/complyctl/cli/get_verify_test.go). The verifier construction tests use a minimal fixture atinternal/cache/testdata/trusted_root.jsonwith empty trust material arrays -- this validates parsing, not verification capability.No new dependencies.
root.NewTrustedRootFromPath()is already available in the vendoredsigstore-go.