eresus-codeql-heuristics

eresus-codeql-heuristics is a skill for Claude Code, Codex from EresusSecurity/appsec-skills. It costs 70 tokens per session (2,259 once invoked), scanned B, original, Apache-2.0.

A language-by-language checklist of risky inputs, functions, and code patterns to look for during a manual security review. It is based on CodeQL, a tool that scans code for vulnerability patterns.

In plain words
What is it for?
Use it when auditing Java, Kotlin, Python, Go, or JavaScript code for issues such as command injection, SQL injection, and unsafe data handling.
Why use it?
It helps reviewers know where to look for common security problems without relying only on memory or automated scans.

Skill for Claude CodeCodex

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

Good fit Use it when auditing Java, Kotlin, Python, Go, or JavaScript code for issues such as command injection, SQL injection, and unsafe data handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eresussecurity/appsec-skills/eresus-codeql-heuristics
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 EresusSecurity/appsec-skills --skill eresus-codeql-heuristics
Clone the repo
git clone --depth 1 https://github.com/EresusSecurity/appsec-skills

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 eresus-codeql-heuristics

README.md
[![agentmods](https://agentmods.dev/badge/skills/eresussecurity/appsec-skills/eresus-codeql-heuristics.svg)](https://agentmods.dev/skills/eresussecurity/appsec-skills/eresus-codeql-heuristics)
Your own site
<a href="https://agentmods.dev/skills/eresussecurity/appsec-skills/eresus-codeql-heuristics"><img src="https://agentmods.dev/badge/skills/eresussecurity/appsec-skills/eresus-codeql-heuristics.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00070 $0.02259
Opus 5 $0.00035 $0.01130
Sonnet 5 $0.00014 $0.00452
Haiku 4.5 $0.00007 $0.00226

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

Security

Grade B, and why

eresus-codeql-heuristics scanned grade B with 3 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 7d 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.

Encoded or obfuscated payloadmediumSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

- `marshal.loads(userInput)`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

- `requests.get(userInput)`

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `os.system(userInput)`
skills/eresus-codeql-heuristics/SKILL.md · 309 lines

How it starts

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

CodeQL-Informed Audit Heuristics

Purpose

Provide a language-specific reference of dangerous sinks, sources, and patterns that security auditors should prioritize during manual code review. These heuristics are derived from the CodeQL Community Packs — the same query suites used by GitHub Advanced Security to find real vulnerabilities at scale.

Use this skill as a checklist companion during manual audit. It tells you what to look for in each language. The actual manual reasoning is done by eresus-manual-security-audit.


Java / Kotlin

Command Injection

  • Runtime.exec(), ProcessBuilder.command()
  • Runtime.getRuntime().exec(userInput)

JNDI Injection

  • InitialContext.lookup(userInput)
  • Context.lookup() with attacker-controlled LDAP/RMI URLs

Expression Language Injection

  • SpELExpressionParser.parseExpression(userInput)
  • OGNL.getValue(userInput)
  • MVEL.eval(userInput)

SQL Injection

  • Statement.execute(query) with string concatenation
  • Statement.executeQuery("SELECT ... " + userInput)
  • JPA createNativeQuery() with interpolated strings
  • MyBatis ${} (raw) vs #{} (parameterized)

Deserialization

  • ObjectInputStream.readObject()
  • XStream.fromXML()
  • Kryo.readObject()
  • Jackson @JsonTypeInfo with MINIMAL_CLASS / CLASS

XXE

  • DocumentBuilderFactory without setFeature(XMLConstants.FEATURE_SECURE_PROCESSING)
  • SAXParserFactory without disabling external entities
  • XMLInputFactory without disabling DTDs

Unsafe Reflection

  • Class.forName(userInput).newInstance()
  • Method.invoke() with user-controlled method names

Path Traversal

  • new File(basePath + userInput) without canonicalization
  • Paths.get(userInput) without restricting to base directory

Python

Command Injection

  • os.system(userInput)
  • subprocess.Popen(userInput, shell=True)
  • subprocess.call(userInput, shell=True)
  • os.popen(userInput)

Code Injection

  • eval(userInput)
  • exec(userInput)
  • compile(userInput, ...)

Read the full file on GitHub · 309 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. 7d ago First seen · 309 lines · 70 tokens per session scan B e11d069833ae

Subscribe to this mod's changes

eresus-codeql-heuristics is a skill published in the GitHub repository EresusSecurity/appsec-skills (7 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 70 tokens to every session and 2,259 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 3 findings (encoded or obfuscated payload, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.