Skip to content

byProduct and resolvedDependency name change in SLSA provenance - #2041

Open
ngelman1 wants to merge 1 commit into
tektoncd:mainfrom
ngelman1:step-name-in-byProducts
Open

ngelman1 wants to merge 1 commit into
tektoncd:mainfrom
ngelman1:step-name-in-byProducts

Conversation

@ngelman1

@ngelman1 ngelman1 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Changes

The v2alpha4 SLSA provenance formatter now produces more meaningful byProduct and resolvedDependencies resource descriptor names by:

  1. Including the step name as a path segment, so consumers can identify
    which step produced each result.
  2. Using the tekton.dev/pipelineTask label instead of the Kubernetes-
    generated TaskRun name, so the task identifier is stable across runs and
    matches what the Pipeline author defined.
  3. Resolved dependency names for pipeline tasks now include the task name instead of the generic "pipelineTask" string

For example, byProduct-

Before:

stepResults/{k8s-generated-TaskRun-name}/{resultName}
"name": "stepResults/my-pipeline-run-xk8f2-my-build/build-log"

After:

stepResults/{pipelineTaskLabel}/{stepName}/{resultName}
"name": "stepResults/my-build/build/build-log"

And for resolvedDependency:

Before:

"name": "pipelineTask"

After:

"name": "pipelineTask/my-clone-task"

Builds on #1461 which added object names to byProduct paths.

Tested on a kind cluster, testing gist for byProduct:
https://gist.github.com/ngelman1/89e96ec2ac78702da8bfcd2d0c9b55ba
results should show-

"name": "taskRunResults/my-build/build-output"
"name": "taskRunResults/my-test/test-status"

gist to test resolvedDependencies:
https://gist.github.com/ngelman1/ed4b146aaed306831aeea75c3761dfa2
results should show-
"name": "pipelineTask/my-clone-task",

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

Improved byProduct and resolvedDependency naming in SLSA v2alpha4 provenance: step results now include the step name (`stepResults/{pipelineTask}/{stepName}/{resultName}`) and all byProducts use the `tekton.dev/pipelineTask` label and resolvedDependency now include task name.

@tekton-robot
tekton-robot requested review from enarha and jkhelil October 8, 2026 12:54
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.67%. Comparing base (7f54380) to head (a88f937).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2041      +/-   ##
==========================================
+ Coverage   72.55%   79.67%   +7.12%     
==========================================
  Files          58       58              
  Lines        3855     3405     -450     
==========================================
- Hits         2797     2713      -84     
+ Misses        764      690      -74     
+ Partials      294        2     -292     
Flag Coverage Δ
unit-tests 79.67% <ø> (+7.12%) ⬆️

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.

@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from 324b672 to 11abad1 Compare October 8, 2026 14:51
@jkhelil

jkhelil commented Oct 20, 2026

Copy link
Copy Markdown
Member

/retest

@jkhelil

jkhelil commented Oct 20, 2026

Copy link
Copy Markdown
Member

@ngelman1 can you check why tests are not passing please ?

@ngelman1

Copy link
Copy Markdown
Contributor Author

According to logs looks like http mistamch with registry server:

> http: server gave HTTP response to HTTPS client
but I see in all new PRs CI is failing due to this

@jkhelil jkhelil left a comment

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.

@ngelman1
All e2e-tests matrix jobs fail on:
TestExamples/pipelinerun-no-repeated-subjects-v2alpha4/.../pipeline-with-repeated-results.yaml

can you update the e2e with expected byProduct names

@jkhelil jkhelil left a comment •

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.

@ngelman1 regarding this

Identify the name of the pipelineTask/pipelineRun/taskRun/Step using the remote resource (Pipeline, Task, StepAction) in the resolved dependencies and byProducts. This will help with completeness.

from #1160

there is still a gap in this PR on
Resolved dependencies
Remote Pipeline / Task / StepAction entries should clearly name who used them (pipelineTask, Step, etc.) in resolved dependencies

You have added only to byProduct but you need also to refernce remote names in resolved dependencies
there should be a correlation
byProduct: stepResults/produce-results/write-log/build-log
↔
resolvedDependency for the remote StepAction/Task that produced it

@jkhelil jkhelil left a comment

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.

@ngelman1 can you add to PR description any gist file or example for a reproducer for anyone wants to play this PR

@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from 11abad1 to 1cd02ad Compare October 20, 2026 14:24
@ngelman1

ngelman1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

You have added only to byProduct but you need also to refernce remote names in resolved dependencies

@jkhelil Yes of course it will be added, I just wanted to separate the prs in order to keep it small and easier to review, will be same format

**update- I added all resolvedDependency changes to this pr

@ngelman1
ngelman1 requested a review from jkhelil October 21, 2026 09:22
@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from 1cd02ad to 046c013 Compare October 25, 2026 14:34
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 25, 2026
@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from 046c013 to cbb19e9 Compare October 25, 2026 14:58
@ngelman1 ngelman1 changed the title byProduct name change in SLSA provenance byProduct and resolvedDependency name change in SLSA provenance Oct 25, 2026
@ngelman1
ngelman1 marked this pull request as draft October 25, 2026 15:33
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2026
@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from cbb19e9 to 203e48c Compare October 26, 2026 09:59
@ngelman1
ngelman1 marked this pull request as ready for review October 26, 2026 12:19
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 26, 2026

@jkhelil jkhelil left a comment

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.

Please review your commit message to best fit the changes

Comment thread docs/predicate/slsa/v2.md Resolved
Comment thread docs/slsa-provenance.md Resolved
Include stable pipeline task and step names in byProducts, and name
resolved dependencies by the pipeline task that uses them.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Naomi Gelman <ngelman@redhat.com>
@ngelman1
ngelman1 force-pushed the step-name-in-byProducts branch from 203e48c to a88f937 Compare October 29, 2026 10:23
@jkhelil

jkhelil commented Oct 29, 2026

Copy link
Copy Markdown
Member

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2026
@jkhelil

jkhelil commented Oct 29, 2026

Copy link
Copy Markdown
Member

/approve cancel

@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 anithapriyanatarajan after the PR has been reviewed.
You can assign the PR to them by writing /assign @anithapriyanatarajan 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

@tekton-robot tekton-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2026
@jkhelil

jkhelil commented Oct 29, 2026

Copy link
Copy Markdown
Member

lgtm

@jkhelil jkhelil left a comment

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. 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.

3 participants