Skip to content

Add --files-from option to read input files from a file#3410

Open
kyllianaucher wants to merge 1 commit into
koalaman:masterfrom
kyllianaucher:feature/files-from
Open

Add --files-from option to read input files from a file#3410
kyllianaucher wants to merge 1 commit into
koalaman:masterfrom
kyllianaucher:feature/files-from

Conversation

@kyllianaucher
Copy link
Copy Markdown

Add support for a --files-from option to read input file paths from a file.

This allows users to specify a file containing a list of files to analyze,
with support for - to read from stdin.

Implementation details:

  • Additional file paths are collected before verification.
  • Errors while reading are reported via printErr.
  • RuntimeException is thrown if the file cannot be read.
  • The existing parsing and analysis pipeline remains unchanged.

The man page has been updated accordingly.

Tested locally with:

  • valid file list
  • non-existent file
  • stdin input (--files-from=-)
  • combination with direct file arguments

Let me know if you’d like tests or changelog updates.

@bbailleux
Copy link
Copy Markdown

As it is sometimes hard to avoid analysing non script files (e.g. ELF binaries), this feature would be very welcome to avoid false positives in CI/CD

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.

2 participants