Skip to content

fix: improve error for missing unsigned pkg deploy flag - #1560

Merged
bradclawsie merged 5 commits into
mainfrom
cli-314
Sep 17, 2026
Merged

bradclawsie merged 5 commits into
mainfrom
cli-314

Conversation

@bradclawsie

@bradclawsie bradclawsie commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

When deploying an unsigned package, inform user that --skip-signature-verification must be provided on the command line if absent. The corresponding issue is for Bundles Next only.
...

Related Issue

Fixes CLI-314

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

How This Was Tested

  • unit tests
  • built the "quickstart" Next bundle and ran:
> CLI_FEATURES=NextMode=true ~/repos/defenseunicorns/uds-cli/build/uds bundle deploy ./uds-bundle-next-quickstart-arm64-0.1.0.tar.zst
Error: bundle signature verification is enabled but no public key or keyless verification policy is configured; configure one to verify this bundle, or if the bundle is unsigned, re-run with --skip-signature-verification

> CLI_FEATURES=NextMode=true ~/repos/defenseunicorns/uds-cli/build/uds bundle deploy ./uds-bundle-next-quickstart-arm64-0.1.0.tar.zst --skip-signature-verification

# proceeds normally

@bradclawsie
bradclawsie marked this pull request as ready for review September 16, 2026 15:45
@bradclawsie
bradclawsie requested a review from a team as a code owner September 16, 2026 15:45
@greptile-apps

greptile-apps Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking user-facing accuracy issue in the new remediation message.

Fix All in CodexFindings

  1. P2Β **Mislabels Missing Verification Policy** β–Ά

Summary

The PR specializes bundle deployment validation errors when signature verification is enabled without a configured public-key or keyless policy.

  • Adds a deployment-specific policy helper and uses it during validation and execution.
  • Preserves partially constructed policies on validation errors so missing policy can be distinguished from malformed configured policy.
  • Adds a unit test for the new missing-policy message.
  • The new message overstates what is known by labeling the artifact unsigned before inspecting it.

Reviews (1) Β· Last reviewed commit: "fix: improve error for missing unsigned ..."

Comment thread internal/cli/bundle/deploy.go Resolved
@bradclawsie
bradclawsie merged commit cf4cde1 into main Sep 17, 2026
24 checks passed
@bradclawsie
bradclawsie deleted the cli-314 branch September 17, 2026 15:14
return policy, err
}

return bundle.VerificationPolicy{}, errors.New("bundle signature verification is enabled but no public key or keyless verification policy is configured; configure one to verify this bundle, or if the bundle is unsigned, re-run with --skip-signature-verification")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this message is any more helpful that the one before.

If a bundle is unsigned you literally can't provide a keyless verification policy so the first line of the message is not helpful and very confusing (and the origination of this ticket).

If a bundle is unsigned the only way you can deploy it is with --skip-signature-verification. please rework this message to be more clear. We should detect if the bundle is unsigned and then display a message like the following:

Suggested change
return bundle.VerificationPolicy{}, errors.New("bundle signature verification is enabled but no public key or keyless verification policy is configured; configure one to verify this bundle, or if the bundle is unsigned, re-run with --skip-signature-verification")
return bundle.VerificationPolicy{}, errors.New("bundle is not signed, if you wish to deploy this unsigned bundle re-run with --skip-signature-verification")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

New PR: #1563

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.

3 participants