All Articles
12 min read Security Building Apps AI

Building AI Apps Inside Organisations: Security Beyond the Demo

A technical guide for engineers, platform teams and security reviewers: recent threats, application controls, AI security and production readiness.

A cheerful robot rolls a tiny app across an engineered bridge, while a protective screen blocks a mischievous paper creature’s message.
A bright idea needs a well-built path to production.

A demo proves that an app can complete a task. Production asks a harder question: can it complete only the tasks it is allowed to, using only the data it should see—even when an input is hostile, a credential is stolen or a dependency changes? AI makes that question more urgent because retrieved text can influence execution and generated output can become an action.

For application engineers, platform/DevOps teams and security reviewers building organisational web apps, low-code tools and AI-enabled workflows. The argument runs from recent threat evidence to enforceable controls, platform choices and release evidence. The aim is to help you decide where to place a control, what technology can support it and how to prove it works.

What recent threats change for app builders

These selected reports, including September–October 2026 publications, show different entry points into an organisation’s systems. They are not a prevalence ranking. The engineering implications below are my synthesis of the documented findings.

Selected disclosures, observed campaigns and evaluation findings; sources reviewed 16 October 2026.
Evidence and dateDocumented findingEngineering implication
Unintended agent actions
Published 9 October 2026
Anthropic reported evaluation and internal-use cases involving external command execution, unintended form submission and workarounds to tool restrictions. These were reported model behaviours, not a customer breach campaign.54Enforce tool permissions outside the model. Deny unnecessary outbound access, isolate evaluation environments, validate final destinations after redirects and require approval for consequential submissions.
EvilTokens device-code phishing
Published 22 September 2026
Microsoft documented attackers abusing device-code authentication to obtain tokens, access mailboxes and establish persistence; AI supported lure creation and post-compromise analysis.55Disable unused authentication flows at the identity provider; narrowly scope required exceptions. Monitor token use and new device registrations. Test containment against still-valid access tokens, not only refresh-token revocation.
Agent-enabled credential theft
Published 8 September 2026
GTIG described an observed Q2 2026 campaign using AI-agent workflows after a cloud resource was compromised.4Reduce the time between exposure and containment: scoped identities, outbound restrictions, actionable alerts and tested credential revocation matter as much as model filters.
AI packages and CI/CD as entry points
Published 30 July 2026
GTIG/Mandiant described February–May 2026 compromises across PyPI, npm and Docker Hub, including abuse of GitHub Actions pull_request_target and attempts to pivot from compromised AI software.25Never execute untrusted pull-request code in a privileged workflow. Use minimal workflow permissions and short-lived workload credentials; isolate package installation and AI developer tools from production secrets and networks.
Axios npm compromise
31 March 2026
GTIG reported malicious dependencies in Axios releases 1.14.1 and 0.30.4, delivered through a compromised maintainer account.2Treat installs and build jobs as execution environments. Review dependency changes, restrict runner credentials and egress, and retain package provenance. A lockfile can pin a malicious release too.
React Server Components
3 December 2025
The React Team disclosed unauthenticated remote code execution in affected Server Components packages, CVE-2025-55182.1An internal-looking frontend may still expose server execution paths. Inventory deployed framework versions, follow current advisories and verify the rebuilt production artefact—not only the manifest.
Salesloft Drift integrations
August 2025
GTIG/Mandiant observed stolen OAuth tokens used to access connected Salesforce instances and export data; the compromise also affected other integrations.3Review connector grants and effective scopes. A compromised integration can bypass the employee’s interactive login; inventory tokens, monitor their use and rehearse revocation.

The React entry is a vulnerability disclosure; the October agent entry reports evaluation/internal-use behaviours; the remaining entries describe observed attacks or campaigns. Publication dates are labelled separately from activity dates. None establishes that every internal app is affected. Check the affected technology, version, exposure and configuration.

The design lesson: the entry points differ, but the engineering question repeats: what authority does a stolen token, installed package or agent action inherit? Review the identity, data and network reach available after that first failure. That is where an isolated problem can become an organisational incident.

The technical controls to design into the app

Start with a data-flow and identity diagram: browser, API, background workers, storage, model services, third-party connectors and client-facing delivery. Mark where identity, data sensitivity or execution authority changes. Include caches, indexes, logs and backups.

1. Identity, access and untrusted input

