CyberAg Documentation

Test Data

CyberAg ships curated sample data for local development and E2E tests. All seed data lives in one source file and is loaded into LocalStack DynamoDB + S3.

Source of truth

**File:** apps/console/src/data/mock.ts

**Seed script:** scripts/local/seed.ts

**Command:** npm run local:seed

Seeded entities

EntityCountIDs (examples)
Agents3a1 Cursor Prod, a2 Code Reviewer, a3 CI Bot
Identities4i1i4 (linked to agents via agent ID)
Violations2v1 PII leak, v2 prompt injection
Policies2p1 PII Detection, p2 Admin Tool Restriction
Guardrail events2g1, g2
Red team runs1rt1 (completed, 68% pass rate)
Connectors3c1 AWS, c2 GitHub, c3 Cursor
Audit records1ar1 (replayable)
Replay decisions1rp1 (match=true)
Kill switch1globalActive: false
Discovery graph18 nodes, 8 edges (stored at DISCOVERY#GRAPH)

S3 artifacts

The seed script also uploads:

  • decisions/d1.json — sample blocked SQL injection decision (for replay)
  • audit/t1/{timestamp}-{hash}.json — signed audit artifact
  • Discovery graph

    After seeding, GET /api/v1/discovery/graph returns a fixed topology:

  • **Nodes:** User Browser, three agents, NHI key, Gemini LLM, MCP server, production DB
  • **Edges:** User→agents, agents→LLM/MCP, identity→agent, MCP→database
  • The API prefers the seeded DISCOVERY#GRAPH item. If missing, it builds a graph from agents + identities in DynamoDB.

    Reset test data

    
    # Full reset (destroys LocalStack volumes)
    npm run local:reset
    npm run local:deploy
    npm run local:seed
    
    # Re-seed only (infra already running)
    npm run local:seed
    

    Tenant

    All sample data uses tenant ID **t1**.

    Customizing seed data

    1. Edit apps/console/src/data/mock.ts

    2. Run npm run local:seed

    3. Refresh the console at http://localhost:3002

    Identity agent fields must use **agent IDs** (a1, a2, …), not display names, so graph edges resolve correctly in the computed fallback path.

    Verify seeded data

    
    npm run local:verify
    

    Checks health, guardrail scan, agents list, violations list, and (with Gemini key) Ask, Hardening, and Policy lint.