Skip to main content
Trusted Resources is a feature that enables signing Tekton resources and verifying their authenticity before execution. This helps ensure that only trusted Tasks and Pipelines run in your cluster.
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)
Currently, Trusted Resources only supports verifying resources from remote sources (Git, OCI registry, Artifact Hub). For cluster resolver with in-cluster resources, ensure all default values are set before applying to the cluster, as the mutating webhook may update default fields and fail verification.
Verification failure marks the corresponding TaskRun/PipelineRun as Failed and stops execution.

Signing Resources

Use the Tekton CLI to sign Tasks and Pipelines:
For detailed signing instructions, refer to the Tekton CLI documentation.

Signed Task Example

The signature is stored in the tekton.dev/signature annotation.

Enabling Trusted Resources

Configure Feature Flag

Update the feature-flags ConfigMap to enable verification:
Or patch the ConfigMap:

No-Match Policy Options

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 the VerificationPolicy resource.

How Policies Work

  1. Trusted Resources looks up policies from the resource namespace (typically the TaskRun/PipelineRun namespace)
  2. For each policy, checks if the resource URL matches any patterns in the resources list
  3. If multiple policies match, the resource must pass ALL “enforce” mode policies
  4. Resources that only match “warn” mode policies will log warnings but not fail
  5. To pass a policy, the resource must verify against ANY public key in that policy

Basic Example

Policy Fields

resources
  • pattern - Regex pattern to match resource URLs (e.g., https://github.com/tektoncd/catalog.git)
  • Uses Go regex Match function
  • .* matches all resources
authorities
  • name - Identifier for the authority
  • key - Public key configuration (choose ONE):
    • secretRef - Reference to a Secret containing the public key
    • data - Inline PEM-encoded public key
    • kms - URI of the public key (follows Sigstore format)
  • hashAlgorithm - Hash algorithm (default: sha256, also supports SHA224, SHA384, SHA512)
mode
  • enforce (default) - Fail TaskRun/PipelineRun on verification failure
  • warn - Log warning on verification failure, don’t fail

Multiple Policies Example

A resource from https://github.com/tektoncd/catalog.git must:
  • Pass verification-policy-a (using either key1 OR key2)
  • AND pass verification-policy-b (using key3)

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

Store public keys in Kubernetes Secrets:
Reference in VerificationPolicy:

Migration from ConfigMap

Key configuration in ConfigMap is deprecated. Migrate to VerificationPolicy.

Old ConfigMap Approach (Deprecated)

New VerificationPolicy Approach

Store public key files in Secrets and reference them:

Best Practices

  1. Use enforce mode for production - Set mode: enforce on policies protecting production resources
  2. Test with warn mode - Use mode: warn when rolling out new policies
  3. Scope patterns carefully - Use specific patterns rather than .* to limit policy scope
  4. Multiple keys per policy - Add multiple authorities to allow key rotation
  5. Namespace isolation - Create policies in the same namespace as resources
  6. Monitor verification status - Check TrustedResourcesVerified conditions in CI/CD dashboards