Establish who is acting and what they may reach before processing content. Frontend behaviour supports the experience; APIs and workers enforce the permissions.

1. Identity, access and untrusted input · threat, implementation and verification.
LayerThreatControls and technology choicesVerification
Identity and sessionsStolen sessions, forged tokens or shared service credentials.Use the organisation’s identity provider through OIDC/SAML as appropriate; require MFA according to risk. Validate issuer, audience, signature and expiry server-side. Use protected cookies for cookie sessions and CSRF protection for state changes.56Reject expired/wrong-audience tokens; test logout, role changes and service-account scope.
API and object accessCross-team file access, tenant leakage and unauthorised edits or sharing.Authorise every object/action in APIs and jobs. Bind organisation/workspace context to verified identity. Consider an authorisation service or database row-level security; ensure the application role cannot bypass it.78910Change file/workspace IDs; test reader/editor/client roles, revoked membership and asynchronous jobs.
Frontend and previewsStored XSS in uploaded content or generated HTML; browser-exposed secrets.Use context-appropriate encoding, safe rendering and sanitisation for permitted rich content. Keep secrets out of browser bundles. Hidden controls and CORS are not object-level authorisation.115Exercise hostile HTML/links in previews; inspect bundles and direct API calls.
Uploads and document workersMalware, parser exploitation, oversized files and decompression/resource exhaustion.Allow required formats; validate signatures, size and content. Quarantine/scan uploads before processing. Isolate parsers with limited privileges, time, storage and network access.12Use malformed, disguised and oversized test files; verify worker limits and inaccessible quarantined files.

2. AI context, actions and data

Retrieval and execution need separate boundaries. Permission to read a source does not automatically grant permission to share a generated result or call a tool.

2. AI context, actions and data · threat, implementation and verification.
LayerThreatControls and technology choicesVerification
AI retrieval and generationCross-user retrieval, indirect prompt injection, unsupported claims and sensitive output.Filter before content reaches the model; preserve source permissions in chunks and indexes. Separate untrusted content from instructions. Evaluate output grounding and leakage. Classifiers supplement access controls; they do not enforce ownership.131415Inspect retrieved context, generated text and citations under different identities. Test source-permission changes, poisoned documents and missing evidence.
Agent actions and deliveryTool misuse, SSRF, unauthorised publishing or sharing with the wrong client.Expose narrow tools; validate arguments and destinations outside the model. Recheck permission at execution. Bind sharing approval to exact content, audience and expiry; use replay protection and idempotent execution.161718Test changed recipients/content, expired approvals, duplicate retries and attempts to contact blocked destinations.
Storage and processing locationPublic storage, uncontrolled copies or processing outside the approved geography.Encrypt data, restrict key access and define retention across files, indexes, outputs and backups. Verify processing routes and subprocessors separately from storage location; deployment type can change routing.192021Check effective policies, routes, deletion/restore behaviour and encryption/key settings for each service.

3. Infrastructure, delivery and response

The same boundaries must survive deployment and operation. A secure application can still inherit excessive authority from its network, build runner or service identity.

3. Infrastructure, delivery and response · threat, implementation and verification.
LayerThreatControls and technology choicesVerification
Network and service boundariesExposed databases/admin endpoints, unrestricted outbound access and lateral movement.Use TLS, network segmentation, private connectivity where appropriate and controlled egress. Restrict destinations at the network and application layers; test DNS/routing and service identities.222318Test public access, unexpected service-to-service calls and outbound attempts. A private endpoint alone does not enforce user permissions.
Dependencies and CI/CDMalicious packages/actions, leaked build secrets and unsafe infrastructure changes.Review dependency and pipeline changes; restrict install hooks where feasible. Use isolated runners, short-lived deployment identities and protected releases. Scan code, dependencies, images, secrets and infrastructure configuration.242526Check the deployed artefact and pipeline permissions; test a blocked release, rollback and credential revocation.
Operations and incident responseUndetected data extraction, excessive AI spend or an app nobody can disable.Log security-relevant actions without retaining sensitive content by default. Set rate/usage limits and alerts for unusual exports, tool calls and credential use. Assign incident ownership and a way to disable connectors or sharing.273Exercise an investigation, tool shutdown, restore and secret rotation. Check alerts reach someone able to act.

Sovereign AI: who controls the service behind the app?

Application permissions determine what a user or agent can do. Sovereignty adds a different question: who has authority over the infrastructure, models and operations the app depends on? A region-restricted deployment can still depend on external administrators, update services or control planes.

How major providers frame it. NVIDIA describes sovereign AI at national scale: domestic infrastructure, data, skills and business ecosystems.60 IBM defines AI sovereignty as an organisation’s or nation’s ability to control its AI stack, including infrastructure, data, models and operations.61 Microsoft organises AI workload guidance around data, operational and technological objectives across the lifecycle.58 AWS emphasises data residency and operator-access restrictions alongside resilience, independence and choice across the stack.59

These published positions overlap on control but differ in scope; they are not an independent benchmark or evidence of how all enterprises operate. Here, the relevant scope is the organisation’s workload: translate its data, supplier-access and continuity requirements into architecture decisions. This complements the security controls above by testing whether the platform and supplier arrangements can uphold them.

Turn sovereignty requirements into deployment decisions and evidence.
ConsiderationEstablish nowVerify in the app and its services
Data and processing boundaryWhich information must stay in approved locations, including prompts, files, embeddings, outputs, telemetry and backups?Check storage, inference and embedding endpoints, cross-region failover, support logs and subprocessors. Enforce approved routes and destinations in deployment policies and network controls.
Operator access and authorityWho may administer or support the workload, from which locations and under which contractual or jurisdictional requirements?Review provider commitments with accountable teams; restrict privileged roles, require time-limited access and audit support/admin activity.
Keys, models and dependenciesWho controls encryption keys, model versions, updates and connected services?Check actual key custody and access, model provenance, update approvals and external calls. Customer-managed keys alone do not establish control over every processing path.
Continuity and exitWhat must keep working if a provider, external connection or model is unavailable?Test degraded operation, recovery and export/redeployment options; include external identity, model licensing, registries and control-plane dependencies.

When this changes the design. If approved-region processing is the requirement, verify service routing and failover. If restrictions also cover provider administration or operation during an external outage, assess operator access and control-plane dependencies; a regional endpoint alone does not answer those questions. Compare managed regional, sovereign-cloud and self-hosted options against the actual requirements and operational costs. The outcome should be a documented boundary, its evidence and accepted dependencies—not a “sovereign” product label. A national AI strategy is beyond this article’s scope.

Choose capabilities before products

Once the control and its enforcement point are clear, choose the technology. A source scanner examines code; an AI evaluation framework exercises model and tool behaviour; a runtime filter inspects live content. None replaces the backend’s object permissions. Start with the capabilities already available in the organisation, then fill the gaps below.

Examples of available approaches; verify edition, coverage, integration and data-processing terms.
CapabilityTechnology examplesSelection criteria
Source and dependency analysisCodeQL, Semgrep, Snyk Code/Open Source, Trivy; AI-assisted vulnerability review such as Claude Security (public beta for Enterprise; a separate Claude Code plugin is also in beta).282930313233Supported languages and artefacts, deployment model, actionable findings and testable fixes. Static analysis cannot prove business permissions.
Running web/API testingZAP and Burp Scanner.3435Authenticated route coverage and repeatable tests. Passive baseline scans and active testing are different modes.
AI evaluation and red teamingPromptfoo, Microsoft PyRIT and specialist services such as Mindgard.36373839End-to-end access to retrieval/tools, realistic attack cases, reproducible findings and visibility into side effects.
Runtime screening and agent governanceCheck Point AI Guardrails, Prisma AIRS, Model Armor and Zenity; platform policies such as Copilot Studio data policies.4041424344Where enforcement occurs, monitored versus blocked actions, connector coverage, false positives, latency and treatment of inspected data.
Authorisation and cloud exposureApplication policies or OpenFGA for object access; database row-level policies; cloud controls and posture platforms such as Wiz.91045Correct identity propagation, revocation, bypass paths and effective deployed configuration. These are separate capabilities, not substitutes.
For instance: managed platform features and their limits

Azure AI Search and Bedrock Knowledge Bases provide retrieval patterns; Foundry Prompt Shields, Bedrock Guardrails and Model Armor provide content controls. AgentCore Identity illustrates credential management for agents. Check the actual identity, permission filtering and enforcement path; native Azure AI Search ACL/RBAC features remain in preview, while security-string filters trust identity supplied by your app. Bedrock Managed Knowledge Base ACL filtering also relies on application-verified identity; it does not authenticate end users or replace application authorisation. Bedrock’s prompt-attack filter does not assess tool results, so check those paths separately.1446154748494250

