Skip to content

Test

Test #19

Workflow file for this run

# name: "Find Secrets"
# on:
# pull_request:
# push:
# workflow_dispatch:
# # schedule:
# # - cron: "0 6 * * *"
# permissions:
# id-token: write
# contents: read
# actions: read
# security-events: write
# jobs:
# scan:
# name: gitleaks
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: gitleaks/[email protected]
# name: Check any Leaked Secrets
# with:
# args: detect --redact -v -f sarif -r ./gitleaks_scan.sarif
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITLEAKS_ENABLE_COMMENTS: 'true'
# GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
name: Gitleaks Scan
on: [push, pull_request]
jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Gitleaks
run: |
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.18.4/gitleaks_8.18.4_linux_x64.tar.gz | tar -xz -C /usr/local/bin gitleaks
- name: Run Gitleaks
run: |
gitleaks detect --redact -v --exit-code=2 --report-format=sarif --report-path=results.sarif --log-level=debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_COMMENTS: 'true'
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
- name: Upload SARIF report
if: always()
uses: actions/upload-artifact@v4
with:
name: gitleaks-sarif-report.sarif
path: results.sarif