Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 6 min read Case study mediumAdept

Building secure mobile apps in the agentic era

Shopify keeps pace with an 11x jump in mobile code output (~434k lines changed per week during a 12-week agent-driven rewrite) by maintaining a per-app attack surface map covering deep links, WebViews, stored data, permissions and dependencies, where every item carries one of five verdicts and a code link. Each surface has a reusable agent skill built from OWASP MASVS/MASTG plus lessons from past incidents and HackerOne reports. The skill first inventories every item and then has the model review one item at a time with only the relevant code, which keeps findings specific and verifiable. A weekday pipeline (prepare, review, publish) diffs the map against the last accepted version and validates model output, while agents also read security news and alert the team only when something affects the apps.

Assumes: mobile app attack surfacesdeep links and WebViewsLLM agents

Related posts

  • Building an agentic harness that outlasts the model

    Shopify Engineering mediumAdept

    Shopify's AppSec team built Dispatch, a Ruby-orchestrated multi-agent harness that partitions codebases, runs parallel category-specific Hunter agents, verifies candidates with tests written by a different model inside each app's existing test suite, and opens draft fix PRs. Across 80+ applications including the Shopify Core Rails monolith it produced 300+ findings in about six weeks, valued at over $400,000 in bounty equivalents. Full scans cost $50–300 and diff-based incremental scans $5–50. Key lessons: tests are the oracle for web vulns (e.g., two-tenant fixtures for IDOR), partitions sized to 20–30% of the context window improve recall at low cost, category-specific agents beat generalists, and deterministic scripts should own structured output, Git and credentials. Newer models find more candidates but also more noise, so the harness matters more than the model.

  • Helix: The internal tool powering our Shopify app's native migration

    Shopify Engineering mediumAdept

    Helix is Shopify's internal LLM tooling for rebuilding its 300+ screen React Native app in native Swift and Kotlin. Instead of one-shot generation, it splits each screen into small ordered checkpoints, each gated by CLI-driven behavior tests, a Gemini-based visual comparison against screenshots of the reference app, two context-isolated adversarial code reviews against documented architecture guidelines, and engineer approval. Reviewer feedback is stored in memory so later checkpoints need less oversight, enabling autonomous and parallel runs that produce committed, evidence-backed checkpoints instead of one large diff. The core lesson is to optimize for reliable convergence rather than a perfect first attempt.

  • Cyber Chaos Monkey: Staying ahead of security threats with AI agents

    Shopify Engineering mediumAdept

    Shopify's Cyber Chaos Monkey (CCM) is an agentic vulnerability hunter that attacks live production infrastructure using test shops, armed with source code, threat intel, past bug reports and deployment records. A Discovery component refines ideas and finds leads, and Sandbox agents exploit them by making live requests, reading production logs and iterating. Over tens of thousands of engagements it has produced dozens of impactful findings without an outage. Safety comes from Kubernetes job-per-engagement isolation, a credential-injecting proxy, an nginx egress allowlist, Rules of Engagement, and a two-person-integrity scheme in which a separately aligned judge agent on a different model watches the executor in real time and can kill it, with fail-closed heartbeats in the pod's orchestrator.

  • How a beagle-shaped AI agent ships code to madewithvuejs.com

    Sentry mediumAdept

    madewithvuejs.com runs an autonomous AI agent, "Milly," built as a custom harness around swappable cloud models. She scouts content, takes Linear tickets, and triages Sentry errors via MCP, with permission to commit, merge and push straight to production. Safeguards include process templates such as red-before-green tests for bug fixes, credential-level hard limits (no production data writes, no .env, no force-push, no server config), and a rule that only humans close tickets. A worked example shows her catching a validation/column-length mismatch (2,024 vs 2,000 chars) that silently dropped 8 submissions. The setup works because the site's blast radius is small and everything is reversible.

  • From single pull requests to full software packages: Detecting malicious code at scale

    Datadog Engineering mediumAdept

    Datadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model. The agent uses GitHub APIs, osv.dev and SCA to check context such as author history and reverted commits. On 690 test diffs the two-stage design raised accuracy from 97.4% to 99.86% by cutting false positives from 17 to 0, and static typosquat-domain checks cover gaps in the filter. For large packages, giving the agent a codemap plus an on-demand ReadFile tool beat both forwarding the flagged chunk and rechunking, reaching 95.2% end-to-end accuracy with no runtime errors. Projected costs are about $0.025 per median package and $0.072 at p90, and a crawler polls npm and PyPI every 10 minutes, caching verdicts by hash and diffing against the previous version.

The quest for software engineering knowledge.

Look:
Layout: