Repository navigation
fix(plugin): include text files in scans regardless of extension - #1347
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
alandelong-oai
left a comment
There was a problem hiding this comment.
Reviewed the current diff; no actionable issues found.
kmbroai
left a comment
There was a problem hiding this comment.
Reviewed the full inventory/preview change, Git blob framing, deleted-file classification, bounded reads, UTF-16 handling, path checks, and shared regression cases. Local Python validation: 286 passed; six temporary-directory-related failures reproduced on base and all six passed in clean fixtures. Hosted CI inspected. No actionable findings at this commit.
zcrab-oai
left a comment
There was a problem hiding this comment.
Reviewed the diff and relevant surrounding code at 9abc6d7. No obvious correctness or regression issues found. 292 focused tests passed locally. Hosted CI remains incomplete because runs were canceled; the failed aggregate checks enforce completion of those canceled jobs.
9abc6d7 to
736e787
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 736e7870fd
ℹ️ 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".
736e787 to
3dd9a07
Compare
…es (#2109) The extension allowlist that silently dropped `.cgi`, `.pl`, `.pm`, and `.t` files was removed in #1347, and #1432 moved inventory generation to Node. The move left no coverage for the reported Perl/mixed-encoding scenario: the Python `source_cases` matrix that carried unfamiliar and extensionless sources is no longer referenced, so a future suffix filter would regress silently. Add a diff-inventory regression that includes `.cgi`, `.pl`, `.pm`, `.t`, an extensionless Perl shebang script, and a file stored as EUC-JP rather than UTF-8. A `.pm` containing NUL bytes stays excluded, pinning selection to file content rather than suffix. Refs #2078.
Summary
Before reviewing code, Codex Security builds lists of files to inspect. Some of those lists currently accept only known file extensions, so they can miss files such as a script named
scripts/entrypointor code saved with an unfamiliar extension.This change checks the file contents to decide whether a file is text. Those files can then be included without adding each extension to a maintained list.
Changes
Testing
After rebasing onto main
3a1a51e, all 296 focused inventory, preview, and Git snapshot tests passed. They cover extensionless and unfamiliar text, selected revisions, staged and unstaged changes, deleted text and binary files, gitlinks, bounded blob reads, UTF-16 classification, late binary bytes, and preview byte limits. Large two-way Git pipe traffic, malformed framing, partial output, and Git failures are covered. A discarded 4 MiB binary no longer prevents text inventory generation under a 1 MiB temporary-file size limit.Ruff checks and formatting, the TypeScript CI build, and portable plugin source compatibility checks passed on this head.
Repeat the focused checks from the repository root:
Risk and rollout
Repositories with previously skipped text files may have more files to review. Existing file exclusions and preview-size limits still apply. Classifying working-tree files now reads through the file until binary content or EOF, which adds I/O for large text files while keeping memory bounded. Reading file versions stored in Git uses bounded chunks and retains only preview samples. Unrecognized formats get short text samples for previews. No command-line changes or migration are required.
Public disclosure review