Skip to content

fix(verification): reject symlinked source parent directories - #248

Draft
LIghtJUNction wants to merge 1 commit into
mainfrom
fix/source-fingerprint-symlink-parents
Draft

LIghtJUNction wants to merge 1 commit into
mainfrom
fix/source-fingerprint-symlink-parents

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Contributor

Problem

content_fingerprint records leaf symlinks without following them, but a tracked directory replaced by a symlink is still traversed when reading its tracked children. This can fingerprint files outside the checkout as verified source, contradicting the verifier's no-follow contract.

Change

  • Check parent components from the checkout outward before inspecting or reading a source entry.
  • Reject symlinked parents while preserving existing leaf-symlink recording and clean gitlink handling.
  • Add shallow/nested regressions that fail if file content is read, plus a real Git checkout regression for a tracked directory replaced by a symlink.

This is a static checkout guard, not a claim of race-proof traversal under concurrent hostile filesystem changes. No production access, credentials, deployment, or security settings changed.

Verification

  • Before fix: 2 new focused regression cases failed by observing external-file read attempts; 17 existing cases passed.
  • After fix: 49 standalone local-verification and CI-shard tests passed using Python 3.12, pytest --noconftest -c /dev/null tests/test_local_verification.py tests/test_ci_shards.py -q.
  • Ruff 0.16.9 check and format-check on both changed files passed.
  • Warnings-as-errors compilation of both changed files and git diff --check passed.
  • Full application tests were not run: this environment is Python 3.12, while MSG requires 3.15; repository conftest imports 3.15-only syntax. The standalone tooling tests do not need application fixtures.
  • Repository-wide Ruff/format remain blocked only by the existing deploy/check_home_seo.py issues already fixed independently in fix(ci): satisfy Python quality gate #247. This PR deliberately does not duplicate that change.

Base: a97c9c40f08bb19846166fc057a2ae0dff2a81e6. Full CI is pending; keep draft.

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