openrewrite / rewrite-github-actions

OpenRewrite recipes for performing GitHub action hygiene and migration tasks.
Apache License 2.0
9 stars 10 forks source link

[Security] Pin actions to SHA #74

Open yeikel opened 1 year ago

yeikel commented 1 year ago

For this to work, rewrite needs to integrate with the Github API to resolve the action tag

    steps:
      - name: Checkout
-     uses: actions/checkout@v3
+     uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3

See https://michaelheap.com/ensure-github-actions-pinned-sha/ Relevant : https://github.com/marketplace/actions/ensure-sha-pinned-actions

This recipe should be able to leverage #23 after it is implemented