ci(update-trivy-db): declare contents: read + actions: write#10335
ci(update-trivy-db): declare contents: read + actions: write#10335arpitjain099 wants to merge 1 commit into
Conversation
actions/cache/save@v5 writes the Trivy DB to the GHA cache, so the default GITHUB_TOKEN needs actions: write. The oras pull is anonymous. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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-sigs/prow repository. |
|
Welcome @arpitjain099! |
|
Hi @arpitjain099. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: arpitjain099 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 |
e68c052 to
bd3ffac
Compare
|
why do we need this change as we don't hit any failures. Why do we need the actions: write? |
Pins the default
GITHUB_TOKENonupdate-trivy-db.yamlto the minimum scope it actually uses:actions: writeforactions/cache/save@v5(the Trivy DB save path).contents: readis included for consistency, though the workflow has no checkout step.The
oras pullofghcr.io/aquasecurity/trivy-db:2is anonymous (public image). Hardens against the GitHub-side write surface.YAML validated locally with
yaml.safe_load.