Skip to content

Merge pull request #43 from aws-samples/dependabot/github_actions/git… #13

Merge pull request #43 from aws-samples/dependabot/github_actions/git…

Merge pull request #43 from aws-samples/dependabot/github_actions/git… #13

name: Lockdown untrusted workflows
# PROCESS
#
# 1. Scans for any external GitHub Action being used without version pinning (@<commit-sha> vs @v3)
# 2. Scans for insecure practices for inline bash scripts (shellcheck)
# 3. Fail CI and prevent PRs to be merged if any malpractice is found
# USAGE
#
# Always triggered on new PR, PR changes and PR merge.
on:
push:
paths:
- ".github/workflows/**"
pull_request:
paths:
- ".github/workflows/**"
permissions:
contents: read
jobs:
enforce_pinned_workflows:
name: Harden Security
if: github.repository_owner == 'aws-samples'
runs-on: ubuntu-latest
permissions:
contents: read # checkout code and subsequently GitHub action workflows
steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Ensure 3rd party workflows have SHA pinned
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@b8f9a25a51fe633d9215ac7734854dc11cd299cb # v3.0.13