Skip to content

Conversation

@haydentherapper
Copy link
Contributor

The offline flag is misleading and is a no-op with the new Cosign v3 defaults. The flag's purpose was to prevent a client from falling back to verifying an artifact's inclusion in Rekor when a proof failed to verify. Most users thought offline verification forced the client to not make any network requests - a very reasonable assumption, but with TUF, network requests are a part of verification if the local TUF metadata has expired.

I've updated the README as well, though we need to make a far more comprehensive pass over the documentation since it's out of date given our new trusted-root/bundle flags.

Fixes #4454

Summary

Release Note

Documentation

@haydentherapper haydentherapper requested a review from a team as a code owner October 10, 2025 23:14
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.36%. Comparing base (2ef6022) to head (716a659).
⚠️ Report is 556 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/options/verify.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4457      +/-   ##
==========================================
- Coverage   40.10%   35.36%   -4.74%     
==========================================
  Files         155      220      +65     
  Lines       10044    15160    +5116     
==========================================
+ Hits         4028     5362    +1334     
- Misses       5530     9110    +3580     
- Partials      486      688     +202     

☔ View full report in Codecov by Sentry.
📢 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.

cmurphy
cmurphy previously approved these changes Oct 13, 2025
func (o *CommonVerifyOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().BoolVar(&o.Offline, "offline", false,
"only allow offline verification")
"[deprecated] only verify an artifact's inclusion in a transparency log using a provided proof, rather than querying the log. May still include network requests to retrieve service keys from a TUF repository")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI it looks like using MarkDeprecated hides the flag from the --help output so I'm not sure it matters what's in this help text.

If it does appear somewhere, it might be better to change [deprecated] to DEPRECATED to match the deprecation format of the --attachment flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've removed [deprecated] since the flag help text is no longer used. Looking around, we also have [DEPRECATED] for --sig-only - I'll look at standardizing as we deprecate more flags.

The offline flag is misleading and is a no-op with the new Cosign v3
defaults. The flag's purpose was to prevent a client from falling back
to verifying an artifact's inclusion in Rekor when a proof failed to
verify. Most users thought offline verification forced the client to not
make any network requests - a very reasonable assumption, but with TUF,
network requests are a part of verification if the local TUF metadata
has expired.

I've updated the README as well, though we need to make a far more
comprehensive pass over the documentation since it's out of date given
our new trusted-root/bundle flags.

Fixes sigstore#4454

Signed-off-by: Hayden <[email protected]>
@haydentherapper haydentherapper enabled auto-merge (squash) October 13, 2025 20:43
@haydentherapper haydentherapper merged commit aab0126 into sigstore:main Oct 13, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offline verification makes network calls

2 participants