Skip to content
name: detect secrets
on: [push, pull_request]
# 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
# do that scan
- name: scan, report, and fail the check if there is a potential secret that was not audited (discarded)
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 --update .secrets.baseline;
detect-secrets audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline"