Data Model Primer

Understanding OCSF and how FSQL uses it

What is OCSF?

The Open Cybersecurity Schema Framework (OCSF) is a vendor-neutral schema for representing security telemetry. Every FSQL query operates on OCSF events — regardless of which data source the data comes from, it is normalized into OCSF before you see it.

This means you write one query and it works across Splunk, CrowdStrike, Okta, AWS CloudTrail, Microsoft Sentinel, and any other connected platform. You don't need to know the native field names of each source.

Primer vs. Reference: Use this page to learn how the model is organized and how to build queries quickly. Use [Query Data Model Reference](../Query Data Model Reference/about-the-query-data-model) for the complete, field-level source of truth (events, objects, types, categories, and enum values).

Event Classes

OCSF organizes security data into event classes. Each class represents a type of activity. Here are the ones you'll use most often:

Event ClassDescriptionExample Use
authenticationLogin and authentication eventsFailed logins, MFA challenges, SSO activity
process_activityProcess creation, termination, injectionSuspicious command lines, malware execution
network_activityNetwork connections and flowsLateral movement, C2 traffic, unusual ports
dns_activityDNS queries and responsesDomain lookups, DNS tunneling, DGA detection
http_activityHTTP requests and responsesWeb shell access, API abuse, user-agent anomalies
file_activityFile create, modify, delete, readRansomware behavior, data staging, dropper activity
email_activityEmail send, receive, scanPhishing campaigns, BEC, exfiltration via email
detection_findingAlerts and detections from security toolsCorrelating alerts across EDR, SIEM, cloud
account_changeAccount create, modify, deletePrivilege escalation, unauthorized account creation
api_activityAPI calls (especially cloud)Cloud enumeration, IAM changes, resource creation
ssh_activitySSH sessionsRemote access, tunneling, lateral movement
inventory_infoAsset and device inventoryCompliance checks, asset lookups

Event Categories

Events are grouped into categories. Use the # selector to query an entire category at once:

CategoryEvents Included
#networknetwork_activity, dns_activity, http_activity, ssh_activity, and more
#iamauthentication, account_change, authorize_session, and more
#findingsdetection_finding, security_finding, vulnerability_finding
#applicationapi_activity, web_resources_activity, and more
QUERY #network.**
WITH #network.status_id = FAILURE

Anatomy of an OCSF Path

Every field in FSQL is addressed by an OCSF path:

event_class.object.attribute

For example:

PathMeaning
authentication.user.usernameThe username from an authentication event
network_activity.dst_endpoint.ipThe destination IP of a network connection
process_activity.process.cmd_lineThe command line of a spawned process
detection_finding.evidences.file.hashes.valueA file hash from alert evidence

Objects can be nested. The src_endpoint and dst_endpoint objects appear in many event classes and always have the same structure (IP, port, hostname, etc.), which is what makes cross-source querying work.

Discovering Available Fields

Use EXPLAIN commands to explore the schema without running a search:

See what fields an attribute selector expands to

EXPLAIN ATTRIBUTES authentication.*

Get the schema definition for specific fields

EXPLAIN SCHEMA network_activity.dst_endpoint.ip

List your available connectors and what events they support

EXPLAIN CONNECTORS

Each connector in the output carries an alias (a stable, immutable identifier) and any tags that group it with related connectors. Both can be used as references in a FROM clause — see Data Sources (FROM).

For full details on these commands, see Other Commands.

Finding Valid Enumeration Values

Many OCSF fields are enumerations (enum) such as status_id, activity_id, severity_id, and os.type_id. In FSQL, enum values are written as tokens (for example FAILURE, LOGON, MACOS) and usually do not need quotes.

Use this workflow when you are not sure which enum value is valid:

  1. Identify the exact OCSF field path in your query (for example authentication.device.os.type_id).
  2. Open [Query Data Model Reference](../Query Data Model Reference/about-the-query-data-model).
  3. Go to the matching event and object page (for example authentication -> device -> os).
  4. Find the field and review its documented enum values.

Use EXPLAIN SCHEMA <path> to confirm that a field is an enum in your current environment, then use Query Data Model Reference as the authoritative list of valid values.

EXPLAIN SCHEMA authentication.device.os.type_id

Mapping Common Security Concepts to OCSF

When investigating, you often think in terms of security concepts rather than field names. Here's how those concepts map to OCSF paths:

Security ConceptOCSF Path(s)Entity Shortcut
Source IP*.src_endpoint.ip%ip
Destination IP*.dst_endpoint.ip%ip
Destination port*.dst_endpoint.port%port
Username*.user.username, *.user.name%username
Email address*.user.email_addr, *.email.from%email
Hostname*.device.hostname, *.src_endpoint.hostname%hostname
File hash (any algorithm)*.file.hashes.value, *.process.file.hashes.value%hash
Command line*.process.cmd_line%command_line
Process name*.process.name%processname
File name*.file.name%filename
URL*.url%url
Country*.location.country%country

Tip: When you're unsure of the exact path, start with an entity shortcut (%ip, %username, etc.). It searches all mapped fields of that type across the schema, and many connectors have optimizations for entity searches. You can refine to specific paths later if you need precision.

Next Steps

  • Entities — full list of entity (observable) shortcuts available in FSQL.
  • Attribute Selectors — wildcards, path expansions, and filters for targeting exactly the fields you need.
  • Query Syntax Reference — how to build queries using OCSF paths.