How Spice AI Secures Infrastructure Against Machine-Speed Attacks

Spice AI

Engineering

Luke Kim

Luke Kim

Founder and CEO of Spice AINovember 21, 2026
Engineering at Spice.ai title card reading Secure by Default, by Design, in Depth, beside three nested security boundaries

TL;DR: AI agents now take an intrusion from first access to privileged access in hours, through flaws and credentials that already exist. Human operators can't compete with machine speed, which makes the controls in place before an attack more important than they have ever been. Spice's controls follow three principles: secure by default (a new system exposes nothing), secure by design (short-lived identity leaves no stored key to steal), and secure in depth (each layer assumes the one in front of it failed, and infrastructure rebuilds from code). A 90-day plan for engineering leaders puts them in order.

What changed this autumn?

On November 13, 2026, the FBI published a threat overview of ARTEX, an open-source framework that turns a written goal into an intrusion run by AI agents. Since at least August, attackers have used it against financial services, government, healthcare, defense, legal, and other sectors. Some of those intrusions went from first targeting to privileged access in under three hours.

Bitrise has described what that speed looks like. Its attacker signed in as a dormant test bot that didn't have two-factor authentication. It made its first cloud call about 10 minutes later, and then "chained one credential into the next."

Agents make old flaws cheap to find, because an agent tries every door on every host in parallel, including the partner portal and the forgotten staging app that a person would skip. The FBI's list of access methods reads like an old pentest report: injection flaws, APIs with no authentication, and weak admin passwords. It adds admin passwords hardcoded in JavaScript bundles, stolen VPN configurations, and a token forged with keys that weren't rotated. Even the FBI is a target: on November 21, AP reported that it is investigating an apparent breach of its National Crime Information Center.

Why can't detection and response keep up?

ARTEX traffic is noisy, and the FBI notes that it "may trigger alerts." But an alert at minute 20 of a three-hour intrusion still needs a person to read it, decide, and act before the agent finishes. Bitrise detected its attacker and still "felt we were falling behind on the response curve," so it switched its platform off.

Detection still scopes an incident and guides the recovery. It can no longer be the control that stops the attack. The controls that stop it make the first step fail: short-lived credentials leave nothing standing to steal, admin panels sit behind identity where an agent cannot reach them, and hosts rebuild from code, so a foothold does not survive. Most of those are design decisions, which makes this a leadership problem as much as an engineering one.

What did this autumn's breaches have in common?

ARTEX is one tool. The breaches that companies disclosed between August and November show the same patterns with or without it:

BreachWay inWhat stops the first step
Fireworks AI, August to OctoberStolen credentials and a service flaw, then development machines at a breached cloud providerProduction controls in development, and no path from development to production
Railway, October 20 to 21A previously unknown escape from shared builders, then a misconfigured OIDC bindingA VM for each build, pinned OIDC bindings, and no long-lived decryption key on any host
Cursor's extension marketplace, October 29Malicious builds of the Claude Code extension, available for about 11 hoursAn extension allowlist, and a rebuild of every host that ran the build
Northflank, October 30A previously unknown remote code execution flaw in an API componentDecryption kept out of user-facing components, and workload identity in place of stored keys
NEAR AI, disclosed November 9A remote code execution flaw in SGLang, on a server in its confidential computing environmentAn inference engine patched like any internet-facing server, with no credentials it does not need
Aikido: wfx-loot, November 10 to 12Stolen GitHub tokens from 4,837 accounts, used to steal CI secrets in more than 1,800 repositoriesNo personal access tokens, and trust policies pinned to a protected environment
Bitrise, November 12 to 13A dormant internal test bot with a valid password and no two-factor authenticationDelete dormant accounts, and require multi-factor authentication (MFA) for every account, bots included

Table 1: Seven breaches disclosed between August and November 2026, how each attacker got in, and the control that stops the first step.

Three patterns repeat. Build, CI, and development systems were the way in at Fireworks, Railway, Bitrise, and the Aikido victims. AI provider keys were the prize: Railway's attacker "was specifically prioritizing AI provider keys" and ran up about $740,000 of unauthorized AI spend. And every escalation ran on a long-lived credential. Railway and Northflank also began with a previously unknown flaw, which no patch process closes in time; only the next layer can.

The fixes these companies announced are the controls in the rest of this post. Railway now gives each build its own VM and moves to short-lived credentials. Northflank is moving to workload identity and envelope encryption. Bitrise revoked all 919 of its cloud service account keys and rebuilt from trusted sources.

How should you frame the defense?

In April 2023, CISA, the FBI, the NSA, and the agencies of six other countries published joint guidance on secure by design and secure by default. It asks software makers to own their customers' security outcomes, and states that "a secure configuration should be the default baseline." We build Spice on the ten principles on our security page, grouped under three questions that a leader can ask of any system:

  • Secure by default: what does it expose before anyone configures it? The answer should be nothing. Admin paths stay private, identities start untrusted, and secrets stay out of repositories, until a deliberate change allows otherwise.
  • Secure by design: what is there to steal? The architecture removes the asset instead of guarding it: short-lived identity instead of stored keys, and data we delete instead of protect.
  • Secure in depth: what stops an attacker who gets in? Every layer assumes that the one in front of it failed, and infrastructure gets rebuilt so that nothing an attacker plants survives.
Animation: without layers, an AI agent takes the key from an exposed admin panel and uses it to reach the cloud account and the data. With three layers, the private admin panel stops the first probe: secure by default. A web app flaw still gives the agent code execution, but the app's scoped workload token cannot open the cloud account: secure by design. A network policy gives the app no route to the data: secure in depth.AI AGENTATTACKERADMIN PANELPRIVATEWORKLOAD IDSHORT-LIVEDCLOUDACCOUNTDATARECORDSWEB APPZERO-DAYNETWORK POLICYBY DEFAULTNOT EXPOSEDBY DESIGNSCOPED TOKENIN DEPTHNO ROUTETHREE LAYERSMACHINE-SPEED ATTACK · CREDENTIAL CHAINILLUSTRATIVE · GENERIC SYSTEMS

Figure 1: Without layers, one exposed admin panel and one stored key lead an AI agent to the data; with three layers, a private panel, a workload token scoped to one app, and a network policy each stop one step.

PrincipleWhat Spice runsWhere to start
ComplianceSOC 2 Type II, with yearly penetration, disaster recovery, and incident response testsChoose a framework, and make each control produce its own evidence
Secure access controlAn identity-aware proxy and single sign-on for staff tools, and roles in every Spice Cloud orgCheck authorization in every route, not only in the database
Data protectionTLS in transit, and stored secrets encrypted with keys that no person handlesKeep the permission to decrypt apart from the permission to read
Multi-factor authenticationMFA on every staff sign-in, checked by the applications themselvesPasskeys or hardware keys for everyone with production access
Least privilegeRoles scoped to named resources, and read-only staff access by defaultStart every identity from no permissions
Defense in depthLayered admin access, separate environments, egress allowlists, and regular rebuildsFor each control, ask what stops the next step when it fails
AuditableAn audit record for each sensitive change, and for staff access to customer dataTurn on audit logs before you need them
Secure codeSecret scanning, code scanning, and dependency checks that block a merge, plus AI reviewTurn on your repository host's security defaults everywhere
Code auditsOutside experts, yearly penetration tests, and agentic testsRun your own agent first, then pay for an outside test
Just-in-time accessTime-limited privileged access, with a justification for each activationMake every admin role eligible, not permanently assigned

Table 2: The ten principles on the Spice AI security page, what Spice runs for each, and where to start.

Customers on the Spice.ai Enterprise plan can request our SOC 2 Type II report. The rest of this post takes the three questions in order, with the decisions behind each one. The engineering detail lives in six guides on /learn, linked from each section.

Secure by default: what does a new system expose?

Nothing, when the defaults are right. Scanners find a new host quickly, and an agent works through whatever they find. Four defaults remove most of what an agent finds first.

No admin path on the internet. Admin panels, dashboards, Kubernetes APIs, and SSH belong behind an identity-aware proxy or a private network, never on an open port. Our staff tools check both the person and the device, and each application verifies the proxy's token itself. DigiCert disclosed in November that an internal archive became reachable from the internet after a network move, and attackers got in through a self-registration feature that needed no MFA. What is privileged access management? has the setup for Cloudflare Access, Google Cloud IAP, Tailscale, and Envoy in Kubernetes.

Phishing-resistant MFA, and recovery that is as strong as sign-in. A one-time code can be phished along with the password, and a passkey or hardware security key cannot. Okta, Microsoft Entra ID, and Google Workspace can require them. Require one for everyone with production access, and remove the weaker fallbacks. Then fix the help desk, because an attacker who cannot phish a passkey calls and asks for a reset.

Images that hold only what runs. The Spice runtime's container image builds FROM scratch and runs as the nobody user. A code execution bug in it finds no shell, package manager, or curl to take its next step. Where an empty base is too bare, Docker Hardened Images, distroless images, Chainguard, and Azure Linux distroless images are hardened starting points.

Repositories that start closed. New repositories in our GitHub org start with secret scanning push protection and Dependabot alerts on, before anyone pushes the first commit.

A default that a person must remember is a default that drifts.

Secure by design: what is left to steal?

Railway's attacker escalated through a build credential and a misconfigured OIDC binding to a long-lived decryption key. Railway drew the right conclusion: "Wherever possible, we are using short-lived credentials that are narrowly scoped and issued just in time." The design goal is that no long-lived secret exists for an attacker to find, whether in a vendor's environment, a CI log, a laptop, or a JavaScript bundle.

Replace stored keys with workload identity. A workload proves who it is with a short-lived token from its platform, and the cloud exchanges that token for short-lived credentials. Our hosted apps, edge services, and CI reach the cloud this way, and our GitHub orgs turn off deploy keys and personal access tokens. The same pattern now covers model APIs: OpenAI and Anthropic both accept federated tokens, and our CI calls models with no stored key. Vercel found that only 8.4% of more than 1,000 SaaS vendors supported secure authentication. Its CTO, Malte Ubl, put the conclusion plainly: "The only real fix is to kill long-lived static credentials." The trust policy then becomes the asset, which What is workload identity federation? covers.

Make privilege just in time, on a separate account. Our staff are eligible for privileged roles and activate one for a limited time, with a written justification, when a task needs it. Every activation leaves an audit record. Production access also belongs on a separate account from the one that reads email, so a phished everyday sign-in reaches nothing. Microsoft goes a step further and gives its own administrators dedicated admin workstations.

Keep the keys apart from the data. Spice Cloud encrypts data in transit with TLS 1.2 or later and at rest with AES-256, and stored secrets get a second layer with keys that no person handles. The lesson from Northflank is where decryption runs: its attacker found one component that could both read and decrypt secrets, and had a working script within six minutes. What are encryption in transit and encryption at rest? covers the settings.

Secure in depth: what stops an attacker who gets in?

Between November 11 and November 19, researchers disclosed critical flaws in Apache httpd, nginx, MySQL, PHP, Ruby, OpenJDK, and Ghostscript. The Linux kernel had its own in the weeks and months before. AI found or exploited several of them. Wiz found both nginx flaws with its own AI harness: "The flaws were already there; AI helped us find them." Hacker News stories with "RCE" in the title went from 84 between January 1 and November 20, 2025, to 218 over the same dates in 2026. Attackers use the same tools, and a flaw that an attacker finds first is a zero-day.

So assume every layer has a hole nobody has found yet, and decide what stops an attacker who gets through it. What is defense in depth? has a table of these flaws with the fix and the interim step for each, and covers each layer below in detail.

Put patching on a deadline. A fix protects nobody until it is deployed. Give known exploited flaws, and critical flaws that the internet can reach, a fix within days. On November 20, CISA gave federal agencies three days for two new entries in its Known Exploited Vulnerabilities catalog. Give everything else weeks, not a quarter. Patch what actually runs, too: a host update does not fix the copy of Ghostscript inside a container image. And give every ingress controller, operator, and VPN gateway an owner, because nobody upgrades a component that nobody owns.

Treat every environment like production. A development environment holds real credentials, CI tokens, and network paths to production, and it gets less attention. Fireworks' second intruder reached part of its production systems through development machines at a breached cloud provider. Our development and production systems run in separate accounts with separate keys, under the same controls, with no trust path between them.

Raze and rebuild instead of hunting. The FBI lists what ARTEX agents leave behind to keep their access: web shells, remote access tools, and new SSH keys. Hunting each one is slow, and it misses the ones nobody finds.

Animation: an attacker leaves a web shell, a new SSH key, a remote access tool, and a scheduled task on two hosts. A hunt on the first host removes the web shell and the scheduled task, but the SSH key and the remote access tool stay. The second host is erased and rebuilt from code with new credentials. Every artifact on it is gone, found or not, and the data kept outside the host stays.HUNT AND PATCHHOSTLONG-LIVEDREMOVEDNEW SSH KEYREMOTE ACCESS TOOLREMOVEDMISSED ARTIFACTSOLD CREDENTIALSRAZE AND REBUILDCODEDATAOUTSIDEHOSTREBUILTNO ARTIFACTSNEW CREDENTIALSPERSISTENCE · HUNT VS REBUILDILLUSTRATIVE · HOST PERSISTENCE

Figure 2: A hunt removes only the artifacts someone finds and leaves the old credentials, while a rebuild from code removes every artifact on the host, found or not, issues new credentials, and keeps the data stored outside the host.

Raze-rebuild is one of our infrastructure principles. Every service must rebuild automatically from declarative code, validated on a schedule, with critical state stored outside the thing being rebuilt. Development is erased and rebuilt with new credentials on a schedule. Production rebuilds into capacity that serves no traffic, and a person approves the cutover. Railway and Bitrise both contained their incidents by rebuilding from trusted sources, and a team that rebuilds routinely has rehearsed that move. A rebuild does not reach identity systems, though: an OAuth credential or a new IAM user survives it, so audit those separately.

Put untrusted code in a microVM. Containers share the host kernel, and this autumn's kernel flaws include a container escape and a remote root exploit in the host's network stack. AI agents that run generated code, CI builds of outside pull requests, and customer workloads belong behind a VM boundary with its own kernel. A confidential VM is not a substitute for patching: NEAR AI's attacker ran code inside one through a flaw in its inference engine. Our own rule for agents is that browser automation and untrusted code run only in a sandbox with no host home directory, credentials, SSH keys, or browser profiles.

Watch what leaves. An implant that cannot reach its model API or its drop site is stuck, so put servers on an egress allowlist. Plant canary credentials where an attacker would look, because an agent tries every credential it finds. And turn on audit logs before you need them, because logs that cannot rule out access to a credential store leave one safe step: rotate every credential in it.

Delete what you don't use

Every system you keep is one an agent can find. The FBI's first recommendation is an inventory of every internet-facing application, including "partner and supplier portals, mobile backends, employee applications, sales-support systems, legacy services, third-party integrations."

The cheapest system to secure is the one you deleted.

We apply that to infrastructure, credentials, and data. When a service moves, the old deployment goes. Every credential has an owner and an end date, and a vendor's keys end with the engagement. Dormant accounts go too, bots included. A delete in Spice Cloud is a soft delete first, so a mistake stays recoverable for 28 days, and after that a scheduled job hard-deletes the rows. Data that you no longer hold cannot leak.

Secure the supply chain: what do you run that you did not write?

Most of the code in production came from someone else: open-source packages, CI actions, base images, browser scripts, IDE extensions, and model weights. The FBI lists supply chain compromise among ARTEX's capabilities, and one campaign in its advisory went through a single backup vendor to attempted sign-ins at more than 2,250 downstream tenants.

Our repositories block a merge until secret scanning, code scanning, and license checks pass, and every pull request gets AI code review. We pin third-party actions to commit hashes, sign commits, put a package firewall in front of npm, and let new dependency versions wait out a cooldown before we adopt them. Spice.ai Enterprise releases ship SBOMs with build provenance attestations, and starting with the upcoming Spice v2.5.0, every open-source release file carries a provenance attestation that anyone can verify.

The chain reaches past code. On November 16, attackers changed scripts served by Optimizely, and 186 sites showed their visitors the attackers' wallet addresses. In August 2025, OAuth tokens stolen from the Salesloft Drift integration let an attacker export data from Salesforce at hundreds of companies, Google's Threat Intelligence Group reported. List every OAuth app that can reach your SaaS tenants, and remove the ones nobody uses. What is software supply chain security? has the settings for each control, from secret scans to SBOM verification.

How should you test your defenses?

Point the same class of agent at your own systems before someone else does. The FBI says attacker-run ARTEX instances mostly use the DeepSeek Flash family, and those weights, like GLM's, are published under the MIT license. Run the model locally where you can, because the output of an AI pentest is a map of your weaknesses, and inference providers get breached too. Spice serves open-weight models through its LLM inference platform, and the Spice cookbook has recipes for DeepSeek V4 and GLM. The labs run programs for defenders as well, such as OpenAI's Daybreak and Anthropic's Project Glasswing.

The standard models are enough for most testing. Spice AI does not endorse uncensored or abliterated models. The cookbook lists them, with their risks, for information. If you use one, be extremely careful, because it carries out almost any instruction, including a prompt injection planted in the system under test. Run the agent in a dedicated VM in a separate account, with throwaway credentials, and never expose its console: researchers counted more than 1,600 public ARTEX consoles by early November. What is agentic penetration testing? has the isolation rules.

Then pay people to look. An agent finds known classes of flaw quickly and on every run. A person with a week and your architecture diagram finds the rest: authorization gaps between tenants, business logic that lets a valid request do the wrong thing, and chains of small issues. Our policy calls for penetration tests at least once a year, and outside experts audit our code as well. Give testers source code and an account for each role, hand them your agent's report, and pay for a retest of every fix. Spice takes vulnerability reports at security@spice.ai and through GitHub private vulnerability reporting.

How do you know it is working?

A security program that reports activity, such as alerts closed or scans run, can look busy while the doors stay open. These measures track the doors:

MeasureWhy it mattersAim for
Long-lived credentials, and the age of the oldestEach one is a possible first step, such as a vendor's key that nobody retiredFewer every month, each with an end date
Standing admin rolesA standing role works for anyone who steals the sessionNone
People with production access and no phishing-resistant factorA phished code opens the same door as a passwordNone
Time to fix a known exploited flaw that affects youAttackers already use these flawsDays
Internet-facing hosts that nobody ownsThe FBI's "peripheral systems" are where agents get inNone
Time to rebuild an environment from codeIt is your real recovery time after a compromiseShort enough to run on a schedule

Table 3: Measures that track the controls in this post, what each one tells you, and where to aim.

What should an engineering leader do in the next 90 days?

You do not need every control in this post to be much harder to break. Start with the ones that remove the most attack surface per week of work. Each item names an outcome to assign, and the linked guides hold the steps.

This week

  • Patch what is already exploited. Compare the KEV catalog with what you run, and fix every match that the internet can reach.
  • Find what answers on the internet. List every hostname and public IP you own, and delete or close what nobody claims.
  • Put admin paths behind identity. Move admin panels, dashboards, Kubernetes APIs, and SSH behind an identity-aware proxy.
  • Find the secrets you already leaked. Scan your repositories and build output, then revoke every verified hit before anyone cleans up the code.
  • Turn on your repository host's security defaults, and plant canary credentials where an attacker would look.

This month

  • Replace stored cloud and model keys with workload identity, starting with CI.
  • Make privilege just in time, with separate production accounts and phishing-resistant MFA for everyone who has production access.
  • Set patch deadlines and owners. Days for known exploited flaws, weeks for the rest, and an owner for every third-party component.
  • Pin and slow down dependencies. Pin CI actions to commit hashes, and add a cooldown to dependency updates, as the supply chain guide describes.
  • Delete what you don't use: idle deployments, dormant accounts, unused OAuth apps, and data past its retention date.

This quarter

  • Shrink your images to FROM scratch or a hardened minimal base, as the defense in depth guide describes.
  • Make one environment raze-rebuildable. Rebuild it from code on a schedule, measure the time, and fix what breaks.
  • Move untrusted code into microVMs, starting with AI agents that run generated code and CI jobs for outside pull requests.
  • Ship SBOMs and build provenance, and verify both before you deploy.
  • Test like an attacker, then pay someone else to. Run an agentic pentest against a rebuilt copy, fix what it finds, then commission an outside test.
  • Rehearse an incident. Revoke a credential, rebuild a host, and restore a backup, and record how long each step takes.

Who secures what when you run Spice?

Security is shared. For Spice Cloud, Spice AI runs the access controls, encryption, code scanning, patching, isolated environments, and outside audits, and customers control who can reach their apps and their API keys. When you self-host the Spice runtime, you also configure its TLS, its authentication, and where it loads secrets from. The runtime image is minimal by default, and Spice.ai Enterprise can authenticate callers with tokens from your OIDC provider, such as Okta or Microsoft Entra ID, a feature in preview. Scoped AI sandboxes give agents temporary datasets instead of production databases. The defense in depth guide has a Spicepod that turns on TLS and API keys.

What does this add up to?

Security against machine-speed attackers looks unglamorous up close: a deleted project, a pinned trust policy, a role that expires, a weekly rebuild. Each one removes a step that an agent would otherwise take in seconds, and none of them depends on a person reading an alert in time. To keep up, track primary sources rather than headlines: the FBI's FLASH advisories on ic3.gov, CISA's KEV catalog, and Cloudflare Radar's Zero Wire briefings, routed to the channel where on-call already works.

We publish the controls we operate, our SOC 2 Type II status, and how to report a vulnerability on the Spice AI security page. Attack tools will keep getting faster, and the systems that hold up will be the ones with nothing left for them to find.

Share
twitter logolinkedin logomailto logo

Machine-speed security FAQ

ARTEX is an open-source, multi-agent penetration testing framework written in Go. It turns a goal written in natural language into commands that AI agents run. The FBI reports that some ARTEX intrusions reached privileged access in under three hours.

Remove the first steps that an agent takes. Put admin paths behind an identity-aware proxy, and require phishing-resistant MFA for production access. Replace stored cloud keys with workload identity. Patch known exploited flaws within days.

An AI agent can reach privileged access within hours. An alert still needs a person to read it, decide, and act. Controls that make the first step fail do not wait for a person.

Secure by default means that a new system starts closed, with every interface private and every identity untrusted until a deliberate change. Secure by design means that the architecture removes the asset an attacker wants. For example, short-lived workload identity tokens replace stored cloud keys.

Yes. The Spice LLM inference platform serves DeepSeek V4 and GLM on your own machine through an OpenAI-compatible API. The Spice cookbook has a recipe for each model. Test only systems that you own or have written permission to test. Run uncensored models only in an isolated VM with no production credentials. Until a Spice release includes the GGUF engine, both recipes need a Spice build from trunk.

Spice AI is SOC 2 Type II compliant. It uses multi-factor authentication (MFA), least privilege, just-in-time privileged access, and workload identity in place of stored cloud keys. It runs penetration tests at least once a year, and outside experts audit its code. The Spice AI security page lists the controls and tells you how to report a vulnerability.