Skip to content

Fix feature detection for quoted filenames - #17

Open
AnushLoknath wants to merge 1 commit into
openhackai:mainfrom
AnushLoknath:fix/recon-quoted-filenames
Open

AnushLoknath wants to merge 1 commit into
openhackai:mainfrom
AnushLoknath:fix/recon-quoted-filenames

Conversation

@AnushLoknath

Copy link
Copy Markdown

Fixes #14

Filenames containing apostrophes could silently erase detected features because xargs interpreted quotes in file paths.

  • Use find -print0 and xargs -0 in both scan modes.
  • Preserve null-delimited grep output for accurate filename handling and counts.
  • Add regression coverage for quoted paths, spaces, and other special filename characters.

Validation:

  • Both scan-mode regression tests fail against the original code.
  • Recon tests: 6 passed, 4 POSIX-only cases skipped on Windows.
  • Local testing used Git for Windows utilities and a temporary runner workaround for an existing SIGKILL import incompatibility.
  • git diff --check passed.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes filename handling in feature detection logic.

The PR appears safe to merge; no actionable issue was established.

Summary

The PR makes feature detection preserve filenames literally through both scan modes and adds regression tests for quoted and other special-character paths.

  • Changes file collection, grep input, grep output, and counting to use NUL delimiters.
  • Exercises both the regex and large-repository fixed-string scan paths.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["find -print0"] --> B["NUL-delimited file list"]
  B --> C{"File count > 5000?"}
  C -->|Yes| D["xargs -0 → grep -FlZ"]
  C -->|No| E["xargs -0 → grep -ElZ"]
  D --> F["Split matches on NUL"]
  E --> F
  F --> G["Feature counts"]
Loading

Reviews (1) · Last reviewed commit: "Fix recon feature detection for quoted f..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POSIX xargs Apostrophe Failure Silently Erases Feature Detection

1 participant