Repository navigation
fix(security): isolate bundle checkouts and verify Git history - #160
Merged
Merged
Conversation
Signed-off-by: rldyourmnd <danil@nddev.it.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Private security calls reuse a fixed implementation checkout; files left by an earlier invocation can prevent the exact workflow revision from checking out. Allocate a fresh directory per call and preserve the existing files. Materialize and verify the selected history before Gitleaks so missing partial-clone objects cannot yield an incomplete successful scan.
Type of change
Threat-model note
Implementation identity remains bound to the called workflow SHA. History hydration uses the existing read-only job token in process environment only, scoped to GitHub HTTPS; it is not written to the caller repository or passed on command arguments. Missing history fails before scanning. Selected ref-history/all-refs scope, scanner behavior, redacted evidence and runner routing are preserved.
Permissions diff
No permission changes: free bundle retains contents: read; paid bundle retains actions: read, contents: read and security-events: write; top-level permissions remain empty.
Validation
Actual YAML-step fixtures execute both variants twice with stale files, require distinct exact checkouts, preserve the stale sentinel and reject the old shared-directory control. Real partial-clone fixtures hydrate missing blobs and reject an unavailable promisor origin without persisting authorization. These focused checks, actionlint and pinned online zizmor 1.26.1 pass on macOS. All core validators pass against the exact published commit 9eb11c2 on the Ubuntu workstation. Touched-path validation is running separately; full scheduled link/calendar checks are advisory. macOS full validation encounters pre-existing fixture dependence on system tools.
Checklist
Tier impact