Cloud-specific options are implementation examples. The requirements—authorised access, constrained actions, approved processing locations and observable execution—remain the same across providers.

What should be required before production?

Turn the design into evidence someone else can inspect. For each important boundary, name its owner, the test that challenges it and the result from the deployed environment. Use the six areas below to organise that review.

Architecture and ownershipNamed owners, data flows, trust boundaries, deployment locations and an inventory of third-party grants.
Automated checksAccess-control tests plus relevant code, dependency, image, secret and configuration scans on changes.
Adversarial verificationTest the deployed frontend/API and AI path with different roles, poisoned inputs, revoked permissions and retries.
Release evidenceRecord tested versions, confirmed findings, fixes and any explicitly accepted, time-limited exceptions.
Operational readinessAlerts, rate/cost limits, support ownership, recovery procedures and tested connector/tool shutdown.
Change reviewReassess new sources, models, connectors, client access, network exposure and write capabilities.

Use OWASP ASVS 5.0.0 for application requirements, the OWASP LLM Top 10 2026 and Agentic Top 10 2026 with MITRE ATLAS for AI threat coverage, and the final NIST SSDF 1.1 for secure delivery practices. Convert the relevant requirements into verifiable checks; a framework badge or clean scanner result is not release evidence on its own.5113525326

Also track the NIST SSDF 1.2 initial public draft; it has not replaced the final 1.1 baseline. For agent runtime integration, OWASP’s emerging Agent Control Standard defines hooks for policy enforcement and observability. Assess implementation maturity, bypass paths and failure behaviour before relying on it.5657

Security verification also needs the organisation’s data, privacy, contractual and supplier decisions. Confirm permitted uses and processing arrangements with the accountable teams; technical tests alone do not establish compliance.

Make the security boundary enforceable

A production app is a chain of permissions: who can enter, which data they can reach, what code or AI can execute, and where the result can go. A failure at any link can expose the whole workflow. Before release, require evidence that the backend rejects unauthorised access, workers and agents cannot exceed their scope, the deployed artefact is traceable, and the team can revoke access and contain an incident. If those controls depend on a hidden button, a model following instructions or someone remembering a manual step, the boundary still needs engineering. Tools and threats will change; the organisation must be able to explain, test and enforce what its app is allowed to do.

Sources and research notes · 61 references

Source destinations and factual claims rechecked 16 October 2026. Incident reports, product documentation, framework status and sovereignty definitions were reviewed against the statements made here. Current guidance uses the 2026 OWASP LLM and Agentic editions and ASVS 5.0.0. NIST SSDF 1.1 remains the final baseline; 1.2 is labelled as a draft. Original incident reports and the detailed 2025 Excessive Agency entry are retained as supporting evidence, not presented as the latest framework edition. Product documentation is maintained by its publishers; confirm API versions, availability and limitations when implementing. Incident facts are separated from engineering recommendations. This is a selected technical review, not a complete threat feed or independent product benchmark.

  1. 1React Team. React Server Components remote-code-execution vulnerability, CVE-2025-55182, disclosed 3 December 2025.
  2. 2Google Threat Intelligence Group. Axios npm supply-chain compromise, 31 March 2026.
  3. 3Google Threat Intelligence Group / Mandiant. Salesloft Drift OAuth-token theft campaign, August 2025.
  4. 4Google Threat Intelligence Group. AI Threat Tracker: From Prompting to Autonomy, 8 September 2026.
  5. 5OWASP. REST Security Cheat Sheet.
  6. 6OWASP. Session Management Cheat Sheet.
  7. 7OWASP. Authorization Cheat Sheet.
  8. 8OWASP. Multi-Tenant Security; shared storage, caches and background jobs. Applied here to workspace boundaries.
  9. 9OpenFGA. Perform a Check.
  10. 10PostgreSQL documentation. Row security policies, default-deny behaviour and role bypass.
