fkirc / skip-duplicate-actions

Save time and cost when using GitHub Actions
Other
436 stars 39 forks source link

GITHUB_TOKEN permissions used by this action #233

Closed step-security-bot closed 2 years ago

step-security-bot commented 2 years ago

At https://github.com/step-security/secure-workflows we are building a knowledge-base (KB) of GITHUB_TOKEN permissions needed by different GitHub Actions. When developers try to set minimum token permissions for their workflows, they can use this knowledge-base instead of trying to research permissions needed by each GitHub Action they use.

Below you can see the KB of your GITHUB Action.

name: 'Skip Duplicate Actions'
github-token:
  action-input:
    input: github_token
    is-default: true
  permissions:
    actions: write
    actions-reason: to skip or stop workflow runs
    contents: read
    contents-reason: to read and compare commits
#Reference: https://github.com/fkirc/skip-duplicate-actions/blob/e52e4a1ead5652ebbde4f2d14c71b6d9b694e1ad/README.md?plain=1#L236

If you think this information is not accurate, or if in the future your GitHub Action starts using a different set of permissions, please create an issue at https://github.com/step-security/secure-workflows/issues to let us know.

This issue is automatically created by our analysis bot, feel free to close after reading :)

References:

GitHub asks users to define workflow permissions, see https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ and https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token for securing GitHub workflows against supply-chain attacks.

Setting minimum token permissions is also checked for by Open Source Security Foundation (OpenSSF) Scorecards. Scorecards recommend using https://github.com/step-security/secure-workflows so developers can fix this issue in an easier manner.

paescuj commented 2 years ago

LGTM!