ci: vendor gitleaks-action on Forgejo so uses: no longer resolves to GitHub #27
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!27
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/vendor-gitleaks-action-on-forgejo"
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?
CI's security scan resolved
uses: https://github.com/trails-cool/gitleaks-action@<sha>, so "GitHub is retired" was not literally true — every run fetched an action from a host we had otherwise stopped depending on. If that repo or GitHub went away, Security Scan would fail on every PR.What changed
Migrated the fork to
git.ullrich.is/trails-cool/gitleaks-actionas a one-time copy, not a pull-mirror. A mirror would have kept the GitHub coupling alive behind a sync job, which defeats the point.The pinned SHA is unchanged. A git migration preserves commit IDs, so
4cbc857bresolves to the same object, same commit message, same 5.2MBdist/index.js. This is a pure hosting change — the action's bytes are identical to what CI ran before this PR.Verified before switching the reference
trails-cool@4cbc857b,master@bf2dc8e5dist/index.jsat that SHAaction.ymlat that SHAgit-upload-packThat last one mattered most: the action is fetched by the runner, so if the new repo needed auth the job would fail in a way that looks like a bad
uses:reference.The finding worth acting on separately
The fork's entire delta over upstream
gitleaks/gitleaks-actionis two commits:merge_groupis a GitHub merge-queue event. Forgejo has no merge queue (#25), andci.ymlhas never used amerge_grouptrigger. So the only reason this fork exists is obsolete, and it is 8 commits behind upstream.Rebasing onto current upstream and dropping the patch would let us track upstream cleanly. That is deliberately not in this PR: changing the host and the content together would mean a CI failure could not be attributed to either. This PR changes one variable.
Note that dropping the fork entirely in favour of
gitleaks/gitleaks-actionwould not have solved the original problem — upstream is also GitHub-hosted. Vendoring was the only route that removes the dependency.How this PR proves itself
The
CI / Security Scancheck on this very PR is the test: it is the job that resolves theuses:line. If it goes green, the vendored action fetched and ran from Forgejo.6beacbd022c461940fd7ci: vendor gitleaks-action on Forgejo, removing CI's last GitHub dependencyto ci: vendor gitleaks-action on Forgejo souses:no longer resolves to GitHubCorrection: this does not remove CI's last GitHub dependency
I titled this PR "removing CI's last GitHub dependency". That was wrong, and the job log I pulled to verify the change is what disproved it.
What the change does do — confirmed from the
Security Scanjob log (run 107, job 553):git.***isgit.ullrich.ismasked (ullrich.isis theBROUTER_DEPLOY_HOSTsecret value;github.comrenders unmasked in the same log, so it cannot be that). And the scan genuinely ran rather than silently skipping — gitleaks 8.24.3,1 commits scanned,no leaks found,✅ No leaks detected. A green tick alone would not have shown either of those.What remains. Every
github.comrequest in that one job:actions/checkoutresolves throughFORGEJO__actions__DEFAULT_ACTIONS_URL=github— in every job, not just this oneSo if GitHub disappeared, CI would still break. What this PR fixes is narrower and still worth having:
uses:no longer depends on a fork in an org we retired, which was the single-repo failure point.Both remaining dependencies are now documented inline next to the step instead of left implied, and the commit message and the vendored repo's own description have been corrected — the description also claimed CI had "no GitHub dependency".
Removing them properly means hosting the gitleaks binary somewhere we control and mirroring the shared
actions/*. That is real work with its own tradeoffs (pinning, update flow), not something to smuggle into this PR. Happy to open an issue for it.Force-pushed
6beacbd→c461940; the only content change is the corrected comment block, so CI is re-running.