Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: TruffleHog Secret Scan

on:
pull_request:
branches:
- main

push:
branches:
- main

schedule:
# Every Sunday at 02:00 UTC
- cron: "0 2 * * 0"

permissions:
contents: read

jobs:
trufflehog:
name: Scan for Secrets
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Required so TruffleHog can inspect git history
fetch-depth: 0

#
# Pull Request
#
- name: Scan Pull Request changes
if: github.event_name == 'pull_request'
uses: trufflesecurity/trufflehog@main
with:
base: ${{ github.event.pull_request.base.sha }}
head: ${{ github.event.pull_request.head.sha }}

#
# Push to main
#
- name: Scan new commits on main
if: github.event_name == 'push'
uses: trufflesecurity/trufflehog@main
with:
base: ${{ github.event.before }}
head: ${{ github.sha }}

#
# Scheduled full repository scan
#
- name: Full repository scan
if: github.event_name == 'schedule'
uses: trufflesecurity/trufflehog@main

Loading