ci: run zizmor on GitHub Actions and fix security findings - #5067
ci: run zizmor on GitHub Actions and fix security findings#5067mayankdev-oss wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/kind cleanup |
6e90f05 to
2a99a93
Compare
AlanGreene
left a comment
There was a problem hiding this comment.
Thanks for the PR @mayankdev-oss.
The description mentions a new zizmor workflow but it looks like this hasn't been included in the change. Feel free to add it to a separate PR if you prefer.
While most of the template injection risks were false positives there's no harm in moving these to environment variables for consistency and to avoid future issues. There's also some opportunity for further cleanup / simplification, I've left a few comments.
Can you also update the commit message to include a description of the change / reason? Something similar to what you've added in the PR description is fine.
Let me know if you have any questions.
Fixes tektoncd#4844 This addresses security vulnerability warnings flagged by zizmor...
2a99a93 to
8b11e78
Compare
|
@AlanGreene Thanks for the feedback! I've updated the workflows to use the shorter variable names and standard GitHub environment variables as requested. I also amended the commit message to include the context. The updates have been force-pushed—let me know if everything looks good to go now! |
|
@AlanGreene I updated the environment variables and commit messages last week based on your feedback. Let me know if this looks good to go or if you need anything else before running the workflows. |
|
Thanks for the updates @mayankdev-oss. I'm currently working on fixing an unrelated issue with the nightly build. Once that's resolved and we have a green build again I'll review this PR for any additional changes but from a quick look now it should be ok. |
|
@mayankdev-oss: PR needs rebase. DetailsInstructions 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. |
AlanGreene
left a comment
There was a problem hiding this comment.
@mayankdev-oss can you please rebase this and squash your commits?
| echo "::group::Following Tekton Chains controller logs for 3 minutes…" | ||
| timeout 180 kubectl logs deploy/tekton-chains-controller -n tekton-chains -f || echo "Log follow completed after 3 minutes" | ||
| echo "::endgroup::" | ||
| echo "::endgroup::" No newline at end of file |
There was a problem hiding this comment.
nit: restore the newline at end of file
Fixes #4844
Changes
This PR integrates the
zizmorstatic analyzer as a CI check to harden our GitHub Actions workflows and resolves the immediate security vulnerabilities flagged by the tool.Specifically, it:
.github/workflows/zizmor.yamlCI workflow to continuously scan and upload SARIF results to GitHub Advanced Security.persist-credentials: falseintoactions/checkoutsteps across multiple workflows).publish.ymlby moving context variables safely out of therun:execution block and into the step'senv:mapping.Note: As requested in the original issue description, I have intentionally left the
secrets-inheritwarnings inchatops-retest.ymlandslash.ymluntouched. I will file a separate follow-up issue to handle those broader architectural changes once this baseline is merged.Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes