liveBook · Manning

Attack surface

As explained in Crack Any Codebase with AI

A security attack surface is the set of exposed interfaces and entry points through which an unauthorized party could attempt to affect a system.

An attack surface is the set of exposed interfaces and entry points through which an unauthorized party could affect a system. In a service graph, inbound arrows from browsers or external webhooks mark the public API and security attack surface. Trust boundaries become visible when connections are classified as inbound, internal, or outbound. section 9.1

Map the surface by asking:

  • Which nodes receive public traffic, and which gateway configuration defines their routes? section 9.1
  • Which edges cross the internet, and which connect to vendor systems such as Stripe or Google? section 9.1
  • Which components are custom code requiring inspection, rather than commodity or rented infrastructure? section 9.1

A recognizable web boundary

A browser or external webhook points into the web application, creating an inbound public edge. An Nginx configuration, Kubernetes Ingress manifest, or Kong configuration may define most routes and therefore much of the exposed surface. section 9.1

Table 9.1 A classification of architectural nodes and edges
Term
What it is
Example
Why it matters
Node
A long-running program or service
A web server, Postgres, Stripe
The box that can fail
Edge
A wire between two nodes
A SQL query, an HTTP call, a queued job
The wire that times out
Run
Your code on your machine
Their own web app, their own worker
You can edit anything
Rent
Vendor code on your machine
Postgres, Redis, RabbitMQ
Configure only; no source edits
Call
Vendor code on a vendor's machine
Stripe, SendGrid, Twilio
Retry, cache, or route around
Client
Your code on a machine you don't operate
Browser frontend, mobile app, desktop app
Ship updates, no secrets, untrusted input
Sync edge
The user is waiting on it
Checkout → Stripe
The user feels its latency directly
Async edge
The user has already moved on
Queue → send confirmation email
The user never sees it; it can fail silently
Public edge
Crosses out to the open internet
A webhook from Stripe → you
The security boundary; this is where attackers knock
Internal edge
Between two of your own nodes
Web → Postgres
A network hop, but trusted; failure is the wire, not the user

Classify nodes and edges by ownership, location, direction, and whether users wait on the connection. section 9.1

How Crack Any Codebase with AI covers it

How deep it goes
Connects inbound arrows and gateway routes to exposure, but stops short of detailed vulnerability analysis.
Examples
Uses browsers, external webhooks, Nginx, Kubernetes Ingress, Kong, Stripe, and Google as boundary examples.
What it assumes
Assumes familiarity with programs, services, network connections, and basic service-graph notation.
What you can do after
Evaluate exposure by mapping public edges, route-defining gateways, vendors, and custom components.
How it connects
Ties attack surface to service graphs, public APIs, trust boundaries, gateways, and vendor integrations.

Also explained in

Compare how 7 books explain attack surface →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Crack Any Codebase with AI. The section links point to the parts of the book it draws on.