Securing Mobile Apps at Agent Speed: Attack Surface Maps and Daily Reviews
- Richard Martinez
- 553 reads
Shopify's account of keeping mobile app security in step with agent-driven shipping: attack surface maps, reusable skills and daily reviews.

The interesting problem here isn't that agents write code faster. It's that review capacity stops being the bottleneck only if you rebuild how review works. Shopify says its mobile shipping rate is now roughly 11x what it was a year ago, and its account of the response is less about better scanners and more about changing the unit of review.

Throughput has outrun human review. During a 12-week rewrite of the Shopify app, the team averaged about 434,000 lines of code changed per week, against roughly 39,000 per week for the mobile app at the same point the previous year. The company also points to industry reporting of record vulnerability counts in codebases that people had reviewed for years. Put those together and the old model, where a security team reads diffs before release, doesn't hold up.
Map the whole attack surface, not just the diff
Shopify's existing vulnerability scanning already examines the code that changes. What it added was a standing map of each app's security-sensitive surface. The map groups items into categories such as deep links, WebViews, stored data, permissions and dependencies. Each category gets a sentence or two explaining why it matters, and every item links back to the code it came from.
Each item carries one of five verdicts: Fix (with a severity), Tradeoff, Secure, Fixed, or Debug only. That constraint matters. A map where everything is "needs review" produces noise. Forcing a verdict on every entry makes the map something people can act on, and makes changes to it easy to spot.
The map is useful because it shows drift. A change that looks harmless in a diff can alter how a deep link is handled or what a WebView can reach. If the surface is tracked as a whole, the change shows up against the thing it affects.
Skills instead of one-off prompts
The map is generated by a set of skills, one per surface. The starting point was OWASP's Mobile Application Security Verification Standard (MASVS) and its testing guide, extended with lessons from mobile vulnerabilities reported against Shopify's apps, including the company's own.
Each skill specifies what to inventory, what a secure implementation looks like, and what to check. Because they're written as skills rather than tied to one tool, the same definitions serve the scheduled review, one-off security reviews, and any agent working in the repository. When the team learns something new, it updates the skill and every later run inherits the change. For teams weighing this approach, the portability is probably the most transferable idea: the knowledge lives in versioned instructions, not in someone's prompt history.

Keep each review small
Asking a model to find vulnerabilities across a whole app produces a long, vague list, and that's hard to verify. Shopify's skills work in two passes. First, they build a complete inventory: every deep link route and the parameters it reads, every WebView and the hosts it loads, every JavaScript interface method exposed to WebViews, every Keychain and Keystore entry, and every dependency with its version. Then the model reviews one item at a time, with only the code that item touches.

Sample app with mock data
For a deep link, that means one route, every parameter it reads, the code that consumes each one, and the question of what happens when a parameter is hostile. The answers are specific enough to check. Where exploitability is in doubt, the model hands that question to one of the frontier cybersecurity models rather than guessing. I'd expect this decomposition to matter more than the choice of model: narrow questions with bounded context are easier to verify, and verification is where false positives get filtered out.
Turn incidents into checks
When an incident or a HackerOne report comes in, the team fixes the bug and then adds that class of problem to the relevant skill. Each run checks the current code against every accumulated class, and each surface carries a short checklist of expected practices. The compounding effect is the point: a lesson learned once is enforced on every app and every future change.

Sample app with mock data
A daily loop with three stages
Every weekday, the pipeline runs in three stages. Prepare takes the inventory at the latest commit and compares it with the last accepted map. An item counts as changed only when a cited line of code changed or the inventory reports a change to it, which keeps the workload tied to actual edits. Review has a model judge each changed or new item using read-only tools and only the relevant code. A second pass scans changed files for security-relevant material that no item covers. Before any answer is used, the team checks its format, line ranges and wording, and confirms it contains no secrets. Publish builds the new map, generates a page of what changed, and posts a summary to Slack.

Sample app with mock data
The changes page lists every security-sensitive change since the last run, each with its verdict. That's the artifact a reviewer actually needs, and it's far more reviewable than a raw diff.
Watching what happens outside the repo
Some risks never appear in your own commits. Vulnerabilities in platforms and packages you depend on are announced regularly, and Shopify runs automated dependency tracking and version bumping. Some issues still need human attention, so agents also read security news and check each item against the map and the codebase. They post a short briefing and only notify the team when something touches the apps. Briefings are sorted into groups such as ongoing fixes, items worth knowing, and quiet periods with nothing relevant.
The company has also run the same skills on third-party libraries before adopting them, giving a dependency the same map and verdicts as first-party code. That's a practical pattern for any team evaluating an SDK.
What this doesn't answer
The post describes process and design. It doesn't report detection rates, false-positive rates, the cost of running daily model passes, or how many findings the map has surfaced versus what the existing scanner would have caught alone. Those are the numbers that would tell another team whether to adopt this structure. It also depends on having a mature security function that can write the skills and judge the output, which many mobile teams don't yet have.
Still, the transferable parts are concrete: keep a verdict-based map of each app's attack surface, express institutional knowledge as versioned skills, decompose reviews into bounded items, and make the daily output a change log rather than a wall of findings. Shopify positions its agentic scanner, Dispatch, as complementary, with the map handling whole-app consistency and Dispatch proving vulnerabilities in changed code. Watch whether that split holds as the codebase keeps growing, and whether the team starts publishing the metrics that would let outsiders judge it.