Security architecture

Threat modeling Breakwater with five proven methods

Breakwater uses a layered threat-modeling approach: architecture threats, attacker scenarios, privacy risks, abuse paths, and detection engineering, validated against OWASP Top 10 (2021). Eight categories are fully addressed; one partial gap (HSTS) is tracked for remediation. The goal is simple: discovery evidence should be useful without turning the platform into a scanning or attack surface risk.

Professional sequence diagram for authorized Breakwater discovery
STRIDE

Architecture threats

Trust boundaries, OAuth, collector ingest, database writes, storage, and MCP read-only access.

PASTA

Business risk

Attacker objectives, customer impact, ranked scenarios, and release-blocking controls.

LINDDUN

Privacy risks

User telemetry, asset metadata, customer reports, and privacy-preserving analytics.

Attack trees

Chained abuse paths

How bad outcomes happen through combined failures, not isolated control gaps.

NIST + MITRE

Data and detection

Protected data, adversary vocabulary, defensive controls, audit, and detection coverage.

Release stance

Discovery-only

No cloud LAN scanning, exploitation, remediation, offensive graphing, or device-write actions in this phase.

Data flow diagram with trust boundaries.

The DFD separates browser, identity provider, Breakwater cloud, customer network, database, object storage, and AI clients. The red trust boundaries are the places where authentication, authorization, validation, and audit controls must be enforced.

Model scope

Assumptions and trust levels

  • Operator browser is untrusted until Google OAuth completes.
  • Google/Cognito tokens are trusted only after issuer, audience, expiry, and JWKS validation.
  • Customer LAN is never reachable from the hosted cloud service.
  • Collector reports are untrusted input until signed policy, nonce, schema, tenant, and checksum checks pass.
  • MCP clients are read-only consumers of evidence, not scan executors.
Breakwater data flow diagram with trust boundaries

STRIDE: protect every trust boundary.

STRIDE is the architecture lens. It validates that identity, ingest, storage, UI, and MCP flows have explicit controls against spoofing, tampering, repudiation, disclosure, denial of service, and privilege escalation.

Layered threat modeling methods used by Breakwater
Spoofing

Breakwater vectors

  • Forged collector identity attempts to upload a run for another site.
  • Stolen MCP bearer token attempts to read another tenant's latest run.
  • OAuth callback replay attempts to create a browser session without the original state cookie.
Tampering

Breakwater vectors

  • Collector report changes device class, owner, protocol, or confidence before upload.
  • Adversarial hostnames or banners inject instructions into evidence that an AI client may later summarize.
  • Policy scope is widened from a bounded CIDR to an unauthorized network.
Repudiation

Breakwater vectors

  • Operator denies launching a collector task or reviewing an asset.
  • Collector owner denies sending a malformed or replayed report.
  • AI client operator denies a sensitive MCP query.
Disclosure / privilege

Breakwater vectors

  • Tenant-scoped run data leaks through an unfiltered query or cached report.
  • MCP confused-deputy behavior exposes discovery data to another connected tool.
  • Authenticated user tries to convert read-only MCP into scan execution or device-write action.

PASTA execution, not just label

StageBreakwater applicationOutput
1. ObjectivesProtect customer discovery evidence while proving the cloud cannot scan private LANs directly.Discovery-only security objective and release boundaries.
2. Technical scopeBrowser, Google OAuth/Cognito, Lambda API, policy signer, collector, Postgres, object storage, MCP clients.DFD and route/component inventory.
3. DecompositionTrust boundaries between untrusted browser, IdP, Breakwater cloud, customer LAN, storage, and AI clients.Data-flow and trust-boundary mapping.
4. Threat analysisCloud scanner abuse, inventory poisoning, prompt/tool injection, tenant data exposure, collector compromise.Ranked threat scenarios.
5. Vulnerability analysisMissing nonce check, weak tenant filter, excessive telemetry, unsigned collector binary, permissive MCP action.Control gap backlog and negative tests.
6. Abuse modelingFailure trees for forged report, confused deputy, and adversarial evidence strings.AND/OR misuse chains with required blockers.
7. Risk decisionHigh risks require prevention, detection, owner, validation evidence, and residual-risk signoff.GO/NO-GO gate.
Scenario 1

Turn cloud into a scanner

Attacker asks an AI connector to scan a private or third-party network. Breakwater refuses cloud-side scanning and redirects to authorized local collector workflow.

Scenario 2

Poison inventory

Attacker uploads fake discovery results. Required controls are signed policy, nonce, schema validation, tenant scope, checksums, and audit trail.

Scenario 3

Prompt-inject MCP

