File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -49,31 +49,20 @@ jobs:
4949 # -Dsonar.host.url=https://sonarcloud.io
5050 # -Dsonar.login=${{ secrets.SONAR_TOKEN }}
5151
52- - name : Install TruffleHog CLI
53- run : |
54- echo "Installing TruffleHog CLI..."
55- wget https://github.com/trufflesecurity/trufflehog/releases/download/v3.90.11/trufflehog_3.90.11_linux_amd64.tar.gz -O trufflehog.tar.gz
56- tar -xvf trufflehog.tar.gz
57- chmod +x trufflehog
58- mkdir -p ~/.local/bin
59- mv trufflehog ~/.local/bin/
60- echo "$HOME/.local/bin" >> $GITHUB_PATH
61- trufflehog --version
62-
6352 - name : Run TruffleHog Secret Scan
6453 run : |
6554 echo "Running TruffleHog secret scan..."
6655 trufflehog filesystem . > scan_output.log 2>&1 || true
6756
68- if grep -q "verified_secrets\":0" scan_output.log && ! grep -q "verified_secrets\" : [1-9]" scan_output.log; then
69- echo "No secrets found. Proceeding to next stage..."
70- else
57+ # Check for secrets
58+ if grep -q "Secrets detected!" scan_output.log; then
7159 echo "Secrets detected! Please remove hardcoded credentials or API keys."
7260 cat scan_output.log
7361 exit 1
62+ else
63+ echo "No secrets found. Proceeding to next stage..."
7464 fi
7565
76-
7766 # Snyk Scan - SCA
7867 # - name: Download Snyk CLI
7968 # run: |
You can’t perform that action at this time.
0 commit comments