Fix shell injection in OS fallback#55
Conversation
|
Great work getting the test infrastructure in place. The Two quick things before I merge:
Fix those, and it’s good to go! |
acced1d to
e326402
Compare
|
Implemented both follow-ups and force-updated the rebased branch:
The rebase also exposed an |
|
The rebased branch is ready, but the workflow run is currently marked |
|
Excellent! |
|
Thank you for the review and merge, @AkshajSinghal. I appreciated the focused feedback on the database tests and CI; it made the final change stronger. Glad the shell-injection fix and regression coverage are now in TruShell. |
Summary
shlex.splitshell=FalseSecurity impact
Shell metacharacters such as
;are now passed as literal arguments instead of being interpreted by a host shell. This aligns the fallback helper with TruShell's documented no-shell-expansion model.Closes #44.
Maintainer follow-up
main, which now includes.github/workflows/python-ci.ymlfor Python 3.10-3.12 on every pull request. I did not add a duplicate workflow.in_memory_databasefixture and moved the three CRUD-oriented database tests to it. The fresh-connection and initialization-lock tests intentionally retain temporary file databases because separate:memory:connections do not share schema/state.argvNameErrorso both CLI help checks in the workflow can run.Verification
python -m pytest tests/test_cli_argv.py tests/test_database.py tests/test_cli_os_fallback.py -q- 9 passedF821check ontrushell/cli.py- passedpython -m trushell --helpandtrushell --help- passedpython -m build --wheel- passed