You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: Fail closed when .agents or .codex itself is a dangling or looping link #1479
The Codex reviewer disables every skill under the reviewed checkout's .agents/skills and .codex/skills before launch. Since the fix for #1107, every link at or under those two skill roots is resolved strictly, so a dangling or looping link fails the Codex attempt.
The parent directories .agents and .codex are not checked the same way. The scan tests os.path.lexists(<root>/skills), and that returns false when .agents or .codex is itself a dangling or looping link. The root is then skipped, and Codex starts with no disable entries for it.
When this matters: only if the link target exists inside the review sandbox but not on the host. The sandbox exposes host paths read-only plus a private HOME that holds only runner files, so no PR-selected skill is known to be reachable this way, and a looping link fails the same way for Codex. This is hardening, not a known exploit.
Fix: walk the components .agents/.codex and then skills with lstat. Skip a component that is genuinely absent; resolve every existing component strictly and check that it stays inside the checkout before descending.
Acceptance:
A dangling or looping link at .agents or .codex fails the Codex attempt before any Codex call. Extend test_codex_skill_lists_it_cannot_disable_fail_before_any_codex_call to cover both parent paths.
Optional, from the same review: the argv test covers a SKILL.md that is itself a link to an in-checkout file with a different name, and asserts the disable entry names the resolved target.
Activity
Merge the landed #1432 implementation for #1479