Skip to content

Capture step information inrecipe.arguments for in-toto/slsa Provenance #272

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
pxp928:feature-provenance
Nov 9, 2021
Merged

Capture step information inrecipe.arguments for in-toto/slsa Provenance #272
tekton-robot merged 1 commit into
tektoncd:mainfrom
pxp928:feature-provenance

Conversation

@pxp928

@pxp928 pxp928 commented Oct 27, 2021

Copy link
Copy Markdown
Member

POC for #271 for adding further detail into the environment for each step within a taksrun. (https://slsa.dev/provenance/v0.1)

"recipe": { "type": "<URI>", "definedInMaterial": /* integer */, "entryPoint": "<STRING>", "arguments": { /* object */ }, "environment": { /* object */ }

This added information would provide more information for each step within the taskrun and capture proper entrypoints for each step. This update would allow for better verfication viain-toto verify in the future.

@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 27, 2021
@tekton-robot tekton-robot requested review from font and mpeters October 27, 2021 15:05
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 27, 2021
@tekton-robot

Copy link
Copy Markdown

Hi @pxp928. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pxp928 pxp928 changed the title WIP Capture step information for in-toto/salsa Provenance WIP Capture step information for in-toto/slsa Provenance Oct 27, 2021

@priyawadhwa priyawadhwa 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.

If the step in the tekton-provenance format meets your needs, you could probably just make this function public and call it to get the steps for the TaskRun :)

func recipe(tr *v1beta1.TaskRun) provenance.ProvenanceRecipe {

You may have to refactor a little to return Steps instead of ProvenanceRecipe!

@pxp928

pxp928 commented Oct 28, 2021

Copy link
Copy Markdown
Member Author

If the step in the tekton-provenance format meets your needs, you could probably just make this function public and call it to get the steps for the TaskRun :)

func recipe(tr *v1beta1.TaskRun) provenance.ProvenanceRecipe {

You may have to refactor a little to return Steps instead of ProvenanceRecipe!

Thanks for the feedback Priya. I will work on this today.

@pxp928 pxp928 force-pushed the feature-provenance branch from bfb5fac to 45ea717 Compare October 29, 2021 13:10
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 29, 2021
@pxp928

pxp928 commented Oct 29, 2021

Copy link
Copy Markdown
Member Author

Updated to use Recipe from provenance.go. Updated unit tests based on the change in output to include step information.

@pxp928 pxp928 requested a review from priyawadhwa October 29, 2021 13:12

@priyawadhwa priyawadhwa 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.

Looks good! just one comment. I'll run tests as well!

Comment thread pkg/chains/formats/provenance/provenance.go Outdated
@priyawadhwa

Copy link
Copy Markdown
Contributor

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 29, 2021
@priyawadhwa priyawadhwa changed the title WIP Capture step information for in-toto/slsa Provenance Capture step information inrecipe.arguments for in-toto/slsa Provenance Oct 29, 2021
@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 29, 2021
@pxp928 pxp928 force-pushed the feature-provenance branch from 45ea717 to c4f47f3 Compare October 29, 2021 14:21
@priyawadhwa

Copy link
Copy Markdown
Contributor

Hey @pxp928 looks like our integration test for the in-toto attestations is failing. You'll need to update our test file with the expected output now that recipe.arguments is included here

@pxp928

pxp928 commented Nov 2, 2021

Copy link
Copy Markdown
Member Author

Hey @pxp928 looks like our integration test for the in-toto attestations is failing. You'll need to update our test file with the expected output now that recipe.arguments is included here

Thanks Priya! I will fix this issue and get it submitted.

@pxp928 pxp928 force-pushed the feature-provenance branch 5 times, most recently from dc2ac43 to fa014cc Compare November 4, 2021 15:27
@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 Nov 4, 2021
@pxp928 pxp928 force-pushed the feature-provenance branch 3 times, most recently from 5cc5599 to e6ba629 Compare November 4, 2021 17:08
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 4, 2021
@pxp928 pxp928 force-pushed the feature-provenance branch from e6ba629 to 0c01479 Compare November 4, 2021 17:33
@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 Nov 4, 2021
@pxp928 pxp928 force-pushed the feature-provenance branch from 0c01479 to 004bb86 Compare November 4, 2021 20:33
@pxp928 pxp928 requested a review from priyawadhwa November 4, 2021 20:59

@priyawadhwa priyawadhwa 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.

amazing, lgtm!

@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: priyawadhwa

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2021
@priyawadhwa

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2021
@tekton-robot tekton-robot merged commit 6562627 into tektoncd:main Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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