You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tkn task sign reserializes/reorders the entire YAML instead of only adding the signature annotation #2895
When signing a Task with tkn task sign -K key.pem -f task.yaml -f task.yaml, the command rewrites the entire YAML document: it reorders metadata keys (name, labels, annotations), reformats lists (e.g. params), and generally re-emits a canonicalized serialization rather than preserving the author's original file.
The only intended change is adding the tekton.dev/signature annotation. Everything else should be byte-for-byte preserved.
Why this is a problem
Catalog repositories (e.g. tektoncd-catalog/golang, tektoncd-catalog/git-clone) generate their Task YAMLs from base templates and run a CI check that regenerates and diffs the committed files (verify-generated). Because tkn task sign reserializes/reorders the whole document, the signed committed file no longer matches the generator output — producing a large spurious diff (hundreds of lines) that has nothing to do with the signature.
This forces downstream workarounds:
normalizing both sides with yq -P (sorted keys) before diffing
stripping the signature annotation before comparison
A signing operation should be minimally invasive: parse, add the annotation, and re-emit while preserving the original key order and formatting as much as possible.
Expected behavior
tkn task sign adds the tekton.dev/signature annotation and otherwise preserves the input serialization (key order, list formatting), so the diff between the unsigned and signed file is limited to the added annotation line.
Activity
chore: drop Trusted Resources signature from release
refactor: VERSION file as source of truth, drop in-repo task signing
fix(trustedresources): preserve the input document
fix(trustedresources): preserve the input document