Skip to content

docs: document the trust model Chains relies on - #2092

Open
paoValle wants to merge 2 commits into
tektoncd:mainfrom
paoValle:docs/trust-model
Open

paoValle wants to merge 2 commits into
tektoncd:mainfrom
paoValle:docs/trust-model

Conversation

@paoValle

Copy link
Copy Markdown

Changes

Adds docs/trust-model.md, listed in the setup steps of the README.

Chains signs the status of a completed TaskRun and nothing else, so the trust boundary is whoever may write that status. The doc says so explicitly, quotes the rule from this repo's tekton-chains-controller-cluster-access ClusterRole, and lists what a status writer can influence (build definition, provenance subjects, start and completion times). It then covers Task results being user-controlled, why storage.oci.repository is security-critical on a shared cluster — including the case where sigstore-bundle mode ignores it — and where the claim stops: the platform is attested, the content is not verified.

Fixes #1661

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: paoValle / name: Paolo Valletta (4e338c1)

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 26, 2026
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.23%. Comparing base (c5a86af) to head (3891442).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2092      +/-   ##
==========================================
- Coverage   80.26%   80.23%   -0.03%     
==========================================
  Files          59       59              
  Lines        3395     3395              
==========================================
- Hits         2725     2724       -1     
- Misses        668      669       +1     
  Partials        2        2              
Flag Coverage Δ
unit-tests 80.23% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@paoValle

paoValle commented Nov 6, 2026

Copy link
Copy Markdown
Author

Hi there. A quick check on this proposal: is the trust-model doc something you'd like to take? If there's no interest I'll go ahead and close it in ten days or so, no worries at all, I'd just rather keep the queue here tidy than leave it sitting.

@paoValle

Copy link
Copy Markdown
Author

Closing this for now: no answer after the ping, so the branch stays in my fork and I can reopen it if it's wanted.

@paoValle paoValle closed this Nov 30, 2026
@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

@paoValle apologise for the delayed response. Thank you for progressing this. Hope you are still ok to contribute to this.

Please consider the following points and revisit the PR.

I agree a focused trust-model page would help operators understand what a Chains signature does and does not establish. Before merging, could we consider a few points so the guidance matches the implementation?

Trust boundary. The status boundary is important: TaskRun status includes results, timestamps, and the resolved TaskSpec snapshot; PipelineRun status includes the PipelineSpec snapshot. Those are inputs to provenance. But status is not the only input: Chains also includes run spec data and resolved definitions/dependencies. Could the doc describe status writers as one critical part of the trust set, alongside run creators, task/pipeline definitions and the configuration that controls signing and verification? See the TaskRun status fields, PipelineRun status fields, and TaskRun run-spec provenance input.

RBAC and controller behavior. The ClusterRole does grant status-subresource write verbs, which is worth calling out. However, the statement that Chains “only patches finalizers and labels” doesn’t match normal signing behavior: Chains also writes its annotations, including signing state and stored payload/signature data. Could the text distinguish permissions granted from operations the controller actually performs, and clarify whether the broad status permissions are required or should be considered for least-privilege follow-up? See the ClusterRole and Chains’ annotation handling.

OCI destination and credentials. The destination is selected by storage.oci.repository, or otherwise by the artifact’s repository; credentials authorize the write, but don’t choose the destination. Chains resolves registry credentials from the TaskRun’s ServiceAccount mount secrets. Could the doc clarify how an operator can provide credentials that Chains can use but the build cannot? Otherwise, the recommendation to keep those credentials separate may be difficult to apply. Please also retain the sigstore-bundle caveat, where the repository override is ignored. See OCI repository selection, credential resolution, and the encoding-format guidance.

SLSA framing. The linked v1.0 levels page is retired; could we update it to the current v1.2 Build track? Please also distinguish the levels: signed provenance alone does not establish Build L2; that level includes a hosted platform generating/signing provenance and consumers validating its authenticity. It would help to say explicitly that Chains can provide evidence toward a level, but does not certify one by itself.

Finally, please refresh the branch against current main and verify the examples and links there. The goal is a concise explanation of what Chains observes, which actors and inputs must be trusted, what the signature proves, and what it cannot prove, not to imply that Chains independently validates the build or artifact content.

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign infernus01 after the PR has been reviewed.
You can assign the PR to them by writing /assign @infernus01 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@anithapriyanatarajan anithapriyanatarajan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address the points captured across the doc

Spells out what Chains actually trusts, since that decides what a signed
attestation proves: Chains is a post-execution observer, so the boundary is
whoever may write TaskRun status, and the results that become provenance
subjects are whatever the Task wrote. Covers the rule in this repo's own
ClusterRole, why storage.oci.repository is security-critical in a multi-tenant
cluster and where sigstore-bundle mode ignores it, and the limit of a SLSA
Build L1-L2 style claim: the platform is attested, the content is not verified.

Fixes tektoncd#1661

Signed-off-by: Paolo Valle <paovalletta@hotmail.it>
Assisted-by: deepseek-v4.1-flash (via pi)
@paoValle

paoValle commented Dec 3, 2026

Copy link
Copy Markdown
Author

Rebased on c5a86af.

The status is one provenance input now, with the run spec and resolver provenance beside it. The RBAC section separates what the role grants from what the controller does: status is read, never written, and what Chains writes are its own chains.tekton.dev/ annotations and finalizers, so the status verbs become a least-privilege follow-up. The OCI section says the credential is the build's own ServiceAccount, so a signing identity the build cannot use does not exist today and the separation holds on the destination only. SLSA points at the v1.2 Build track and says L2 needs a hosted platform that signs plus consumers who verify: evidence, not a certification.

The status is one provenance input, not the boundary on its own: the run spec and
the resolver's provenance are signed too, so the doc names all four parts of the
trust set.

It also separates what the ClusterRole grants from what the controller does:
Chains reads the status and never writes it, and what it writes are its own
chains.tekton.dev annotations and finalizers, so the status verbs are a
least-privilege follow-up rather than a requirement.

The OCI section states how the destination and the credentials are chosen, and
that the credential comes from the TaskRun's ServiceAccount, which is the build's
own, so a signing identity the build cannot use does not exist today and the
separation only holds on the destination.

The SLSA section moves to the v1.2 Build track and stops implying that signed
provenance is Build L2.

Signed-off-by: Paolo Valle <paovalletta@hotmail.it>
Assisted-by: deepseek-v4.1-flash (via pi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Chains trust model for multi-tenant deployments

3 participants