Skip to content

Commit

Permalink
Merge pull request #331 from rashley-iqt/new-workflows
Browse files Browse the repository at this point in the history
added secrets scanning to pre-commit
  • Loading branch information
rashley-iqt authored Feb 1, 2024
2 parents 20c8e21 + 3eecee8 commit ffe637d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/secrets-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,4 @@ jobs:
uses: actions/checkout@v4
- name: Scan for secrets
id: scan
uses: IQTLabs/workflows/secret-scan

- name: Fail if found
if: steps.scan.outputs.verified-secrets != 0
uses: actions/github-script@v6
with:
script: |
core.info(`Number of verified secrets: ${{steps.scan.outputs.verified-secrets}}`)
core.info(`Number of unverified secrets: ${{steps.scan.outputs.unverified-secrets}}`)
core.setFailed('Secrets found. Please check the uploaded report')
uses: IQTLabs/workflows/secret-scan@main
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ repos:
rev: v1.1.327
hooks:
- id: pyright
- repo: local
hooks:
- id: trufflehog
name: trufflehog
entry: bash -c 'docker run --rm -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --only-verified --fail'
language: system
stages: ["commit", "push"]

0 comments on commit ffe637d

Please sign in to comment.