{"slug": "building-secure-mobile-apps-in-the-agentic-era", "title": "Building secure mobile apps in the agentic era", "summary": "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.", "body_md": "**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.**\n\n*Sample app with mock data*\n\nAcross our [12-week rewrite of the Shopify app,](https://shopify.engineering/shopify-app-rebuild) 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.\n\nNot only are we shipping 11x the code, but [the industry is seeing](https://www.theregister.com/security/2026/11/13/this-years-bug-count-just-passed-100k/5309882) record numbers of vulnerabilities in codebases that have been reviewed by humans for years. To keep ahead, we needed to change how we work.\n\nWe've been busy building with agents. We've written about [why we went back to native](https://shopify.engineering/back-to-native), how we [rebuilt the Shopify app in 12 weeks](https://shopify.engineering/shopify-app-rebuild), how [Helix](https://shopify.engineering/helix) helped agents rebuild the Shopify app's 300+ screens, and how [Remote Dev](https://shopify.engineering/remote-dev) lets agents build and test in parallel.\n\nOur existing [vulnerability scans](https://shopify.engineering/building-an-agentic-harness-that-outlasts-the-model) 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.\n\nThis post covers what we built, and what we'd suggest to anyone building apps with agents.\n\n## Start with a map of the attack surface\n\nFor 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.\n\nWe limit each item to one of five verdicts:\n\n- Fix (with a severity)\n- Tradeoff\n- Secure\n- Fixed\n- Debug only\n\n## Write the knowledge down as skills\n\nThe map is produced by a set of skills, one for each surface. We started with OWASP's mobile app security standard ([MASVS](https://mas.owasp.org/MASVS/)) and testing guide ([MASTG)](https://mas.owasp.org/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.\n\nBecause 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.\n\n## Keep each review small\n\nIf 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.\n\n*Sample app with mock data*\n\nFor 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.\n\n## Learn from every incident\n\nWhen we handle an incident or a [HackerOne report](https://hackerone.com/shopify), 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.\n\n*Sample app with mock data*\n\n## Review the changes every day\n\nEvery 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:\n\n1. \n**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.\n2. \n**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.\n3. \n**Publish** builds the new map and a page of what changed, and posts a summary to Slack.\n\nThe changes page lists every security-sensitive change since the last run, with a verdict for each one.\n\n*Sample app with mock data*\n\n## Watch for changes outside the repo\n\nSome 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:\n\n*🟢 **Mobile security briefing** · Nothing affects the apps.*\n\n*🔁 **Ongoing***\n\n- ***Example package 2.3 security release**: fix ships Thursday, bumps ready for both apps, since Mon 3 Nov.*\n\n*⚪ **Worth knowing***\n\n- ***Example browser engine update**: three critical fixes, none exploited. Not us: phones get the update automatically.*\n\n*💤 **Quiet**: platform bulletins, known-exploited vulnerabilities, research blogs.*\n\nWe'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.\n\n## Security at agentic pace\n\nAgents let us ship more changes, faster. To keep them secure, we:\n\n- Keep a map of each app's attack surface, so we can see what we ship and where we can make it smaller.\n- Write down our best practices and the lessons from past incidents and turn them into skills, enforcing them on every app.\n- 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.\n- Review what changed every weekday, and check security news against our apps for problems that don't come from our own code.\n\nWe run these checks in addition to the work of [Dispatch,](https://shopify.engineering/building-an-agentic-harness-that-outlasts-the-model) 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.\n\nEvery 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.\n\n*Want to solve hard problems like these? [We’re hiring](https://www.shopify.com/careers).*", "url": "https://wpnews.pro/news/building-secure-mobile-apps-in-the-agentic-era", "canonical_source": "https://shopify.engineering/secure-agentic-apps", "published_at": "2026-11-18 20:34:30+00:00", "updated_at": "2026-11-18 21:45:59.373560+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "developer-tools"], "entities": ["Shopify", "Shopify Engineering", "Mobile Shopify app", "Helix", "Remote Dev", "OWASP", "MASVS", "MASTG"], "also_reported_by": [], "takeaway": "Scope agent security reviews to one inventory item at a time — a single deep link route, WebView or Keychain entry with only the code it touches — instead of asking a model to scan the whole app, and store the checks as tool-agnostic skills so every later run inherits new lessons.", "recommendation": {"advice": "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.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/building-secure-mobile-apps-in-the-agentic-era", "markdown": "https://wpnews.pro/news/building-secure-mobile-apps-in-the-agentic-era.md", "text": "https://wpnews.pro/news/building-secure-mobile-apps-in-the-agentic-era.txt", "jsonld": "https://wpnews.pro/news/building-secure-mobile-apps-in-the-agentic-era.jsonld"}}