tolmo sql reads your organization’s relational data, such as findings. Row-level security limits each query to your organization. tolmo cypher traverses the knowledge graph. The graph contains your production resources and the relationships between them.
Use SQL for tabular questions and Cypher for “what connects to what”. Both commands support --json. Use the global --org flag with either command to select an organization.
SQL queries
tolmo sql runs a query against your organization’s relational database and prints a table by default.
--json to get raw JSON, for example to pipe into jq.
Query findings at a past time
--as-of accepts a date or timestamp. Values without a timezone use UTC. It reconstructs findings at that instant; other tables remain current. See Time machine.
Cypher (graph) queries
Thetolmo cypher command executes a Cypher query against the infrastructure graph database. The graph represents your cloud environment as a network of nodes (resources) and edges (relationships between them), giving you a powerful way to understand how infrastructure components connect.
Record why you’re running a query
Pass--intent with one sentence stating the goal the query serves. Tolmo attaches it to the request trace in APM and to the security audit log of rejected queries, so a burst of automated queries has an attributable purpose. It never changes the query or its results.
Agents and scripts must set
--intent on every query. Skip it only for a one-off query you type yourself. When you call the Cypher endpoint directly, send the same text in the intent field of the request body.Graph data model
Every resource in the infrastructure graph is stored as aGraphNode, and every relationship between resources is stored as a GRAPH_EDGE.
Both nodes and edges carry temporal tracking fields:
You can use these fields to write time-aware queries:
Recipes
Start from these queries and adapt them. Each one is read-only.Assets that appeared this week
New resources are where new risk usually comes from. List everything the crawlers first observed in the last seven days, grouped by type:Relationships that changed today
Open high-severity findings
Findings at the start of the month
Output formats
Bothsql and cypher support two output modes: