Elastic Security and SpockOps
Send every deployment decision, policy change and signed checkpoint to Elastic Security, through Elastic Agent's Custom HTTP Endpoint or a bucket input, beside the GitHub audit log you already collect.
Many security teams already collect GitHub's audit log in Elastic Security. SpockOps adds the record of how change was governed: each deployment decision with the rules behind it, each review and outcome, and every change to the policies themselves. Elastic Agent receives it the way it receives GitHub's own stream, so it lands beside the data the team already searches.
What does Elastic already receive from GitHub? #
Elastic's GitHub integration collects GitHub's audit log either by polling GitHub's API or from GitHub's audit log stream, read from Amazon S3, Azure Blob Storage, Google Cloud Storage or Azure Event Hubs. Events land in the github.audit data stream, a sound record of change to GitHub itself.
Nothing on this page alters that. SpockOps arrives in its own data stream, logs-spockops.chain-*, in the same shape as GitHub's events, and can be read by the same Elastic Agent inputs. The two can share dashboards, queries and detection rules.
What does SpockOps add in Elastic? #
It adds judgment to the record of configuration. GitHub's log can show that a deployment reached production and that a reviewer approved it. SpockOps adds which policies and rules it was checked against, which failed, whether a person, a bot or an AI agent asked for it, and whether those rules had been loosened beforehand.
SpockOps is a GitHub App that checks workflows, AI agents and deployments against a team's policies. Each policy either watches, in Evaluate, or enforces, in Block. Everything SpockOps decides, and every change to the policies it decides by, is written in order to a tamper-evident record called the governance chain. In Elastic, that record becomes:
- Deployment decisions, with each policy and rule checked, the rules that failed, the runner, and whether the actor was a person, a bot or an agent.
- Reviews and outcomes: who approved or rejected each deployment, and how it ended.
- Policy changes to workflow, agentic and deployment policies: who made them, what changed in plain words, whether the change weakened or widened the policy, and the reason given.
- Stream changes: any change to where the chain is sent, including this connection.
- Daily signed checkpoints, which let a copy of the chain be checked against SpockOps' published keys.
The audit streaming overview describes the full chain and why it can be trusted.
Which route should an Elastic team use? #
The one that matches how Elastic already reads GitHub. SpockOps can send events to an Elastic Agent running the Custom HTTP Endpoint integration, or write files to a bucket that Elastic Agent reads with its Amazon S3, Azure Blob Storage or Google Cloud Storage input. A firm already reading GitHub's stream from a bucket should use the same bucket.
| Custom HTTP Endpoint | Bucket | |
|---|---|---|
| How events arrive | SpockOps sends each batch to the agent, about a minute after it is recorded | SpockOps writes a file a minute to your bucket; Elastic Agent reads each new file |
| What Elastic needs | An agent reachable from the internet over HTTPS, with a valid certificate | Elastic Agent's AWS S3, Azure Blob Storage or Google Cloud Storage input |
| What you keep outside Elastic | Nothing; Elasticsearch is the copy | A complete copy in your own cloud account |
| Best for | Elastic Cloud, or an agent already exposed for other webhooks | Self-managed clusters behind a firewall, and firms that want a copy they can verify independently |
Both routes write to the same data stream through the same ingest pipeline, so every query and rule on this page works on either.
In development. SpockOps' ingest pipeline for Elastic, and the detection rules below, are being built. Until it is released, SpockOps delivers the chain by the routes below today, and the copy can be verified; the fields, searches and rules on this page assume it. Talk to us to be told when it ships, or to try it early.
How is the Custom HTTP Endpoint route set up? #
An Elastic administrator adds the Custom HTTP Endpoint integration to an agent policy and chooses a secret token; a SpockOps administrator enters the agent's address and the same token, and confirms that the agent accepts it. No workflow or repository changes.
In Elastic:
- Install SpockOps' ingest pipeline and rules, once released. The pipeline parses each event and writes it to
logs-spockops.chain-*. - Add the Custom HTTP Endpoint Logs integration to an agent policy. Set the listen address and port, a URL path such as
/spockops, TLS with a certificate a public client will trust, the dataset namespockops.chain, and the SpockOps ingest pipeline. - Set the secret header to
X-SpockOps-Token, with a long random value. The agent refuses any request without it. - Make the endpoint reachable at a public HTTPS address, such as
https://elastic-agent.example.com:8443/spockops.
In SpockOps:
- Open the Audit streaming page under Settings, choose Elastic Security, then the Custom HTTP Endpoint route.
- Enter the endpoint's address and the token. SpockOps stores the token as a secret; it never appears in the chain or in any log.
- Confirm the connection. SpockOps sends the endpoint an empty request. A wrong token is refused; a valid one gets past the check and the empty body is turned away, so the check proves the token works without indexing anything.
- Choose how much history to send: from now on, the whole chain, or everything from a chosen date.
How is a bucket route set up? #
SpockOps writes one compressed file a minute to a folder in your bucket, in a folder layout modelled on GitHub's own stream, and Elastic Agent reads each new file. The storage side is the same for every tool: the Amazon S3 page covers Amazon S3, an Azure Blob Storage container takes a SAS URL with create and write permission, and Google Cloud Storage an HMAC key for a service account that can create and replace objects in the bucket.
- Prepare the bucket and SpockOps' write access as the storage page describes, then in SpockOps choose Elastic Security and the matching bucket route.
- Add the matching input to an agent policy: Custom AWS Logs, with an SQS queue for new files or bucket polling; Azure Blob Storage; or Google Cloud Storage.
- Read only files ending in
.json.log.gzunder SpockOps' folder, decode each line as JSON, and set the dataset tospockops.chainwith the SpockOps ingest pipeline.
The files stay in your bucket, where they also serve as the copy you can check with SpockOps' verifier.
What do the events look like in Elastic? #
Each document keeps the event as SpockOps sent it, in GitHub's audit log shape, with everything SpockOps adds under spockops. The ingest pipeline also fills the Elastic Common Schema fields that Elastic Security's views rely on, so the events sit naturally beside other sources.
| Field | What it holds |
|---|---|
@timestamp |
When SpockOps recorded the event |
event.action, action |
The kind of record, such as spockops_deployment.decision, spockops_policy.update or spockops_chain.checkpoint |
user.name, actor |
Who acted, as GitHub names them |
org, repo |
As in GitHub's own events |
spockops.actor_kind |
person, bot or agent |
spockops.outcome |
The verdict or result, such as approved, rejected or success |
spockops.environment, spockops.production |
Where the deployment was going, and whether GitHub marks that environment as production |
spockops.mode, spockops.failed_rules |
Whether the policy was in Evaluate or Block, and the rules that failed |
spockops.policy.kind, spockops.policy.name, spockops.reason |
For policy changes: which policy, and the reason given |
spockops.risk |
The fixed risk values this event carries |
Which queries and detection rules should a team start with? #
Four queries cover the questions a security team is most often asked about change, and two of them make sensible custom query rules from the first day. They are written in Kibana Query Language, against the fields SpockOps' ingest pipeline creates.
Bots and agents deploying to production. A short query, and one whose answer is rarely what a team expects:
event.action : "spockops_deployment.decision" and spockops.production : true and spockops.actor_kind : ("bot" or "agent")
Deployments that went through although a rule failed. These are the deployments a policy in Evaluate allowed:
event.action : "spockops_deployment.decision" and spockops.risk : "failed_in_evaluate"
In ES|QL, the same events counted by rule show which to move to Block first:
FROM logs-spockops.chain-*
| WHERE event.action == "spockops_deployment.decision"
| MV_EXPAND spockops.risk
| WHERE spockops.risk == "failed_in_evaluate"
| MV_EXPAND spockops.failed_rules
| STATS deployments = COUNT(*) BY repo, spockops.failed_rules
| SORT deployments DESC
Policies loosened or removed. Every weakening, widening or deletion of a workflow, agentic or deployment policy:
event.action : spockops_policy.* and spockops.risk : ("policy_weakened" or "policy_widened" or "policy_deleted")
Deployments no policy covered. A gap in coverage, not a failure:
event.action : "spockops_deployment.decision" and spockops.risk : "no_policy_applied"
As custom query rules in Elastic Security, two of these earn their place:
| Rule | Query | Suggested severity |
|---|---|---|
| Bot or agent deployed to production | The first query above | Medium |
| Policy loosened without a reason | event.action : spockops_policy.* and spockops.risk : "relaxed_without_reason" |
High |
The second deserves its severity. A control loosened with a written reason is a decision someone can be asked about; one loosened without a reason is the pattern an investigation looks for afterwards.
How can a team show that the record is complete? #
With SpockOps' verifier, run against files rather than an index. It checks that every record is present and in order, that none was altered, and that every daily checkpoint carries a valid signature from SpockOps' published keys. With a bucket route, the files in the bucket are the copy to check; with the HTTP route alone, a team can download the chain for an audit period from SpockOps.
SpockOps' verifier, spockops-verify, does the checking. It is a single script, in Python or in Bash, downloaded from the Audit streaming page in SpockOps, and it needs no connection to SpockOps to run. It exits with 0 when everything holds and 1 when anything does not, naming each failure. The checks rest on standard SHA-256 hashes and Ed25519 signatures, so a team can also write its own in any language. The ledger and the receipt explains why an auditor values the chain, and the Amazon S3 page shows the commands.
What should an Elastic team know before relying on it? #
Four points are worth settling at the start. The HTTP endpoint must be public and trusted; the ingest pipeline is in development; every kind of record arrives; and the chain covers what SpockOps governs. Each affects how the integration is set up.
- A public, trusted endpoint. SpockOps sends from its own cloud over HTTPS, verifies the certificate, and will not send to an address inside a private network. A self-managed cluster behind a firewall should use a bucket route instead.
- The pipeline is in development. The fields, queries and rules on this page assume SpockOps' ingest pipeline. Once it is installed, keep it current as the event format gains fields; new fields are added, never renamed.
- The whole chain arrives. Policy changes, stream changes and checkpoints come with the deployment records. They are few in number, and they keep the copy complete enough to verify.
- The chain covers what SpockOps governs. A deployment to an environment that does not use SpockOps' protection rule produces no decision. SpockOps shows which environments and workflows its policies cover, so gaps are visible rather than assumed.
Questions
How does SpockOps send data to Elastic?
To an Elastic Agent running the Custom HTTP Endpoint integration, or as files in an Amazon S3, Azure Blob Storage or Google Cloud Storage bucket that Elastic Agent reads.
Does it replace Elastic's GitHub integration?
No. The GitHub integration writes GitHub's audit log to github.audit. SpockOps writes to its own data stream, logs-spockops.chain-*, and the two can be queried together.
How does the HTTP endpoint know a request comes from SpockOps?
SpockOps sends a secret token in the X-SpockOps-Token header, which the Custom HTTP Endpoint integration checks before accepting anything.
Can a self-managed cluster behind a firewall receive the chain?
Yes, through a bucket route. SpockOps writes to the bucket and Elastic Agent reads from it, so nothing needs to be reachable from the internet.
How can we prove the data is complete?
Run SpockOps' verifier on the bucket files or a download. It checks every record, link and daily signed checkpoint against SpockOps' published keys.
SpockOps












