elasticsearch-audit

elasticsearch-audit is a skill for Claude Code, Codex from aspectrr/deer. It costs 37 tokens per session (1,514 once invoked), scanned A, original, MIT.

A system for recording and querying Elasticsearch security events, such as login attempts, access decisions, role changes, and API-key operations. Elasticsearch is a search and analytics system that stores data in indexes.

In plain words
What is it for?
Use it to enable audit logging, choose which security events to record, send them to an index, query failed authentication attempts, investigate unauthorized access, and detect brute-force patterns.
Why use it?
It provides a record for investigating suspicious access and failed logins. Event filters can reduce unnecessary log data and make investigations easier.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aspectrr/deer/elasticsearch-audit
Any agent
npx skills add aspectrr/deer --skill elasticsearch-audit
Clone the repo
git clone --depth 1 https://github.com/aspectrr/deer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elasticsearch-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/aspectrr/deer/elasticsearch-audit.svg)](https://agentmods.dev/skills/aspectrr/deer/elasticsearch-audit)
Your own site
<a href="https://agentmods.dev/skills/aspectrr/deer/elasticsearch-audit"><img src="https://agentmods.dev/badge/skills/aspectrr/deer/elasticsearch-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01514
Opus 5 $0.00018 $0.00757
Sonnet 5 $0.00007 $0.00303
Haiku 4.5 $0.00004 $0.00151

Measured 6d ago against content hash ee7b1d67c5a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

elasticsearch-audit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X PUT "${ELASTICSEARCH_URL}/_cluster/settings" \
deer-cli/internal/skill/defaults/elasticsearch-audit/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elasticsearch Audit Logging

Enable and configure security audit logging for Elasticsearch via the cluster settings API. Audit logs record security events such as authentication attempts, access grants and denials, role changes, and API key operations.

For detailed API endpoints and event types, see references/api-reference.md.

Jobs to Be Done

  • Enable or disable security audit logging on a cluster
  • Select which security events to record (authentication, access, config changes)
  • Create filter policies to reduce audit log noise
  • Query audit logs for failed authentication attempts
  • Investigate unauthorized access or privilege escalation incidents
  • Set up compliance-focused audit configuration
  • Detect brute-force login patterns from audit data
  • Configure audit output to an index for programmatic querying

Prerequisites

Item Description
Elasticsearch URL Cluster endpoint (e.g. https://localhost:9200 or a Cloud deployment URL)
Authentication Valid credentials (see the elasticsearch-authn skill)
Cluster privileges manage cluster privilege to update cluster settings
License Audit logging requires a gold, platinum, enterprise, or trial license

Enable Audit Logging

curl -X PUT "${ELASTICSEARCH_URL}/_cluster/settings" \
  <auth_flags> \
  -H "Content-Type: application/json" \
  -d '{
    "persistent": {
      "xpack.security.audit.enabled": true
    }
  }'

Audit Output

Output Setting value Description
logfile logfile Written to <ES_HOME>/logs/<cluster>_audit.json. Default.
index index Written to .security-audit-* indices. Queryable via the API.

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 195 lines · 37 tokens per session scan A ee7b1d67c5a4

Subscribe to this mod's changes

elasticsearch-audit is a skill published in the GitHub repository aspectrr/deer (404 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 1,514 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.