Skip to content

fix: include PowerShell files in diff inventory - #707

Merged
mldangelo-oai merged 1 commit into
openai:mainfrom
Hughhhhcoder:codex/codex-security-powershell-inventory
Aug 28, 2026
Merged

mldangelo-oai merged 1 commit into
openai:mainfrom
Hughhhhcoder:codex/codex-security-powershell-inventory

Conversation

@Hughhhhcoder

Copy link
Copy Markdown
Contributor

Summary

Fixes #706. Diff-scan inventories currently omit changed PowerShell files because the shared text-code extension set does not include .ps1. This prevents valid locations in PowerShell files from being recorded as in-scope candidates.

Changes

  • Add .ps1 to the existing text-code extension set used by diff inventories.
  • Add a regression test that creates a synthetic Git repository, changes a JSON file and a PowerShell file, and verifies that both appear in the revision inventory.

Testing

  • uv run --project plugins/codex-security --extra test pytest -q plugins/codex-security/tests/test_generate_in_scope_files.py plugins/codex-security/tests/test_rank_preview.py — 57 passed
  • ruff check plugins/codex-security/scripts/rank_preview.py plugins/codex-security/tests/test_generate_in_scope_files.py — passed
  • python3 -m py_compile plugins/codex-security/scripts/rank_preview.py plugins/codex-security/tests/test_generate_in_scope_files.py — passed
  • git diff --check — passed

Risk and rollout

This is a small compatibility fix with no public CLI or API changes. It only expands the existing diff inventory language allowlist to include PowerShell files; normal inventory behavior and other extension handling 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.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@Hughhhhcoder

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 9214f8ed22

ℹ️ 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".

@mldangelo-oai mldangelo-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the clear repro and focused fix! I reproduced the missing PowerShell file on main and confirmed this change fixes both the inventory omission and the candidate-recording failure. The regression test fails before the change and passes here, and all 57 focused tests passed locally.

@mldangelo-oai
mldangelo-oai merged commit 5278e21 into openai:main Aug 28, 2026
38 checks passed
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.

Diff scan inventory omits PowerShell .ps1 files

2 participants