Skip to content

Commit 18125ff

Browse files
committed
modified secret scanning
1 parent 0f4cacf commit 18125ff

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/devsecops-pipeline.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,23 @@ jobs:
155155
with:
156156
fetch-depth: 0 # Full history for secret scanning
157157

158-
- name: TruffleHog OSS
158+
- name: TruffleHog OSS (Git History Scan)
159+
id: trufflehog-git
159160
uses: trufflesecurity/trufflehog@main
160-
continue-on-error: true # Don't fail on first commit
161+
continue-on-error: true # Don't fail pipeline if BASE==HEAD or secrets found
161162
with:
162163
path: ./
163164
base: ${{ github.event.repository.default_branch }}
164165
head: HEAD
165-
extra_args: --debug --only-verified
166+
extra_args: --only-verified
166167

167-
- name: TruffleHog Filesystem Scan (fallback for single commits)
168-
if: failure() # Run if previous step failed
168+
- name: TruffleHog Filesystem Scan (Fallback)
169+
if: steps.trufflehog-git.outcome == 'failure'
169170
uses: trufflesecurity/trufflehog@main
171+
continue-on-error: true # Don't fail pipeline on secrets in filesystem scan
170172
with:
171173
path: ./
172-
extra_args: --only-verified
174+
extra_args: --only-verified --no-update
173175

174176
# Stage 8: Docker Build and Push
175177
docker-build:

0 commit comments

Comments
 (0)