Skip to content

πŸ”’ pin security.yml actions to commit SHAs #985

πŸ”’ pin security.yml actions to commit SHAs

πŸ”’ pin security.yml actions to commit SHAs #985

Workflow file for this run

name: Security Checks
on:
push:
permissions:
contents: read
jobs:
trufflehog:
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
if [ "$EVENT_NAME" == "push" ]; then
echo "depth=$(($(jq length <<< $COMMITS)+2))" >> $GITHUB_ENV
echo "branch=$REF" >> $GITHUB_ENV
fi
if [ "$EVENT_NAME" == "pull_request" ]; then
echo "depth=$(($PR_COMMITS+2))" >> $GITHUB_ENV
echo "branch=$PR_REF" >> $GITHUB_ENV
fi
env:
REF: ${{ github.ref_name }}
COMMITS: ${{ tojson(github.event.commits) }}
EVENT_NAME: ${{ github.event_name }}
PR_REF: ${{ github.event.pull_request.head.ref }}
PR_COMMITS: ${{ github.event.pull_request.commits }}
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{env.branch}}
fetch-depth: ${{env.depth}}
- name: Scan for secrets
uses: trufflesecurity/trufflehog@6bd2d14f7a4bc1e569fa3550efa7ec632a4fa67b # main