Add --rekor-threshold and --timestamp-threshold verify flags #5230
Codecov Report
:x: Patch coverage is
66.21622% with 25 lines in your changes missing coverage. Please review.:white_check_mark: Project coverage is 48.59%. Comparing base (
2ef6022) to head (3c59efa).:warning: Report is 944 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| cmd/cosign/cli/verify.go | 0.00% | 16 Missing :warning: |
| cmd/cosign/cli/dockerfile.go | 0.00% | 4 Missing :warning: |
| cmd/cosign/cli/manifest.go | 0.00% | 4 Missing :warning: |
| cmd/conformance/main.go | 0.00% | 1 Missing :warning: |
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #5230 +/- ##
==========================================
+ Coverage 40.10% 48.59% +8.48%
==========================================
Files 155 202 +47
Lines 10044 10131 +87
==========================================
+ Hits 4028 4923 +895
+ Misses 5530 5208 -322
+ Partials 486 0 -486
</details>
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
+1, this is a good path forward to no longer needing an "insecure tlog verify" flag.
On naming, I considered --tlog-threshold and --tsa-threshold. I chose --rekor-threshold because I've seen tlog be conflated with the Fulcio CT log, and IMO tsa is not as clear as timestamp to people new to the project. However, I'm fine changing either of these if anyone disagrees.
LGTM, I think this fits in nicely with the future policy work. Would like @steiza’s take as well since this is adding more flags.
Is this something you’d want to land in V3 or V4? If the latter, we could just remove the deprecated flags rather than keep them around, which would also simplify some of the logic around the various checkopts fields.
Hayden-IO
codysoyland
Fixes #5229
Adds
--rekor-threshold=nand--timestamp-threshold=nto the verify commands, both defaulting to 1, mapped to sigstore-go'sWithTransparencyLog(n)andWithSignedTimestamps(n).--insecure-ignore-tlogand--use-signed-timestampsare deprecated in favor of--rekor-threshold=0and--timestamp-threshold=1; the deprecated--private-infrastructurenow points to--rekor-threshold=0.Behavior:
--timestamp-threshold, verification is unchanged: a signed timestamp is required only for Rekor v2-only bundles.CheckOpts.RekorThresholdandCheckOpts.TimestampThresholdof 0 keep existing behavior for library callers.CheckOpts.TimestampThreshold > 0enables signed timestamp verification even withoutUseSignedTimestamps.manifest verifyanddockerfile verifynow honor--private-infrastructure; it was registered on those commands but ignored.Earlier revisions also tightened the non-bundle verification path; that code was removed upstream in #5146, so this PR now only touches sigstore-go bundle verification.
The integrated-timestamp requirement stays at 1 regardless of
--rekor-threshold, since it only provides a trusted time for certificate validation and mixed v1/v2 bundles may have a single v1 entry.AI disclosure: written with Claude Code (Claude Opus 5.5). An earlier revision was reviewed by Codex (gpt-6-astra); the issue text was drafted with Codex.
🤖 Generated with Claude Code