Developer releases open-source bash-write-targets tool to statically detect bash command file writes
A developer built a standalone, stdlib-only Python tool called bash-write-targets after their agent-guard project's README said such a tool did not yet exist. The tool statically parses a bash command string to list the files it would write, such as redirection targets and sed -i or mv destinations, and can output the results as JSON. It handles cases like heredocs and unresolvable variables, and it does not execute commands or use eval. The developer notes its limits: it cannot detect writes made inside interpreter code like python3 -c, nor network actions such as POSTing data. The project is MIT-licensed and available on GitHub and PyPI, with 19 smoke tests reported as passing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in