[bug] deny list for inline legacy interpreters matches exact flag spellings only, so…
What happened
deny list for inline legacy interpreters matches exact flag spellings only, so perl -0pi -e ran despite the no-Perl rule
Summary
The system prompt rule "TypeScript for everything" says nothing the assistant authors is Python, Perl, Ruby or PHP, "one-liners included", and that native deny rules refuse inline python -c, perl -e, ruby -e and php -r. The deny list in settings.system.json matches exact flag spellings only: perl -e *, perl -pe *, perl -ne *, perl -pi -e *, ruby -e *, php -r *, plus four python forms. Any other combination of flags passes. Observed in a real session: perl -0pi -e 's/.../.../' file ran without a prompt. By the same matching, these are not covered either: perl -i -pe, perl -0777 -pe, ruby -pe, python3 -Ic.
Suggested direction: deny the interpreters by name (Bash(perl *), Bash(ruby *), Bash(php *)), since nothing in the release runs them through the Bash tool (checked: no skill text invokes perl, ruby or php). Python cannot be denied by name because running existing third-party Python tools is allowed, so its gap needs a different guard (for example a PreToolUse check on -c in any flag cluster).
Workaround in our install: the three interpreter names (perl, ruby, php) added to the deny list in the USER settings overlay.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @IvanLeontev-stack. The perl, ruby, php and python deny rules in the shipped settings are now flag-cluster globs instead of exact spellings, so perl -0pi -e, perl -i -pe, ruby -pe, php -nr, python3 -Ic and python3 -I -c are denied, while bun -e, python3 -m pytest -k abc and python3 script.py -c stay allowed. A new test models Claude Code's Bash glob matching, and 14 of its cases fail against the old rules. This lands in the next release.