Add secret scanning for commits and Forgejo Actions #1
Labels
No labels
app-migration
bug
ci-cd
cluster
Documentation
duplicate
enhancement
gpu
invalid
networking
question
security
Storage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Homelab/workflows#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Add automated secret detection suitable for a public repository. Local checks and Forgejo Actions should catch common credentials and private material before or immediately after they enter repository history.
Scope
Acceptance criteria
Dependencies / blockers
Requires an available Linux Forgejo runner. This control should be established before secret-bearing deployment integrations are added.
Initial implementation is in PR #6: a callable Gitleaks workflow scans full fetched Git history and the working tree, redacts findings, and fails on findings, scanner errors or an unexpected tool version. Local invocation and rotation/exception guidance are included.
YAML/Bash validation and mocked gate-control tests passed. Real Gitleaks history/working-tree scans and synthetic detection on the selected runner are still required, so this issue remains open. Runner activation and cross-repository access are tracked in #3; broader scanning in #4.
Progress update: PR #12 adds the workflows repository's trusted self-scan caller. It targets pull requests, pushes to main, manual runs, and a weekly schedule while pinning the evaluated implementation to v1.1.0. The PR run has expanded into the released reusable workflow and is queued on the ci runner.
The Gitleaks gate, narrow mitigation format, and exposed-credential rotation procedure are implemented and documented. I am leaving the initial repository pass and safe synthetic live failure unchecked until Forgejo supplies direct run evidence; the issue remains open.
Initial repository acceptance is now complete. PR #12 run 36 scanned the complete fetched history and working tree with the released v1.1.0 gate. The first run surfaced five Semgrep network audit warnings; each was reviewed and constrained by an exact expiring mitigation, and the corrected run passed with 0 unmitigated findings and 0 scanner errors.
The push criterion remains unchecked until the workflow is merged and the main-branch run succeeds. The safe synthetic failure criterion also remains open for a dedicated live negative run.
Checked the push/pull-request execution criterion: the trusted self-scan is merged and now uses v1.2.1 through #16. PR scan 59 and main push scan 61 both succeeded. The owner also confirmed required scanner status checks are configured on main.
This issue is now 4/5. The remaining task is the dedicated safe synthetic-secret negative run on the live Forgejo runner, with evidence that detection fails the gate without committing a real credential. Earlier local fixtures do not replace that live acceptance test.
The final acceptance criterion is now verified live. Run 63 from #17 executed the exact secret-scan step from the pinned v1.2.1 release using Gitleaks 8.30.1. It accepted clean history/tree, returned failure for a runtime-generated nonfunctional credential-shaped value in the working tree, and still returned failure after that synthetic value was committed and then deleted in a disposable local Git history. The tree was confirmed clean in the history-only case. Console output and JSON reports were checked for redaction.
Missing Gitleaks and an unexpected version also failed closed. All 12 acceptance cases passed and a sanitized summary artifact was retained. No real credential was committed or used; fixtures were temporary inside the runner job. Checklist: 5/5. #17 preserves the reusable acceptance suite for review and merge.
Closing as complete
kiyi referenced this issue2026-10-12 00:00:08 -05:00