Skip to content

Commit 8217525

Browse files
Update maven-publish.yml
1 parent b0b49eb commit 8217525

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

.github/workflows/maven-publish.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff 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: |

0 commit comments

Comments
 (0)