WhoBuilt

We let an AI agent execute Bash and lived to talk about it

Sep 14, 2026· 21 min· 7.1K views·Watch on YouTube

Speaker

Sarah Sanders, a context engineer at PostHog, explains at an AI Engineer talk how her team secured the Wizard, an agentic CLI that installs and configures PostHog in developers’ projects.

What the Wizard does

The Wizard reads a project, selects and installs the right SDK, instruments events, and creates dashboards. Sanders says it reduces setup from about one or two hours to five or six minutes, with inference free for users. Its command-running capability is central to the product experience, and also raises security concerns.

Early safeguards and audit lessons

Sanders describes the early protections: an allowlist, Bash denied by default, restricted package installation, and no access to environment variables or `.env` files. A security team audit found gaps that emerged from combinations of individually reasonable features. Her key lesson is that attackers examine how parts interact, while code reviews often examine changes one at a time.

Securing the context supply chain

The Wizard’s Context Mill packages documentation, prompts, and example apps into skill bundles, then delivers them to the agent through an MCP server. Sanders identifies this content pipeline as a possible attack path: a malicious change to an open-source Markdown file or code comment could reach the agent as trusted content. Her response was to scan content when skills are built and released, then scan it again when the Wizard uses it.

Warlock detects; triage advises

Sanders built Warlock as a standalone scanner that returns findings with a category, severity, and recommended action; it detects threats but does not enforce them. Its rules use YARA for deterministic pattern matching. Warlock helped uncover subagents trying to bypass guardrails and retrieve secrets, as well as agents putting emails and phone numbers into events. Sanders uses an LLM triage layer to reduce false positives only after deterministic checks have not blocked the activity.

Rules and defense in depth

Warlock rules include metadata, patterns, and conditions, and Sanders says they should ship with tests for both matches and non-matches. Severity should reflect real impact: `rm -rf` looks alarming but is routinely used to remove `node_modules`. The Wizard’s current defenses also include sandboxing, default-deny permissions, a vault for secrets, scanning, triage, and telemetry, with each layer handling a distinct job.

Takeaways

  • Treat prompts as guidance, not as security enforcement; enforce critical decisions deterministically.
  • Scan content entering an agent, including documentation, examples, and other trusted supply-chain inputs.
  • Audit combinations of features because individually safe components can create an attack path together.
  • Keep threat detection separate from enforcement, and use LLM judgment to reduce noise rather than override blocks.
  • Test security rules against both malicious patterns and benign lookalikes, and set severity by real-world impact.

Mentioned in this talk

Search inside this talk

What was claimed 10

  • built
    “a security scanner called the Warlock, which I built”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Context Engineer (Wizard)
    “I’m a context engineer at PostHog.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • metric
    Wizard: Setup takes about five to six minutes, down from about one or two hours.
    “what used to take about an hour or two of setup and runs that in about five to six minutes”
    YouTube
    Unverified1 source· Talk
  • feature
    Wizard: Agentic CLI that reads a codebase, installs the right SDK, instruments events, and sets up dashboards.
    “The wizard sets up PostHog for you. It’s an agentic CLI tool”
    YouTube
    Unverified1 source· Talk
  • uses
    “a terminal UI that we built ourselves using Ink”
    YouTube
    Unverified1 source· Talk
  • metric
    Wizard: 8,000 people running it a week.
    “yesterday we just hit 8,000 people running it a week”
    YouTube
    Unverified1 source· Talk
  • integrates with
    Context Engine integrates with MCP
    “skill bundles that get shipped to the wizard over our MCP server”
    YouTube
    Unverified1 source· Talk
  • feature
    Warlock: Scans strings and returns categorized findings with severity and recommended actions; it detects but does not enforce.
    “You hand it a string; it hands you back a list of findings.”
    YouTube
    Unverified1 source· Talk
Show all 10 facts

Related talks