More references · 51 additional sources
  1. 11OWASP. Cross-Site Scripting Prevention Cheat Sheet.
  2. 12OWASP. File Upload Cheat Sheet.
  3. 13OWASP. GenAI LLM Top 10 2026, published 3 August 2026; current edition reviewed 15 October 2026.
  4. 14Microsoft Learn. Document-level access control in Azure AI Search; preview features and permission synchronisation.
  5. 15AWS. Document-level access controls for Managed Knowledge Base custom data sources; ACL filtering limitations.
  6. 16OWASP Gen AI Security Project. LLM06:2025 Excessive Agency.
  7. 17OWASP. Transaction Authorization; approval tied to operation details, expiry and execution. Applied here to document sharing.
  8. 18Microsoft Inside Track. Protecting AI conversations at Microsoft with MCP security and governance, 12 February 2026.
  9. 19AWS. Data protection in Amazon Bedrock.
  10. 20Microsoft Learn. Data, privacy and security for Foundry Models sold by Azure; Global and DataZone processing locations.
  11. 21AWS. Cross-region inference in Amazon Bedrock; geographic and global processing routes.
  12. 22Microsoft Learn. Configure network isolation for Microsoft Foundry.
  13. 23AWS. Private connections to Amazon Bedrock with interface VPC endpoints.
  14. 24OWASP. CI/CD Security Cheat Sheet.
  15. 25Google Threat Intelligence Group. Mitigation Guidance for Supply Chain Compromise, 2026.
  16. 26NIST. Secure Software Development Framework (SSDF), SP 800-218, version 1.1.
  17. 27OWASP. Logging Cheat Sheet.
  18. 28GitHub Docs. Code scanning with CodeQL.
  19. 29Semgrep. Code overview.
  20. 30Snyk. Code: static application security testing.
  21. 31Snyk. Open Source: dependency and licence analysis.
  22. 32Trivy. Scanner overview and supported targets.
  23. 33Anthropic. Claude Security product capabilities and Claude Code plugin availability.
  24. 34ZAP. Baseline scan behaviour and authenticated scan configuration.
  25. 35PortSwigger. Burp Scanner documentation.
  26. 36Promptfoo. Broken object-level authorisation testing.
  27. 37Promptfoo. Indirect prompt injection testing.
  28. 38Microsoft. PyRIT open-source AI risk testing framework.
  29. 39Mindgard. AI red-teaming service scope; vendor description.
  30. 40Check Point AI Security. AI Guardrails; current documentation hosted on the Lakera domain.
  31. 41Palo Alto Networks. Prisma AIRS AI Runtime Security overview.
  32. 42Google Cloud. Model Armor filters, enforcement modes and limitations.
  33. 43Zenity. AI agent security and governance platform; vendor capability description.
  34. 44Microsoft Learn. Configure data policies for agents.
  35. 45Wiz. Securing AI applications from inception to deployment; vendor capability description.
  36. 46AWS. Access control for vector stores using metadata filtering with Amazon Bedrock Knowledge Bases.
  37. 47Microsoft Learn. Prompt Shields in Microsoft Foundry; document attacks, intervention points and Spotlighting preview.
  38. 48AWS. How Amazon Bedrock Guardrails works; input/output policies and continuing evaluation.
  39. 49AWS. Detect prompt attacks with Amazon Bedrock Guardrails.
  40. 50AWS. Identity and credential management for agent applications with AgentCore Identity.
  41. 51OWASP. Application Security Verification Standard (ASVS), version 5.0.0.
  42. 52OWASP. Top 10 for Agentic Applications 2026.
  43. 53MITRE. ATLAS adversary tactics and techniques for AI systems.
  44. 54Anthropic. Investigating unintended model actions in our evaluations and internal use, 9 October 2026 (corrected 12 October).
  45. 55Microsoft Threat Intelligence. Unmasking EvilTokens: Getting to the root of device code phishing, 22 September 2026.
  46. 56NIST. SSDF Version 1.2, SP 800-218 Rev. 1, initial public draft dated 17 December 2025; draft status checked 15 October 2026.
  47. 57OWASP GenAI Security Project. Agent Control Standard (ACS), published 1 September 2026; emerging runtime-control specification.
  48. 58Microsoft Learn. AI workloads and sovereignty; updated 31 March 2026, reviewed 15 October 2026.
  49. 59AWS Security Blog. Enabling AI sovereignty on AWS; reviewed 15 October 2026.
  50. 60NVIDIA. National Transformation With Sovereign AI; national-capability definition reviewed 16 October 2026.
  51. 61IBM. What is AI sovereignty? Updated 11 September 2026; reviewed 16 October 2026.

Share this article