Skip to content

fix: include PowerShell files in diff inventory - #707

Open
Hughhhhcoder wants to merge 1 commit into
openai:mainfrom
Hughhhhcoder:codex/codex-security-powershell-inventory
Open

fix: include PowerShell files in diff inventory#707
Hughhhhcoder wants to merge 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".

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

1 participant