harden: this workflow uses secrets: inherit to pass a... in... - #804
harden: this workflow uses secrets: inherit to pass a... in...#804anupamme wants to merge 1 commit into
secrets: inherit to pass a... in...#804Conversation
…urity vulnerability Automated security fix generated by OrbisAI Security
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: anupamme 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 |
|
CLA Assistant Lite bot: You can retrigger this bot by commenting recheck in this Pull Request |
|
Hi @anupamme. Thanks for your PR. 😃 |
|
Hi @anupamme. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with 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/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR hardens a GitHub Actions workflow template by replacing broad File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary
Harden input handling in
workflow-templates/backup-to-gitlab.yml(flagged by semgrep).Vulnerability
yaml.github-actions.security.secrets-inherit.secrets-inheritworkflow-templates/backup-to-gitlab.yml:11Description: This workflow uses
secrets: inheritto pass all of the calling workflow's secrets to a reusable workflow. This violates the principle of least privilege because the called workflow receives access to every secret in the repository, not just the ones it needs. If the called workflow is compromised or sourced from a third party, an attacker gains access to all repository secrets. Instead, explicitly pass only the secrets that the called workflow requires using thesecrets:map, e.g.secrets: { MY_SECRET: ${{ secrets.MY_SECRET }} }.Changes
workflow-templates/backup-to-gitlab.ymlBehavior Preservation
The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.
This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.
Automated security fix by OrbisAI Security
Summary by Sourcery
Limit secrets passed to backup workflows to reduce unintended credential exposure.
Bug Fixes:
Enhancements: