threatdeck
Live 13:45 UTC ·

Detection library

ES|QLHunting query: tune before alertingAI coding agents on endpoints

AI CLI run non-interactively with a bypass flag by a script interpreter (s1ngularity pattern)

The Nx s1ngularity postinstall script (telemetry.js) checked for claude, gemini and q with `which`, then ran `claude --dangerously-skip-permissions -p`, `gemini --yolo -p` and `q chat --trust-all-tools --no-interactive` with a prompt telling the agent to list secret files into /tmp/inventory.txt. GTIG's QUIETVAULT stealer also drives on-host AI CLIs to hunt for secrets. This query finds AI CLIs started in print/non-interactive mode with a bypass flag whose parent is a script runtime rather than an interactive shell.

Log source
Elastic Defend process events (logs-endpoint.events.process-*)
Techniques
ASI02 Tool Misuse and Exploitation · LLM03 Supply Chain · AML.T0053 AI Agent Tool Invocation · AML.T0010 Supply Chain Compromise · AML.T0055 Unsecured Credentials
MITRE ATT&CK
T1195.002Compromise Software Supply ChainT1552.001Credentials In Files
Reviewed
2026-11-10

Query

FROM logs-endpoint.events.process-*
| WHERE @timestamp > NOW() - 30 days
  AND event.type == "start"
  AND (process.command_line LIKE "*--dangerously-skip-permissions*"
       OR process.command_line LIKE "*bypassPermissions*"
       OR process.command_line LIKE "*--yolo*"
       OR process.command_line LIKE "*--trust-all-tools*"
       OR process.command_line LIKE "*--dangerously-bypass-approvals-and-sandbox*")
  AND (process.command_line LIKE "* -p *" OR process.command_line LIKE "*--print*"
       OR process.command_line LIKE "*--no-interactive*" OR process.command_line LIKE "* exec *")
  AND process.parent.name IN ("node", "node.exe", "bun", "bun.exe", "deno", "python", "python3", "sh", "dash")
| KEEP @timestamp, host.name, user.name, process.parent.name, process.parent.command_line, process.command_line
| SORT @timestamp DESC

Expected false positives

  • CI jobs and agent SDK wrappers (for example GitHub Actions integrations) that call the CLI from node with bypass flags
  • Internal automation that scripts agents for code review or refactoring

Sources

Reviewed against vendor documentation, not tested in your environment. Defensive use only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.