Skip to content

Commit

Permalink
Add secrets scanning workflow (#631)
Browse files Browse the repository at this point in the history
feat(security): add secrets scanning workflow
  • Loading branch information
mfuntowicz authored Jun 14, 2024
1 parent e15c2ce commit b86b48f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Security Checks

on:
push:

permissions:
contents: read

jobs:
secrets:
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "depth=$((${{ github.event.pull_request.commits }}+2))" >> $GITHUB_ENV
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{env.branch}}
fetch-depth: ${{env.depth}}
- name: Scan for secrets
uses: trufflesecurity/trufflehog@main

0 comments on commit b86b48f

Please sign in to comment.