cd /news/ai-agents/building-secure-mobile-apps-in-the-a… · home › topics › ai-agents › article
[ARTICLE · art-172150] src=shopify.engineering ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Building secure mobile apps in the agentic era

Shopify Engineering reported that agent-assisted development pushed code throughput in its mobile apps to roughly 434,000 lines changed per week during a 12-week rewrite of the Shopify app, about 11x the ~39,000 lines per week shipped the year before. To keep that pace secure, Shopify built a per-app attack-surface map covering deep links, WebViews, stored data, permissions and dependencies, with each item assigned one of five verdicts (Fix with severity, Tradeoff, Secure, Fixed, Debug only), and encoded the review knowledge as reusable skills built on OWASP's MASVS and MASTG standards plus lessons from reported vulnerabilities. Each skill inventories every item first and then has the model review one item at a time with only the code it touches, escalating exploitability questions to frontier cybersecurity models.

recommendation

Encode mobile security checks as reusable skills over an explicit attack-surface inventory, and have the model review one item at a time with only its code, escalating exploitability questions to frontier cybersecurity models.

more in playbook: Securing agents and AI tools
read6 min views3 publishedNov 18, 2026
Building secure mobile apps in the agentic era
Image: Shopify Engineering

In the agentic era, code throughput in our mobile apps has increased to the point where we're now shipping 11x compared to the same time last year. To ship quickly and securely at this pace, we needed to innovate our approach to mobile application security.

Sample app with mock data

Across our 12-week rewrite of the Shopify app, we averaged ~434,000 lines of code changed per week. The same time last year, we were shipping ~39,000 lines of code per week in the Mobile Shopify app.

Not only are we shipping 11x the code, but the industry is seeing record numbers of vulnerabilities in codebases that have been reviewed by humans for years. To keep ahead, we needed to change how we work.

We've been busy building with agents. We've written about why we went back to native, how we rebuilt the Shopify app in 12 weeks, how Helix helped agents rebuild the Shopify app's 300+ screens, and how Remote Dev lets agents build and test in parallel.

Our existing vulnerability scans already look for vulnerabilities in the code we change. We wanted to go further and minimize our attack surface while enforcing the practices that keep vulnerabilities from appearing in the first place. There's a lot to cover in a mobile app, and each area has its own best practices. Every incident we've handled has also taught us something that we apply from then on. So we needed to see each app's whole attack surface, notice when it changes, and check every part of it against what we've learned so far.

This post covers what we built, and what we'd suggest to anyone building apps with agents.

Start with a map of the attack surface #

For each app, we keep a list of everything security-sensitive, grouped into surfaces: deep links, WebViews, stored data, permissions, dependencies, etc. For each surface, we write a sentence or two about why it matters. Every item on the list has a verdict and a link to the code it came from. We limit each item to one of five verdicts:

  • Fix (with a severity)
  • Tradeoff
  • Secure
  • Fixed
  • Debug only

Write the knowledge down as skills #

The map is produced by a set of skills, one for each surface. We started with OWASP's mobile app security standard (MASVS) and testing guide (MASTG), and added what we've learned from vulnerabilities reported against mobile apps, including our own. Each skill describes what to list, what good looks like, and what to check.

Because they're skills, they aren't tied to one tool. The scheduled review uses them, we use them for one-off security reviews, and any agent working in the code can load them. When we learn something new, we update the skill and every later run picks it up.

Keep each review small #

If you ask a model to find vulnerabilities in a whole app, you get a long, vague list. So each skill first takes a complete inventory: every deep link route and every parameter it reads, every WebView and the hosts it loads, every WebView javascript interface method, every Keychain and Keystore entry, and every dependency and 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 looking at one route, every parameter it reads and the code that reads each one, and asking what happens when a parameter is hostile. The answer is specific enough to verify. When it depends on whether something can actually be exploited, the model can pass that question to one of the frontier cybersecurity models.

Learn from every incident #

When we handle an incident or a HackerOne report, we fix the bug, then add that class of problem to the skills. Every run checks the current code against all of those classes, and each surface has a short checklist of the best practices we expect.

Sample app with mock data

Review the changes every day #

Every weekday, the latest frontier models look at the changes made to the app and update the attack surface. Then they dig into each individual change in the attack surface and look for vulnerabilities with cybersecurity models:

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 when the inventory reports a change to it. 2. Review requires the model to judge each changed or new item, with read-only tools and nothing but the code. A second pass reads the changed files for anything security-relevant that no item covers. We check every answer before using it: its format, line ranges, and wording, and make sure that it doesn't contain a secret. 3. Publish builds the new map and a page of what changed, and posts a summary to Slack.

The changes page lists every security-sensitive change since the last run, with a verdict for each one.

Sample app with mock data

Watch for changes outside the repo #

Some problems never show up in our own diffs. Industry-wide vulnerabilities are announced with increasing frequency in the platforms and packages we depend on, and we need to react to them. We have automated dependency tracking and bumping, but sometimes there are issues that still need attention. To stay on top of the latest issues, agents regularly read security news and check each item against the map and our code. The agent posts a short briefing and only pings the team when something affects us. Here’s an example of what one of those briefs looks like:

🟢 Mobile security briefing · Nothing affects the apps.

🔁 Ongoing

  • Example package 2.3 security release: fix ships Thursday, bumps ready for both apps, since Mon 3 Nov.

⚪ Worth knowing

  • Example browser engine update: three critical fixes, none exploited. Not us: phones get the update automatically.

💤 Quiet: platform bulletins, known-exploited vulnerabilities, research blogs.

We've also used the same skills on third-party libraries before adopting them, which gives a dependency the same map and verdicts as our own code.

Security at agentic pace #

Agents let us ship more changes, faster. To keep them secure, we:

  • Keep a map of each app's attack surface, so we can see what we ship and where we can make it smaller.
  • Write down our best practices and the lessons from past incidents and turn them into skills, enforcing them on every app.
  • Break the review into small, well-defined problems, like one deep link or WebView at a time, so the model can operate on a defined problem space.
  • Review what changed every weekday, and check security news against our apps for problems that don't come from our own code.

We run these checks in addition to the work of Dispatch, our agentic vulnerability scanner. Dispatch finds and proves vulnerabilities in the code we change, and the attack surface map makes sure each app as a whole stays small and follows our best practices.

Every vulnerability we find and fix strengthens the checks we run on the next change. That’s how we’re building secure mobile apps in the agentic era.

Want to solve hard problems like these? We’re hiring.

── more in #ai-agents 4 stories · sorted by recency
── more on @shopify 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-secure-mobi…] indexed:0 read:6min 2026-11-18 · —