Attacker attempts to make an AI connector reveal secrets or execute unsafe work. MCP remains read-only and returns bounded discovery summaries.

Scenario 4

Scrape unauthenticated pages

Only login, documentation, static assets, and OAuth endpoints are public. App, telemetry, reports, and data routes require sessions or MCP auth.

PASTA release test

Every high-risk scenario must have prevention, detection, owner, and residual-risk decision before production.

GO
Detection and privacy map for Breakwater discovery

LINDDUN: useful telemetry without surveillance design.

Breakwater needs product telemetry so AI assistants can analyze user friction, but the default posture should minimize sensitive identity, route, object, and network details.

Linkability

Reduce joinability

  • Use session IDs and actor hashes for analytics.
  • Avoid raw session replay and sensitive content capture.
Identifiability

Minimize identity

  • Display user identity only where needed.
  • Store aggregate telemetry with actor hash and domain.
Non-repudiation

Limit unnecessary accountability

  • Security audit logs are required, but product analytics should not create avoidable employee surveillance.
  • Customer exports should distinguish audit evidence from optional usage analytics.
Detecting

Prevent inference

  • Avoid exposing whether a specific user, site, or asset exists through timing, error messages, or aggregate analytics.
  • Require k-anonymity style thresholds before customer-visible analytics drilldowns.
Disclosure

Protect customer metadata

  • Collector reports, MACs, hostnames, owners, locations, and evidence are customer-sensitive data.
  • Docs explain that private LAN discovery requires a customer-side collector.
Unawareness

Make boundaries visible

  • Login/docs describe collector/cloud separation.
  • MCP guidance refuses unsupported cloud scanning claims.
Non-compliance

Prepare regulated review

  • Document retention, deletion, export, and backup behavior for customer evidence.
  • Maintain DPIA/ROPA-ready records for telemetry, audit, and customer asset metadata.
Attack tree

Poison customer inventory

Goal: Poison discovery results
  OR upload without authorization [cost: medium]
    AND steal token [cost: medium, probability: medium]
    AND bypass signed policy [cost: high, probability: low]
    AND replay or forge nonce [cost: high, probability: low]
  OR tamper with collector output [cost: medium]
    AND compromise collector host [cost: medium, probability: medium]
    AND alter report file [cost: low, probability: medium]
    AND evade checksum/schema checks [cost: high, probability: low]
  OR mislead operator through MCP [cost: medium]
    AND inject hostile hostname/banner evidence [cost: low, probability: medium]
    AND trigger AI summary without evidence escaping [cost: medium, probability: medium]
    AND hide confidence caveats [cost: medium, probability: low]
Countermeasures

Controls that break the tree

  • Signed policy and policy expiration.
  • Upload nonce replay tracking.
  • Schema validation and report checksum.
  • Tenant/site/run scoping.
  • Read-only MCP responses with confidence and evidence caveats.

NIST + MITRE: make abuse observable.

The detection model maps protected data and adversary behaviors to durable audit and privacy-safe telemetry. It also gives MCP a read-only analytics surface for usage, friction, and login-denial review.

Breakwater detection map across login, policy, ingest, storage, UI, and MCP

Standards and outputs

ModelUse in BreakwaterExpected output
STRIDEArchitecture, trust boundaries, APIs, auth, DB, storage, MCP.Threat table, controls, residual risk.
PASTABusiness-risk and attacker-scenario prioritization.Ranked scenarios and release-blocking controls.
LINDDUNPrivacy modeling for telemetry, asset metadata, users, reports.Privacy threat list and minimization controls.
NIST SP 800-154Data-centric modeling for reports, evidence, audit, exports.Protected data inventory and data-flow risk register.
MITRE ATT&CK / D3FENDDetection vocabulary and defensive countermeasure mapping.Detection map, audit requirements, and response playbooks.
Risk scoring

Methodology

Risk is scored as likelihood multiplied by impact on a 1 to 5 scale. Residual risk is accepted only when the listed validation evidence exists and no critical/high control is missing.

  • 1-5: Low, monitor through normal telemetry.
  • 6-12: Medium, owner and planned validation required.
  • 15-25: High, release-blocking until prevention and detection pass.
Threat actors

Who the model considers

  • Unauthenticated internet user probing public routes.
  • Authenticated demo user trying to exceed discovery-only scope.
  • Compromised collector host or stolen upload material.
  • Prompt-injection attacker influencing MCP output.
  • Insider or operator with access to customer discovery data.

Risk register

ThreatLikelihoodImpactRiskRequired controlsValidation evidence
Hosted connector abused as a cloud scanner4520 HighCloud-scan refusal, local collector-only workflow, read-only MCPScanner refusal tests, MCP live prompts, health scope text
Inventory poisoning through forged collector upload3515 HighSigned policy, nonce replay block, schema validation, checksum, auditCollector attestation tests, ingest negative tests, audit rows
Indirect prompt injection through discovery evidence4416 HighEvidence escaping, read-only tools, instruction stripping, source labelingAdversarial hostname/banner fixtures and MCP response tests
MCP confused deputy across connected servers3515 HighTenant-bound tokens, minimal scopes, no cross-server delegationMCP authorization and tool-call provenance tests
Collector binary supply-chain compromise3515 HighSigned release, SBOM, SLSA provenance, checksum verificationRelease attestation and install-script verification
Prompt injection causes unsafe AI behavior3412 MediumRead-only MCP tools, evidence caveats, no device-write actionsMCP tool descriptor review, adversarial prompt tests
SSRF through import, URL enrichment, or collector callback surfaces3412 MediumURL allowlists, private IP block, metadata IP denylist, egress reviewSSRF negative fixtures for 169.254.169.254 and RFC1918 targets
User telemetry over-collects private information3412 MediumActor hash, metadata deny-list, size limits, aggregate analyticsTelemetry sanitizer tests, DB sample review
Forced browsing exposes app data before login2510 MediumPublic asset allowlist, session gate, no-store responsesUnauthenticated route tests and curl probes
Tenant isolation filter bug leaks another customer run2510 MediumTenant-scoped queries, RLS evaluation, cross-tenant negative testsMulti-tenant isolation test pack and DB policy review
Signing key compromise enables forged policies2510 MediumKMS/HSM-backed storage, rotation, emergency revocation, key IDsRotation runbook and compromise recovery drill
DNS rebinding targets browser or collector-local endpoints248 MediumHost header validation, loopback protection, collector API binding rulesDNS rebinding fixture tests
Customer deletion request misses object storage or backups248 MediumDeletion workflow, retention labels, backup disclosure, audit exceptionsRetention/deletion propagation test
HSTS header missing — browsers cannot enforce HTTPS preload (A05 gap)236 MediumAdd Strict-Transport-Security header to all Lambda responsesResponse header audit confirming max-age=63072000; includeSubDomains present on all routes
MCP endpoint deployed without authentication (MCP_AUTH_MODE=none misconfiguration)2510 MediumMCP_AUTH_MODE=none deploy guard in CI/CD, environment variable validation on Lambda startup, deployment checklist itemDeploy guard tests and pre-production smoke test confirming MCP bearer auth is required
Auth validation

Prove identity gates

Test Google OAuth success, OAuth state failure, logout, unauthorized app access, JWKS validation, and allowed/denied policy decisions.

Collector validation

Prove ingest integrity

Test valid report, wrong scope, expired policy, replayed nonce, malformed schema, oversized metadata, and checksum mismatch.

MCP validation

Prove read-only AI

Test ChatGPT and Claude prompts for summary, evidence, scan requests, unsafe requests, and prompt-injection attempts.

Privacy validation

Prove data minimization

Test telemetry deny-list, actor hashing, object ID hashing, source IP hashing, and absence of raw tokens/secrets in site_events.

DFD validation

Prove boundaries match code

Map every DFD flow to route, auth requirement, data store, audit event, and test evidence before release.

Residual risk

Prove release decision

Critical/high threats require passing automated tests and documented residual risk. Missing critical/high evidence is a NO-GO.

Validation artifacts required for security review

  • Data-flow diagram with trust boundaries and route-level mapping.
  • Risk register with likelihood, impact, risk score, owner, controls, and validation evidence.
  • Automated threat-model evaluator that fails on missing critical/high evidence.
  • Negative tests for OAuth state, unauthorized route access, collector replay, schema failure, and MCP unsafe requests.
  • Production smoke evidence for health, docs, assets, app login, MCP, and collector ingest.
MCP 2025-2026 abuse catalog

Tool poisoning and confused deputy

Track indirect prompt injection through evidence strings, tool poisoning, cross-server context leakage, token passthrough, and confused-deputy behavior across multiple connected MCP servers.

Collector supply chain

Binary trust

Publish signed collector binaries, checksums, SBOM, SLSA provenance target, reproducible-build status, release key ownership, and install-script verification.

Collector host compromise

Local blast radius

Document what happens if the customer host running the collector is compromised, including credential storage, network permissions, task limits, and cloud-side revocation.

SSRF and DNS rebinding

Discovery-product magnets

Maintain negative tests for metadata IPs, RFC1918 callback misuse, URL import adapters, controller integrations, browser-origin assumptions, and collector-local endpoints.

Tenant isolation

Beyond tenant-scoped claims

State whether isolation is application-filtered, Postgres RLS-backed, schema-per-tenant, account-per-tenant, or private-customer deployment. Include cross-tenant negative tests.

Key management

Policy signing lifecycle

Document algorithm, key length, key ID, storage boundary, KMS/HSM decision, rotation cadence, compromise recovery, and cryptographic agility plan.

Data lifecycle

Retention and deletion

Define deletion propagation across Postgres, object storage, exports, backups, logs, audit exceptions, and customer-owned deployments.

Operational assurance

External validation

Track independent security assessment reports, SOC 2/ISO roadmap, bug bounty or vulnerability disclosure, incident response runbooks, breach notification SLA, and post-incident threat-model updates.

Long-term crypto

Cryptographic agility

Record how signed policies and archived evidence migrate if algorithms are retired, including post-quantum watch items for long-lived evidence stores.

Assurance evidence still required before enterprise production claims

  • Current third-party penetration test or external architecture review.
  • Collector SBOM, release signing, checksum verification, and provenance attestation.
  • Documented multi-tenant isolation design with cross-tenant negative test evidence.
  • Retention/deletion policy with backup and audit-log exception handling.
  • Incident response runbook, customer notification plan, and security contact process.
  • MCP-specific adversarial test suite covering tool poisoning, indirect prompt injection, confused deputy, token misuse, and cross-server leakage.

OWASP Top 10 (2021) assessment.

The production Lambda API handler, React frontend, MCP integration, and collector ingest pipeline were assessed against OWASP Top 10 2021. Eight categories are addressed with explicit controls. One category has a partial gap (missing HSTS header). One category requires ongoing assurance work (component vulnerability scanning).

Assessment scope

What was evaluated

  • Lambda API handler: authentication, authorization, input handling, output encoding, response headers.
  • React frontend: XSS vectors, localStorage usage, Content Security Policy.
  • MCP integration: injection risks, data exposure, read-only enforcement.
  • Collector ingest: signed policy, schema validation, nonce replay protection.
OWASP CategoryStatusControls in placeOpen items
A01 — Broken Access ControlGOODRS256 JWT validation, tenant-scoped queries, MCP read-only tools, session gate on all app routesNone identified
A02 — Cryptographic FailuresGOODRS256 JWT (asymmetric), timingSafeEqual for HMAC comparison, httpOnly + sameSite=lax + secure cookies, no plaintext secrets in storageNone identified
A03 — InjectionGOODParameterized queries throughout, textContent rendering for user-influenced data, evidence records returned as structured JSON not raw stringsNone identified
A04 — Insecure DesignGOODLocal-first collector architecture (cloud never scans LANs), discovery-only scope, signed bounded policies, read-only MCP enforcementNone identified
A05 — Security MisconfigurationPARTIALContent-Security-Policy present, X-Content-Type-Options: nosniff present, X-Frame-Options presentHSTS (Strict-Transport-Security) header missing from Lambda responses. Add strict-transport-security: max-age=63072000; includeSubDomains. Tracked in risk register.
A06 — Vulnerable and Outdated ComponentsMONITORnpm and Go module dependency management in placeNo confirmed automated dependency vulnerability scanning (Dependabot or equivalent) for Lambda, frontend, or Rust collector. Required for enterprise security review.
A07 — Identification and Authentication FailuresGOODGoogle OAuth with PKCE, state cookie validation, timingSafeEqual for HMAC comparison, session expiry, allow-list domain checkNone identified
A08 — Software and Data Integrity FailuresGOODSigned collector policies (HMAC-SHA256), nonce replay tracking, schema validation on ingest, checksum verification, policy expiry enforcementNone identified
A09 — Security Logging and Monitoring FailuresGOODStructured site_events audit table with records for login, logout, policy issue, collector upload, MCP access, and login denial; each row includes actor hash, tenant, IP, and user-agentNone identified
A10 — Server-Side Request ForgeryGOODNo user-controlled URL inputs in the Lambda handler, collector operates local-only with outbound-only egress, no URL import or enrichment surfaces exposedNone identified
A05 gap — HSTS header

Open remediation item

The Lambda handler does not currently emit a Strict-Transport-Security header. Browsers cannot preload HTTPS for subsequent requests. Fix: add strict-transport-security: max-age=63072000; includeSubDomains to the shared response headers object. Low-complexity, one-line change. Tracked in the risk register below.

A06 gap — Component scanning

Open assurance item

Automated dependency vulnerability scanning for the Lambda handler, React frontend, and Rust collector binary is not confirmed in CI. Add Dependabot, Snyk, or equivalent with a policy to remediate critical/high CVEs within a defined SLA. Required before enterprise security review.