Files

39 lines
1.0 KiB
YAML

name: Secret Scan
on:
workflow_dispatch:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
permissions:
contents: read
env:
GITLEAKS_VERSION: 8.24.3
jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Gitleaks
run: |
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" -o gitleaks.tar.gz
tar -xzf gitleaks.tar.gz gitleaks
sudo install -m 0755 gitleaks /usr/local/bin/gitleaks
gitleaks version
- name: Run Gitleaks directory scan
run: gitleaks detect --source . --no-git --redact --config .gitleaks.toml --exit-code 1
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Check for operator-specific path fingerprints
run: bash scripts/check-no-sensitive-paths.sh