Skip to content

fix(runtime): allow safe relative executable PATH entries - #408

Merged
mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/allow-safe-relative-path-entries
Aug 14, 2026
Merged

fix(runtime): allow safe relative executable PATH entries#408
mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/allow-safe-relative-path-entries

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Allow a user-selected relative executable search path when it resolves outside the scanned repository.

Changes

  • Resolve nonempty relative PATH entries through the existing canonical-path checks.
  • Continue excluding repository directories, repository-linked symlinks or junctions, empty entries, and unsafe executables.
  • Add a cross-platform regression covering a trusted relative entry alongside repository-local and repository-linked entries.

Testing

  • Confirmed the new regression failed before the production change.
  • bun test tests-ts/trusted-executable.test.ts tests-ts/targets.test.ts tests-ts/multiscan.test.ts tests-ts/bulk-scan-discovery.test.ts --timeout 30000 (71 passed; 1 Windows-only test skipped).
  • bun test tests-ts/runtime.test.ts --timeout 30000 (117 passed; 7 Windows-only tests skipped).
  • pnpm --pm-on-fail=ignore run types.
  • prettier --check src/trusted-executable.ts tests-ts/trusted-executable.test.ts.
  • git diff --check.

Risk and rollout

The resolved executable and inherited PATH remain canonical absolute paths outside the protected repository. Existing repository-shim, symlink, Windows extension, case-insensitive PATH, and credential-configuration protections are unchanged.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@github-actions github-actions Bot added the bug Something isn't working label Aug 14, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 1a1fb919ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1a1fb919ec

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 1dfb39b00b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1dfb39b00b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Relative executable search paths are canonicalized safely while repository-controlled paths and Windows executable protections remain enforced.

@mldangelo-oai
mldangelo-oai merged commit 3c93e74 into main Aug 14, 2026
35 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/allow-safe-relative-path-entries branch August 14, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants