Skip to content

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

Closed
rmanm19 wants to merge 1 commit into
blitzcrieg1:masterfrom
rmanm19:fix/inline-script-flags
Closed

rmanm19 wants to merge 1 commit into
blitzcrieg1:masterfrom
rmanm19:fix/inline-script-flags

Conversation

@rmanm19

@rmanm19 rmanm19 commented Nov 24, 2026

Copy link
Copy Markdown

Fixes #388

Summary

  • Updated _INLINE_SCRIPT in apps/orchestrator/agentmetry/core/audit/detection/traits.py so flags preceding -c or -e (e.g., python -I -c '...') still match the inline-script exemption.
  • Added unit tests in apps/orchestrator/tests/test_inline_script_flags.py.

Verification

Ran PYTHONPATH=. python3 -m unittest tests/test_inline_script_flags.py -v — all 2 tests pass.

@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.

A flag before -c defeats the #50 exemption, so curl into python -I -c fires critical

2 participants