Skip to content

Commit

Permalink
add GitHub action running detect-secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Mercier committed Aug 27, 2024
1 parent 3aacfd6 commit 10dd682
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/detect-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: detect secrets

on: push

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "detect-secrets"
detect-secrets:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under ${{github.workspace}}, so your job can access it
- uses: actions/checkout@v4

- name: scan all the files (not just the ones committed), generate a report, and check that there are no actual or potential secret
run: |
docker run --pull=always -a stdout \
-v ${{github.workspace}}:/code \
--entrypoint /bin/sh \
icr.io/git-defenders/detect-secrets:0.13.1.ibm.61.dss-redhat-ubi \
-c "detect-secrets --version;
detect-secrets scan --all-files --exclude-files "^.git/.*" --update .secrets.baseline;
detect-secrets audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline"

0 comments on commit 10dd682

Please sign in to comment.