druid-javascript-security

druid-javascript-security is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 24 tokens per session (628 once invoked), scanned A, original, MIT.

A security guide for Apache Druid’s JavaScript execution engine, which runs JavaScript expressions while transforming data.

In plain words
What is it for?
It is for reviewing and patching JavaScript transform and filter settings, including rejecting empty or unexpected configuration keys.
Why use it?
It helps prevent specially crafted configuration from bypassing security checks and running unauthorized code.

Skill for Claude CodeCodex

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

Good fit It is for reviewing and patching JavaScript transform and filter settings, including rejecting empty or unexpected configuration keys.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/druid-javascript-security
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.

Any agent
npx skills add cxcscmu/SkillLearnBench --skill druid-javascript-security
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

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 druid-javascript-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/druid-javascript-security/github.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/druid-javascript-security)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/druid-javascript-security"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/druid-javascript-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for druid-javascript-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/druid-javascript-security"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/druid-javascript-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 10
    This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
    Fix: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
How audits are shown
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.00024 $0.00628
Opus 5.5 $0.00010 $0.00251
Sonnet 5.5 $0.00005 $0.00126
Haiku 4.5 $0.00002 $0.00063

Measured 3mo ago against content hash 3dabd4c88738, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

druid-javascript-security scanned grade A with 0 findings 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/b1-one-shot-claude-haiku-4-5/fix-security-bug/druid-javascript-security/SKILL.md · 102 lines

How it starts

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

Apache Druid JavaScript Security

Vulnerability Context

Apache Druid versions up to 0.20.0 have a critical vulnerability in JavaScript expression handling where an empty key ("") can bypass security settings, allowing arbitrary code execution through the java.lang.Runtime API.

Key Components

1. JavaScript Transform Spec

  • Located in indexing service modules
  • Handles JavaScript expressions for data transformation
  • Uses GraalVM or Nashorn engine for JavaScript execution

2. Security Filter Structure

The vulnerable structure looks like:

{
  "filter": {
    "type": "javascript",
    "function": "function(){...}",
    "": {
      "enabled": true
    }
  }
}

The empty key "" is the bypass vector.

Patching Strategy

1. Input Validation

  • Reject filter/transform specs with empty string keys
  • Validate all keys in security configuration objects
  • Enforce strict schema validation before passing to JavaScript engine

2. Security Configuration Enforcement

  • Ensure enabled flag is only checked for known, valid keys
  • Implement whitelist of allowed configuration keys
  • Reject any configuration with unexpected keys

3. Code Changes Needed

  • Typically in classes handling JavaScript filter/transform deserialization
  • Common classes: JavaScriptFilter, JavaScriptExpressionValidator, JavaScript spec handlers
  • May need to add validation in both request parsing and execution phases

Testing the Fix

Exploit Request (should fail)

POST /druid/indexer/v1/sampler
{
  "type": "index",
  "spec": {
    "dataSchema": {
      "transformSpec": {
        "filter": {
          "type": "javascript",
          "function": "function(){java.lang.Runtime.getRuntime().exec('malicious_command');}",
          "": {
            "enabled": true
          }
        }
      }
    }
  }
}

Legitimate Request (should work)

POST /druid/indexer/v1/sampler
{
  "type": "index",
  "spec": {
    "dataSchema": {
      "transformSpec": {
        "filter": {
          "type": "javascript",
          "function": "function(row){return true;}"
        }
      }
    }
  }
}

Read the full file on GitHub · 102 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. 3mo ago First seen · 102 lines · 24 tokens per session scan A 3dabd4c88738

Subscribe to this mod's changes

druid-javascript-security is a skill published in the GitHub repository cxcscmu/SkillLearnBench (93 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 628 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

druid-javascript-security compared with skills from other repositories

druid-javascript-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
druid-javascript-securitycxcscmu/SkillLearnBenchSkill931mo agoMITA24Claude Code, Codex
maintaining-core-memoryletta-ai/letta-codeSkill3.9ktodayApache-2.0A50Claude Code, Codex
maven-plugin-configurationbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A31Claude Code, Codex
openai-visionbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A17Claude Code, Codex
powerliftingbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A21Claude Code, Codex
box-least-squaresbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A64Claude Code, Codex
routing-subtour-eliminationbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A70Claude Code, Codex