Skip to content

fix(detection): detect shell-quoted downloaders in PIPE_TO_SHELL - #458

Closed
rmanm19 wants to merge 1 commit into
blitzcrieg1:masterfrom
rmanm19:fix/pipe-to-shell-quoting
Closed

rmanm19 wants to merge 1 commit into
blitzcrieg1:masterfrom
rmanm19:fix/pipe-to-shell-quoting

Conversation

@rmanm19

@rmanm19 rmanm19 commented Nov 24, 2026

Copy link
Copy Markdown

Fixes #391

Summary

  • Normalized intra-word shell quotes before matching PIPE_TO_SHELL in classify_command (apps/orchestrator/agentmetry/core/audit/detection/traits.py), so quoted downloaders like c'u'rl or c"u"rl are still flagged as pipe_to_shell.
  • Added unit tests in apps/orchestrator/tests/test_pipe_to_shell_quoting.py.

Verification

Ran PYTHONPATH=. python3 -m unittest tests/test_pipe_to_shell_quoting.py -v — passed.

@blitzcrieg1

Copy link
Copy Markdown
Owner

Landed combined in #469 (the three fixes touched the same lines in traits.py, so they were cherry-picked together with the README test count fixed to 2925). Thanks for the contribution, @rmanm19.

blitzcrieg1 added a commit that referenced this pull request Nov 25, 2026
… (combined #458 #459 #463) (#469)

* fix(detection): allow preceding flags before -c/-e in _INLINE_SCRIPT

* fix(detection): classify base64/openssl/xxd decode piped to shell

* fix(detection): detect shell-quoted downloaders in PIPE_TO_SHELL

# Conflicts:
#	apps/orchestrator/agentmetry/core/audit/detection/traits.py

* docs: changelog entry + README test count for classifier fixes

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>

---------

Co-authored-by: Arman <[email protected]>
Co-authored-by: Mistral Vibe <[email protected]>
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.

Shell quoting inside the command word defeats PIPE_TO_SHELL, so a download cradle goes undetected

2 participants