This is an alpha feature supporting
v1beta1 and v1 versions of Task and Pipeline.Overview
Trusted Resources provides cryptographic verification of Tekton resources using digital signatures. Key capabilities:- Sign Tasks and Pipelines with private keys
- Verify signatures before execution using public keys
- Support multiple verification policies
- Enforce or warn on verification failures
- Automatic verification for remote resources (Git, OCI, Artifact Hub)
Signing Resources
Use the Tekton CLI to sign Tasks and Pipelines:Signed Task Example
tekton.dev/signature annotation.
Enabling Trusted Resources
Configure Feature Flag
Update thefeature-flags ConfigMap to enable verification:
No-Match Policy Options
- Skip Verification
- Enable Verification
To skip verification, set
trusted-resources-verification-no-match-policy to warn or ignore and ensure no VerificationPolicies exist in the cluster.Verification Policy
Define verification policies using theVerificationPolicy resource.
How Policies Work
- Trusted Resources looks up policies from the resource namespace (typically the TaskRun/PipelineRun namespace)
- For each policy, checks if the resource URL matches any
patternsin theresourceslist - If multiple policies match, the resource must pass ALL “enforce” mode policies
- Resources that only match “warn” mode policies will log warnings but not fail
- To pass a policy, the resource must verify against ANY public key in that policy
Basic Example
Policy Fields
resourcespattern- Regex pattern to match resource URLs (e.g.,https://github.com/tektoncd/catalog.git)- Uses Go regex
Matchfunction .*matches all resources
name- Identifier for the authoritykey- Public key configuration (choose ONE):secretRef- Reference to a Secret containing the public keydata- Inline PEM-encoded public keykms- URI of the public key (follows Sigstore format)
hashAlgorithm- Hash algorithm (default:sha256, also supportsSHA224,SHA384,SHA512)
enforce(default) - Fail TaskRun/PipelineRun on verification failurewarn- Log warning on verification failure, don’t fail
Multiple Policies Example
https://github.com/tektoncd/catalog.git must:
- Pass
verification-policy-a(using eitherkey1ORkey2) - AND pass
verification-policy-b(usingkey3)
Status Reporting
Trusted Resources updates the TaskRun/PipelineRun conditions to indicate verification status.No Matching Policies
Matching Policies
Success Example
Failure Example
Storing Public Keys
- Using Secrets
- Inline Data
- Using KMS
Store public keys in Kubernetes Secrets:Reference in VerificationPolicy:
Migration from ConfigMap
Old ConfigMap Approach (Deprecated)
New VerificationPolicy Approach
Store public key files in Secrets and reference them:Best Practices
- Use enforce mode for production - Set
mode: enforceon policies protecting production resources - Test with warn mode - Use
mode: warnwhen rolling out new policies - Scope patterns carefully - Use specific patterns rather than
.*to limit policy scope - Multiple keys per policy - Add multiple authorities to allow key rotation
- Namespace isolation - Create policies in the same namespace as resources
- Monitor verification status - Check
TrustedResourcesVerifiedconditions in CI/CD dashboards