inobi

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0

README

Inobi

A performant, real-time security detection engine for streaming event data.

Events are ingested as JSON, evaluated against YAML-defined detection rules in real-time, and alerts are output to one or more configurable destinations.

Key Features

  • Deploys as a single binary without external dependencies.

  • Supports multiple input and output types including files, Kafka, and sockets.

  • Detection rules can perform per-event matching, time-windowed aggregations, or composite correlations, with all expressions written in expr-lang.

  • Rules can contribute to per-entity risk scores, use persistent key-value state across events, and call custom functions written in Go or defined as expr expressions.

  • A built-in test runner can be used to validate detection logic with declarative test cases.

Documentation

The quickstart guide and full documentation are available on the Inobi Docs site.

Rule Format

Rules are defined as YAML files:

title: Login from anonymous network
id: 200
description: Increases user risk on login from a proxy, VPN, or Tor network.
level: info
status: experimental
type: event
alert: false
scopes: [auth]

detection:
  match: event.action == "login-success"
  extended_match:
    - >
      let rep = udf.IPReputation(event.source.ip) | project("ip_reputation");
      rep.proxy or rep.vpn or rep.tor

risk:
  - entity_type: user
    field: user.name
    score: 20
    ttl: 2h
    decay: linear

Alert Format

Alerts are output as JSON:

{
  "timestamp": "2030-12-01T17:59:25+02:00",
  "window": {
    "start": "2030-12-01T17:59:00+02:00",
    "end": "2030-12-01T17:59:20+02:00"
  },
  "rule": {
    "id": 100,
    "title": "Password spraying activity",
    "type": "aggregation",
    "level": "high",
    "status": "experimental",
    "description": "Possible password spraying attempt detected.",
    "file": "password-spray.yaml"
  },
  "event": {
    "distinct_users": {
      "count": 4,
      "per_second": 4,
      "sample": [
        "phopkins",
        "sara68"
      ]
    },
    "source": {
      "ip": "192.168.10.10"
    },
    "total_failures": 5
  }
}

License

Apache License 2.0

Directories

Path Synopsis
cmd
inobi command
Package main is the entry point for the inobi command-line tool.
Package main is the entry point for the inobi command-line tool.
internal
config
Package config handles loading and validation of the main configuration file.
Package config handles loading and validation of the main configuration file.
connector
Package connector defines types that implement streams.Source and streams.Sink interfaces.
Package connector defines types that implement streams.Source and streams.Sink interfaces.
engine
Package engine implements the core detection engine streaming logic, event processing, logging, and metrics.
Package engine implements the core detection engine streaming logic, event processing, logging, and metrics.
litefunc
Package litefunc implements config-defined expr functions that are inlined at compile time via AST patching.
Package litefunc implements config-defined expr functions that are inlined at compile time via AST patching.
loader
Package loader implements generic YAML listing, loading, and validation functionality.
Package loader implements generic YAML listing, loading, and validation functionality.
maputil
Package maputil implements utility functions to interact with nested map[string]any structures.
Package maputil implements utility functions to interact with nested map[string]any structures.
ruleset
Package ruleset handles loading and basic validation of rules.
Package ruleset handles loading and basic validation of rules.
ruletest
Package ruletest orchestrates the execution of rule tests.
Package ruletest orchestrates the execution of rule tests.
scopeset
Package scopeset handles loading and compilation of scope definitions.
Package scopeset handles loading and compilation of scope definitions.
state
Package state owns everything Inobi persists.
Package state owns everything Inobi persists.
streams
Package streams is a trimmed fork of github.com/reugn/go-streams at commit 86444ed
Package streams is a trimmed fork of github.com/reugn/go-streams at commit 86444ed
streams/extension
Package extension provides basic connector implementations.
Package extension provides basic connector implementations.
streams/flow
Package flow provides streams.Flow implementations.
Package flow provides streams.Flow implementations.
streams/internal/assert
Package assert provides minimal test assertions.
Package assert provides minimal test assertions.
strutil
Package strutil provides string helper functions for use in expr environments.
Package strutil provides string helper functions for use in expr environments.
Package udf exposes user-defined functions to rule expressions under the "udf." prefix.
Package udf exposes user-defined functions to rule expressions under the "udf." prefix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL