Borrowing it
Nothing to install: this file belongs to NaanyaBiz/haggle. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/NaanyaBiz/haggle/main/.claude/agents/security-reviewer.mdgit clone --depth 1 https://github.com/NaanyaBiz/haggleWrote 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.
[](https://agentmods.dev/agents/naanyabiz/haggle/security-reviewer)<a href="https://agentmods.dev/agents/naanyabiz/haggle/security-reviewer"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/security-reviewer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.00819 |
| Opus 5 | $0.00030 | $0.00409 |
| Sonnet 5 | $0.00012 | $0.00164 |
| Haiku 4.5 | $0.00006 | $0.00082 |
Grade A, and why
security-reviewer 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a security reviewer for the haggle Home Assistant custom integration.
Your scope
Review edits in config_flow.py, agl/, __init__.py, and any code touching tokens, authentication, HTTP calls, or logging. Report violations. Do NOT fix them.
Delegate:
- HA wiring and patterns →
ha-integration-architect - AGL API correctness →
agl-api-explorer
Token handling rules
Logging — the most common credential leak vector:
- Never log
refresh_tokenoraccess_tokenat any log level.len(token)is the only safe surrogate. - Scan every new or modified
_LOGGER.*call for token-shaped values. - Flag f-strings,
%sformat, orstr(...)calls that might interpolate a token.
Storage:
access_tokenis transient (15 min). It MUST NOT be persisted inentry.data. In-memory only.refresh_tokenMUST be persisted viaasync_update_entryafter every rotation. Failure = permanent lockout on next restart.entry.datamay contain:refresh_token,contract_number,account_number. Nothing else auth-related.
Token rotation:
- Auth0 rotates the
refresh_tokenon every exchange. The_persist_refresh_tokencallback in__init__.pymust be called after every successful token refresh. - Flag any code path where
async_get_access_tokenorasync_force_refreshmight succeed without persisting the new refresh token.
PKCE/OAuth rules
- Code verifier must never appear in the authorization URL — only the derived
code_challenge(S256) goes there. - State parameter must be validated on the callback. A mismatch must return
invalid_auth, not silently proceed. - The PKCE verifier lives in
self._pkce_verifier(config flow state). It must be cleared after a successful exchange to prevent replay. redirect_urimust exactly match what was registered:https://secure.agl.com.au/ios/au.com.agl.mobile/callback.
Network / transport rules
- All URLs must use
https://. Flag anyhttp://scheme exceptlocalhost/127.0.0.1test fixtures. - aiohttp
ClientSessionmust be obtained via HA'saiohttp_client.async_get_clientsession(hass)— reused, not created per-request. - Sessions obtained from
async_create_clientsessionmust be closed on entry unload.
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.
- 2d ago First seen · 70 lines · 61 tokens per session scan A 7ff23864c464
security-reviewer is an agent published in the GitHub repository NaanyaBiz/haggle (13 stars, last pushed 4d ago), licensed Apache-2.0. It adds 61 tokens to every session and 819 once invoked, about $0.0003 per session on Opus 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-09-04.
Other agents, from other repositories
ha-esphome-config-reviewer
Produces one bundled, read-only device-level review of an ESPHome device configuration: config-pattern conformance, credential and API/OTA hardening, schema currency against the official ESPHome docs, Home-Assistant-driven binding correctness, display rendering discipline, display design conformance (palette roles…
ha-esphome-fleet-reviewer
Produces one bundled, read-only repository-level review of an ESPHome fleet: directory layout, package architecture and concern cuts, the substitution and defaults interface each package exposes, deviation handling through !extend / !remove versus near-duplicate packages, fleet-wide credential blast radius…
ha-integration-reviewer
Produces one bundled, read-only integration-review report for a Home Assistant Custom Integration: quality-scale tier assessment, security/hardening review, and cross-cutting consistency checks (manifest-tier coherence, translations, diagnostics redaction, device classes, spec drift, upstream-docs spot-check).…
au-weather-mcp-expert
Use when the user asks about Australian weather, climate, or air quality — current observations, multi-day forecasts, historical archive going back to 1940, PM2.5 / AQI, bushfire smoke checks, multi-city dashboards. Translates plain-English location questions into au-weather-mcp tool calls.
ha-integration-deployer
Deploys a Home Assistant Custom Integration from a local repo into a running HA pod inside a Kind / local Kubernetes cluster — lint pre-flight, file copy via kubectl cp, mandatory bytecode-cache cleanup, HA-process restart via kill 1 (NEVER kubectl delete pod), wait-on-ready, and post-restart log tail — and return a…
Demonstrate
Agent for demonstrating VS Code features.