Skip to content

fix: refuse redirected checkout paths in release inventory - #410

Merged
drevendev merged 5 commits into
masterfrom
beautifulrepo/release-inventory-path-preflight-20261118
Nov 18, 2026
Merged

drevendev merged 5 commits into
masterfrom
beautifulrepo/release-inventory-path-preflight-20261118

Conversation

@drevendev

@drevendev drevendev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Outcome

Reject checkout paths that contain symlinks or Windows reparse points before the offline release-history inventory invokes Git. Git's -C follows a directory alias: a selected apparent checkout can therefore silently disclose another repository's commit subjects.

Changes

  • Preflight every lexical path component, including parents, on the requested path and the top-level checkout returned by Git. Ordinary directories, including a real .. route, remain valid.
  • Add black-box regressions for a symlinked selected checkout, a symlinked parent, and an ordinary .. path.
  • Re-sync the generated standalone draft-release-notes skill helper with canonical scripts/release_inventory.py (byte-identical blob at current head).
  • Record the bounded behavior in the existing Unreleased/Fixed section.

Evidence and limits

  • Reproduced the original alias behavior using a disposable local Git repository: git -C selected-alias log returned the synthetic outside repository's subject.
  • Ran a standalone four-case Python preflight test locally: 4/4 passed (ordinary directory, symlinked selected directory, symlinked parent, real ..).
  • Read back the modified source, tests and changelog from this branch.
  • Initial provider Quality CI on bcd60d1 failed 2 Python jobs because the required copied skill helper was stale (test_standalone_skill_preflight); repaired on d567315 by syncing the standalone copy. Current-head CI is newly running; do not inherit earlier PASS.
  • Full repository unit suite and python tools/docs_links.py not run locally: GitHub DNS is unavailable to this sandbox; await fresh provider CI on the exact PR head.
  • This is a point-in-time path guard, not a Git configuration sandbox, race-free filesystem boundary, or Claude/Codex model acceptance.

No release/tag, settings, license, public internal controls, external repo writes or spending. Separate later-run acceptance required.

@andy-zen-dev andy-zen-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact HEAD d5673152ce4be66fb0ea970384a00f89213097be against the four-file diff and current AGENTS.md/CONTRIBUTING.md.

The new ordinary_checkout_directory() checks each lexical path component from root to selected checkout using lstat() before the initial Git read, then rechecks the Git-reported top level; it rejects symlinks and Windows reparse points while retaining an ordinary .. path. The standalone skill helper has the same Git blob SHA as the canonical script (f3924a3ec6aa4e48debd96ccae4a19b076ed07a9). The three new subprocess regressions cover selected and parent symlink rejection and an ordinary .. success path. Changelog scope and limitations are explicit.

Exact-head GitHub Actions: Quality checks 6/6 jobs passed (Python 3.11, Python 3.14, Windows Python 3.14, two Action self-tests, Lint); standalone skills CLI copy trial passed. Reviewer-local execution: NOT_RUN. This is a point-in-time checkout-path preflight, not a race-proof filesystem sandbox, .git metadata audit, or hostile-Git-config isolation. No merge-blocking defect established within the scoped change.

@drevendev drevendev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later-run acceptance of exact HEAD d5673152ce4be66fb0ea970384a00f89213097be: re-read the four-file patch and the actual canonical/standalone helper source (matching blob f3924a3ec6aa4e48debd96ccae4a19b076ed07a9), checked the three path regressions and explicit limitations. The path guard runs before the first Git invocation and is re-applied to Git's returned repository root; no material blocking issue found in this scoped change. Fresh provider CI for this head: Quality checks 6/6 SUCCESS (including Windows, both Python versions and Action self-tests), standalone skills copy trial 1/1 SUCCESS. One independent APPROVED review and zero open review threads confirmed. Reviewer-local full test suite NOT_RUN; provider CI serves as runtime evidence. COMMENT is same-account evidence, not independent approval.

@drevendev
drevendev merged commit 4d74e84 into master Nov 18, 2026
7 checks passed
@drevendev
drevendev deleted the beautifulrepo/release-inventory-path-preflight-20261118 branch November 18, 2026 08:25
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.

2 participants