Skip to content

fix(tools): reject unknown module tool arguments - #307

Merged
primoco merged 1 commit into
eullm:mainfrom
Gabriele06-local:fix/module-tool-unknown-args
Nov 20, 2026
Merged

primoco merged 1 commit into
eullm:mainfrom
Gabriele06-local:fix/module-tool-unknown-args

Conversation

@Gabriele06-local

Copy link
Copy Markdown
Contributor

ModuleTool::build_argv() only read keys that matched the command template, so extra or misspelled argument keys were silently ignored: a call with both pdf_path and pdfpath ran on the first file as if nothing was wrong. When the module schema declares properties, unknown keys are now rejected with the offending name, while valid calls are unchanged. Added an S5 test.

Verification: cargo fmt --check, cargo clippy -- -D warnings, cargo test --test security s5_unknown_module_arguments_are_refused — 1 passed. The pre-existing dead-code warning in tests/security.rs is unrelated.

I have read and agree to the Contributor Licence Agreement in CLA.md.

@primoco
primoco merged commit 60eff86 into eullm:main Nov 20, 2026
4 checks passed
@primoco

primoco commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Merged, thanks!

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