> your AI agent picks dependencies from memory; give it dated facts — try starlog.dev ↗ vet your agent's deps ↗ vibe-coding is fine. vibe-importing isn’t. — try starlog.dev ↗ vibe-importing isn’t fine ↗ your agent has never seen your private packages — try starlog.dev ↗ facts for private packages ↗ a linter for the dependencies your AI agent picks — try starlog.dev ↗ a linter for agent deps ↗ whois is redacted, cdns mask the rest — get the real operator — try whoisgeni.us ↗ who really runs that domain ↗ domain attribution that shows its work — full evidence chain — try whoisgeni.us ↗ domain intel w/ evidence ↗

← Back to Articles

Security Constitution: A Framework for Finding Unfixable Cloud Flaws

[ View on GitHub ]

Security Constitution: A Framework for Finding Unfixable Cloud Flaws

Hook

Most cloud vulnerabilities get patched in days. But what happens when the vulnerability is the design—when fixing it would require rebuilding the entire service from scratch?

Context

Traditional security tooling excels at finding implementation bugs: SQL injection, XSS, misconfigured S3 buckets. Run a scanner, get a report, patch the code. But there's an entirely different class of security flaw that lives above the code layer: architectural violations where a service's fundamental design contradicts its own security guarantees.

Consider a cloud IAM service that promises "users can only access resources in their own tenant," but the service's confused deputy problem allows cross-tenant resource enumeration through a legitimate admin API. This isn't a bug in the implementation—it's a flaw in the trust model itself. You can't patch it with a code change; you'd need to redesign how the service handles authority delegation. The Security Constitution framework emerged from this recognition: we need a systematic method for detecting these insecure-by-design flaws, and we need to teach both humans and LLMs how to find them before they ship to production.

Technical Insight

Phase 2: Constitution

Phase 1: Taxonomy

Observes API/Docs

Maps Signals to Patterns

Generates Hypothesis

Tests Against

Deputy Graduation Framework

No

Yes

Calibrates Against

Provides Templates

Anchors of Trust Model

Security Analyst

Discovery Signal Register

Design Shape Register

Hypothesis Validation

Security Constitution

6 Conditions Met?

Feature-Abuse Reference

Validated Finding Journal

System architecture — auto-generated

The framework operates through two synchronized artifacts: a Taxonomy of architectural anti-patterns and a Security Constitution that encodes validation rules. The genius is in how it structures reusable knowledge.

The Design Shape Register catalogs vulnerability patterns as templates independent of specific implementations. Instead of documenting "AWS Service X has confused deputy flaw Y," it captures the abstract structure: "When service A accepts user-supplied resource identifiers for operations performed with A's elevated privileges, without verifying the identifier belongs to the requesting user's tenant, A becomes a confused deputy." Each shape includes explicit confirmation criteria—the specific evidence required to graduate from hypothesis to validated finding.

Here's how a Design Shape might be structured in the taxonomy:

{
  "shape_id": "deputy-unvalidated-resource-id",
  "trust_violation": "Service performs privileged operation on user-supplied target without tenant-boundary check",
  "preconditions": [
    "Service has elevated privileges beyond calling user",
    "API accepts resource identifiers as input parameters",
    "Operation executes in service's security context, not user's"
  ],
  "confirmation_criteria": [
    "Demonstrate cross-tenant resource access via the service",
    "Verify operation succeeds where direct access would fail",
    "Confirm resource identifier is the only tenant-linking token"
  ],
  "reasonable_customer_test": "Would a reasonable customer expect this service to access resources outside their tenant boundary based on documented behavior?"
}

The Discovery Signal Register maps static reconnaissance clues to Design Shapes. Documentation phrases like "performs operation on your behalf" or API parameters named targetResourceArn trigger hypothesis generation. Crucially, these are signals, not findings—you still need execution-based proof.

The Feature-Abuse Reference serves as negative training data. It documents powerful-but-legitimate features that superficially match vulnerability patterns but represent intentional design choices. Cross-tenant sharing APIs, break-glass admin overrides, and federated identity bridges all trigger the same static signals as confused deputy flaws, but they're meant to cross trust boundaries. This register prevents crying wolf.

The Security Constitution itself encodes the Anchors of Trust model—the implicit security guarantees customers expect from cloud services even when not explicitly documented. It then provides a six-condition deputy-graduation framework that operationalizes when authority delegation violates these anchors:

Deputy Graduation Conditions:
1. Service possesses authority exceeding the caller's privileges
2. Service accepts caller-controlled input that influences privileged operation
3. Service does not verify input aligns with caller's trust boundary
4. Operation outcome differs from direct caller execution
5. Behavior violates reasonable customer expectations (reasonable-customer test)
6. Violation persists across service's documented security model

The workflow enforces falsifiability: hypothesize statically, validate by execution, document with adversarial-critic pass. You can't file a finding without execution proof, and you must explicitly document why your hypothesis could be wrong. The investigation journal becomes the primary artifact—not a binary "vulnerable/not vulnerable" report, but a reasoned argument with evidence.

For LLM integration, the framework is deliberately prompt-friendly. You'd feed the Design Shapes as context, provide API documentation as input, and ask the model to identify matching patterns. But the framework's discipline prevents automation theater: the LLM generates hypotheses, humans validate with actual execution.

The JSON/Markdown dual format means you can version-control the taxonomy as documentation while also parsing it programmatically:

import json

def evaluate_api_against_shapes(api_spec, shape_catalog):
    """Generate hypotheses from API documentation."""
    hypotheses = []
    for shape in shape_catalog:
        if matches_discovery_signals(api_spec, shape['discovery_signals']):
            if not in_feature_abuse_reference(api_spec, shape_catalog['feature_abuse']):
                hypotheses.append({
                    'shape_id': shape['shape_id'],
                    'confidence': 'hypothesis',  # Not 'finding' until execution-validated
                    'validation_required': shape['confirmation_criteria']
                })
    return hypotheses

What makes this architecturally clever is the separation of pattern-matching (automatable but high false-positive) from validation (manual but high-confidence). Traditional scanners conflate these steps and drown you in noise. This framework accepts that architectural flaw detection fundamentally requires human judgment—but it structures that judgment so the reasoning transfers.

Gotcha

The framework provides zero automation infrastructure. There's no model orchestration layer, no API client libraries, no execution harness. You get the thinking methodology and the pattern catalog, then you're on your own to build validation tooling. For each Design Shape you want to test, you need to construct proof-of-concept exploits from scratch. If you're investigating AWS IAM confused deputy flaws, you'll need multi-account test environments, custom scripts to invoke APIs with crafted payloads, and forensic tooling to verify cross-tenant access actually occurred. That's a massive lift that most teams simply can't resource.

The taxonomy suffers from bootstrap limitations. It's derived from a small case set (implied by "cases presented at the talk"), which means it likely over-indexes on specific cloud platforms and vulnerability classes the original researchers encountered. There's no defined process for community contribution or adversarial red-teaming of the shape catalog itself. If your cloud platform uses a trust model that doesn't fit the existing Design Shapes, you're back to first-principles analysis. The JSON/Markdown synchronization is entirely manual with no validation schemas, so drift between formats is inevitable at scale.

Verdict

Use if: You're an offensive security researcher or red team conducting systematic design reviews of cloud platforms, you have the resources to build custom validation infrastructure and run proof-of-concept exploits in multi-tenant environments, and you need a way to codify institutional knowledge about architectural anti-patterns that survives personnel turnover. This framework solves the "we keep rediscovering the same class of flaw across different services" problem by providing reusable Design Shapes and explicit validation criteria. It's valuable specifically for the thinking methodology and false-positive calibration, not for reducing analyst effort.

Skip if: You need an operational security scanner for CI/CD pipelines, you're looking for automated findings without human validation, or you lack multi-cloud testing environments and offensive security expertise. This is a research protocol, not a product. If you want something that runs on a schedule and files tickets, you need CSPM tooling instead. Also skip if you're primarily concerned with implementation bugs rather than architectural flaws—traditional static analysis and penetration testing remain more efficient for finding SQL injection and broken access control at the code layer.