Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new audit: detect secrets: inherit in reusable workflows #360

Closed
woodruffw opened this issue Dec 26, 2024 · 1 comment
Closed

new audit: detect secrets: inherit in reusable workflows #360

woodruffw opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
new-audit New audits

Comments

@woodruffw
Copy link
Owner

Reusable workflows can be called with secrets: inherit, in which case they inherit the entire secrets namespace instead of a specific set of secrets explicitly forwarded to them. This violates the principle of least authority.

For example:

jobs:
  call-workflow:
    uses: octo-org/example-repo/.github/workflows/called-workflow.yml@main
    secrets: inherit

should generally be:

jobs:
  call-workflow:
    uses: octo-org/example-repo/.github/workflows/called-workflow.yml@main
    secrets:
      # explicitly forward just special-secret
      special-secret: ${{ secrets.special-secret }}

This one is pretty low-severity, but good for us to flag.

@woodruffw woodruffw added the new-audit New audits label Dec 26, 2024
@woodruffw woodruffw self-assigned this Jan 8, 2025
@woodruffw
Copy link
Owner Author

Done with #408.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-audit New audits
Projects
None yet
Development

No branches or pull requests

1 participant