Knowledge Graph

May 4, 2026 · View on GitHub

Decepticon uses Neo4j as a persistent attack graph. Every host, service, vulnerability, credential, and finding discovered during an engagement becomes a typed node with typed relationships. This is the agent's long-term memory across iterations — not conversation history.

The graph lives on sandbox-net and is accessible at:

  • Bolt: bolt://localhost:7687 (driver connection)
  • Browser: http://localhost:7474 (Neo4j Browser UI)

Default credentials: neo4j / decepticon-graph (set via NEO4J_PASSWORD).


Node Types

TypeKey PropertiesCreated By
Hostip, hostname, os, os_versionRecon, Scanner
Serviceport, protocol, name, version, bannerRecon, Scanner
Vulnerabilitycve_id, cwe_id, cvss_score, severity, descriptionScanner, Detector, Verifier
Credentialusername, hash_type, hash, plaintext, sourcePost-Exploit, Exploit
Accountusername, domain, privileges, groupsPost-Exploit, AD Operator

Relationship Types

RelationshipFrom → ToMeaning
RUNS_ONService → HostService runs on a host
AFFECTSVulnerability → ServiceVulnerability exists in a service
EXPLOITSObjective/Finding → VulnerabilityThis attack exploits this vuln
REQUIRESVulnerability → VulnerabilityExploit chain dependency
USESAttack → CredentialAttack uses a credential
OWNSAccount → HostAccount has access to host

Research Tools

Agents interact with the graph via tools defined in decepticon/tools/research/tools.py:

Graph Mutations

ToolDescription
kg_create_node(type, properties)Create a new node (Host, Service, Vulnerability, etc.)
kg_create_edge(from_id, to_id, relationship)Link two nodes with a typed relationship

Graph Queries

ToolDescription
kg_query_nodes(type, filters)Search nodes by type and property filters
kg_query_paths(start_id, end_id)Find all paths between two nodes (attack chain discovery)
kg_get_severity_score(node_id)Calculate aggregate severity score for a node

Attack Chain Planning

ToolDescription
plan_attack_chains()Generate ranked multi-hop exploit paths using weighted shortest-path
critical_path_score(chain)Score a chain by combined severity and complexity
promote_chain(chain_id)Promote a promising chain to the active OPPLAN

Artifact Ingestion

ToolDescription
ingest_sarif(path)Parse a SARIF static analysis report and lift findings into the graph
ingest_scan_output(tool, path)Parse nmap XML, nuclei JSON, or similar scan output

Health Diagnostics

decepticon kg-health

Runs decepticon.tools.research.health:main and reports:

  • Neo4j connectivity status
  • Node and edge counts by type
  • Index health
  • Graph size on disk

Querying Directly

You can query the graph directly with Cypher via Neo4j Browser (http://localhost:7474) or the Bolt driver.

Find all high-severity vulnerabilities:

MATCH (v:Vulnerability)
WHERE v.cvss_score >= 7.0
RETURN v.cve_id, v.severity, v.cvss_score
ORDER BY v.cvss_score DESC

Find multi-hop attack paths to a host:

MATCH path = (start:Service)-[:AFFECTS|EXPLOITS|REQUIRES*1..4]->(end:Host {ip: "10.0.0.1"})
RETURN path

List credentials discovered during the engagement:

MATCH (c:Credential)
RETURN c.username, c.hash_type, c.source