Skip to content

Harden local Git revision handling in triage and fix verification - #21

Open
manuelconcari-ai wants to merge 2 commits into
hackenproof-public:mainfrom
manuelconcari-ai:codex/safe-local-git-revisions
Open

manuelconcari-ai wants to merge 2 commits into
hackenproof-public:mainfrom
manuelconcari-ai:codex/safe-local-git-revisions

Conversation

@manuelconcari-ai

Copy link
Copy Markdown

Local triage examples pass a submitted revision to git show, while related guidance uses git log and git diff without defining safe argument handling. In local fixtures, an option-shaped value such as --output=... changed Git's behavior even when passed as a single argument.

This change adds instructions to the bulk-triage, single-report triage, and fix-verifier skills, with two references/safe-local-git.md files covering literal argument passing, exact ref lookup, unambiguous commit resolution, and reads using only resolved object IDs. It requires Git 2.45 or newer, disables lazy fetching throughout validation and reads, and distinguishes invalid identifiers from unavailable local verification.

Validation: the patch changes five Markdown files and applies cleanly to current main. Local Git fixtures cover option parsing, shell expansion, colliding object prefixes, ref-name fallback, object types, and partial-clone behavior, with resolution checks on SHA-1 and SHA-256 repositories.

This is instruction hardening. The tests establish Git behavior and patch applicability; they do not demonstrate exploitation through a deployed agent, permission bypass, or deterministic compliance by a model. No executable helper or runtime permission change is included.

Zero matches from object enumeration, and an absent exact ref, establish only
local absence. Shallow, single-branch, partial and outdated clones all lack
objects that exist upstream, and no local command separates that from an
invented identifier: in a local test a valid upstream commit was missing from
each of those three clone shapes, with no promisor remote configured.

Both reference files now say so in the resolution steps, split the decision
accordingly, and keep only identifier-visible defects on the reporter's side:
shape failures, an abbreviation matching two or more objects, a name that
exists as both a tag and a branch, and objects that are not commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant