Safeguard
Security Guides•

What is the JAMstack attack surface? A plain definition

The JAMstack attack surface is the build pipeline, the CDN, client-side JavaScript and the APIs the site calls. A short definition and a table of risks.

Safeguard Security Team
4 min read

The JAMstack attack surface is everything an attacker can influence in a site made of JavaScript, APIs and prebuilt markup: the build pipeline and its packages, the CDN and DNS settings, the client-side code in the browser, and every API, function or service the pages call.

Definition in four parts

JAMstack describes sites built ahead of time into static files, served from a CDN, with dynamic behaviour added by browser JavaScript and by APIs. The security model changes in a useful way: fewer servers to patch, but more reliance on third parties and on the build.

Attack surface is the set of places where untrusted input or untrusted code can reach something you care about.

Putting those together gives a map with five zones.

ZoneExample assetsTypical risk
Source and buildRepository, CI, generator plugins, lockfileMalicious or vulnerable package runs with build credentials
Output filesBundles, HTML, source mapsVulnerable front-end library, leaked values compiled into the bundle
CDN and DNSCustom domains, redirect rules, headers, cacheTakeover of an abandoned record, missing headers, cached private data
Browser runtimeThird-party scripts, embeds, tag managersThird-party code runs with your page's privileges
APIs and functionsForm handlers, auth, search, paymentsWeak authorization, over-permissive CORS, vulnerable dependencies

What changes compared with a server-rendered app

Traditional apps concentrate risk in one runtime. A static architecture spreads it. That is not worse by default, but it makes inventory the first job. If you cannot list your functions, embeds and external APIs, you cannot say who owns the risk in each.

Two consequences follow.

  1. Trust decisions multiply. Each script tag, each SaaS API and each build plugin is a supplier.
  2. Server-side checks move. If a rule matters, such as who may read a page, it needs to be enforced where the content is actually served, in more than the browser.

How to map yours in an hour

  1. List every repository that contributes to the site, including the functions folder and any content repository.
  2. Export the dependency list from each lockfile and mark build-only versus shipped.
  3. Search the built output for external hostnames. Each one is a runtime dependency.
  4. List custom domains and subdomains and confirm each still points at something you control.
  5. List environment variables and mark which are compiled into the public bundle. Framework documentation states that variables with a public prefix are inlined into client JavaScript at build time. See the Next.js environment variables guide in Sources.
  6. Note which API keys exist, what each can do, and who can rotate it.

Try it yourself

The continuous monitoring demo shows how an inventory is rescanned after deploy. Watch for how a new advisory changes the status of something already shipped.

Click through it at your own pace, or open it full screen.

Where Safeguard fits

Safeguard provides SBOM generation, dependency scanning and asset discovery, so the map above can be built and kept current rather than drawn once. A free scan is available at gold.safeguard.sh/scan.

Quick check

Is JAMstack a product?

No. It is an architecture style, so there is no single vendor or version to patch.

What is the first thing to inventory?

The external hostnames in your built output, because each one is code or data you do not control.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.