Skip to content

fix: reject symlinked originals in collection exports - #3

Open
c-mongan wants to merge 1 commit into
mainfrom
codex/2026-10-10-reject-linked-acquisition-originals
Open

c-mongan wants to merge 1 commit into
mainfrom
codex/2026-10-10-reject-linked-acquisition-originals

Conversation

@c-mongan

Copy link
Copy Markdown
Owner

Collection exports currently follow unregistered symlinks inside an acquisition folder, allowing an unrelated local file to be copied into the exported pack. Reject encountered file, directory, and dangling symlinks before copying originals, including supporting sources; failed exports leave no published destination.

Regression tests reproduce the previous behavior and cover ordinary portable exports plus the lightweight export path. Validation: PYTHONPATH=skills/sourcepack/scripts python3 -m unittest discover -s tests -v — 101 tests, OK, with two optional document-interpreter tests skipped. Independent code review and git diff --check passed.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 20:55

Copilot AI 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.

🟢 Approval recommended

The implementation addresses the data-exposure path and provides focused regression coverage.

0 open findings

What changed in this PR

Prevents collection exports from copying files through symlinks while preserving lightweight-export behavior.

Changes:

  • Rejects file, directory, and dangling symlinks before copying originals.
  • Adds regression coverage for primary, supporting-source, and lightweight exports.
File Description
skills/​sourcepack/​scripts/​sourcelens/​pack.py Rejects symlinked acquisition originals.
tests/​test_pack.py Covers symlink rejection and cleanup behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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