Skip to content

Commit 5db5593

Browse files
Remove redundant custom GitHub check creation
- Eliminates duplicate check runs that cause 'No check run found' errors - Workflow job status already provides all necessary information - Prevents confusion between automatic job checks and custom checks - Fixes check run ID mismatch issues when clicking on status checks
1 parent 579ff54 commit 5db5593

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

.github/workflows/reusable-trufflehog.yml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -276,47 +276,6 @@ jobs:
276276
${{ steps.comment-body.outputs.body }}
277277
<!-- trufflehog-secret-scan-comment -->
278278
279-
- name: Create GitHub status check with scan summary (pass/fail)
280-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
281-
env:
282-
VERIFIED_COUNT: ${{ steps.scan.outputs.verified }}
283-
UNVERIFIED_COUNT: ${{ steps.scan.outputs.unverified }}
284-
TOTAL_COUNT: ${{ steps.scan.outputs.total }}
285-
FAIL_ON_VERIFIED: ${{ inputs.fail-on-verified }}
286-
FAIL_ON_UNVERIFIED: ${{ inputs.fail-on-unverified }}
287-
SCAN_TYPE: ${{ inputs.scan-type }}
288-
SCAN_SCOPE: ${{ inputs.scan-scope }}
289-
TRUFFLEHOG_VERSION: ${{ inputs.trufflehog-version }}
290-
with:
291-
github-token: ${{ github.token }}
292-
script: |
293-
const verified = parseInt(process.env.VERIFIED_COUNT || "0", 10);
294-
const unverified = parseInt(process.env.UNVERIFIED_COUNT || "0", 10);
295-
const total = parseInt(process.env.TOTAL_COUNT || "0", 10);
296-
297-
const shouldFail = (
298-
(process.env.FAIL_ON_VERIFIED === "true" && verified > 0) ||
299-
(process.env.FAIL_ON_UNVERIFIED === "true" && unverified > 0)
300-
);
301-
302-
const conclusion = shouldFail ? "failure" : "success";
303-
const title = total > 0
304-
? `Found ${total} potential secrets (${verified} verified, ${unverified} unverified)`
305-
: "No secrets detected";
306-
307-
await github.rest.checks.create({
308-
owner: context.repo.owner,
309-
repo: context.repo.repo,
310-
name: "TruffleHog Secret Scan",
311-
head_sha: context.sha,
312-
status: "completed",
313-
conclusion,
314-
output: {
315-
title,
316-
summary: "TruffleHog security scan completed",
317-
text: `Scan configuration:\n- Type: ${process.env.SCAN_TYPE}\n- Scope: ${process.env.SCAN_SCOPE}\n- Version: ${process.env.TRUFFLEHOG_VERSION || process.env.DEFAULT_VERSION}\n\nResults: ${title}`
318-
}
319-
});
320279
321280
- name: Create TruffleHog scan artifact
322281
env:

0 commit comments

Comments
 (0)