Skip to content

Plugin SDK

When Corveil doesn't ship a first-party sensor for a source, you can build your own with the Plugin SDK. A sensor implements a small Go interface — the sensor worker owns persistence and org-scoping, so your plugin just returns normalized events.

At a glance, a sensor implements:

  • Configure(config) — apply configuration.
  • Validate(ctx) — check the data source is reachable (powers Test connection).
  • Poll(ctx, cursor) — fetch new events since a cursor, return events + the next cursor.
  • Backfill(ctx, since, until) — fetch a historical range (optional).
  • Health(ctx) — report current status.

Each sensor also registers a field spec (sensor.RegisterSpec) that declares its config and credential fields so the Add sensor form renders the right inputs — the same specs the sensor guides are built from. Credential fields can reference a credential vault type by id instead of taking an inline secret.

Learn more

Full plugin authoring reference (lifecycle hooks, typed interfaces, hot-reload) lives with the SDK. This page is a pointer so the docs site links the extension story; it is not the complete SDK reference.