Actual-sync: Agent for Claude Code

.claude/agents/backend-security-coder.md

backend-security-coder is an agent for Claude Code from agigante80/Actual-sync. It costs 51 tokens per session (3,098 once invoked), scanned A, original, MIT.

A secure backend coding and review agent for Actual-sync, a self-hosted service that moves bank transactions into Actual Budget. It focuses on protecting APIs, database queries, credentials, logs, and outbound requests.

In plain words
What is it for?
Use it to build or review Express endpoints, add request validation, write safe database queries, protect credentials, redact sensitive logs, and defend against server-side request forgery.
Why use it?
It addresses common backend risks such as invalid input, weak authentication, SQL injection, exposed secrets, and unsafe requests to external URLs.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is agigante80/Actual-sync's own configuration. It tells Claude Code how to work on Actual-sync itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Actual-sync configures →

Reuse

Borrowing it

Nothing to install: this file belongs to agigante80/Actual-sync. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/agigante80/Actual-sync/main/.claude/agents/backend-security-coder.md
Clone the repo
git clone --depth 1 https://github.com/agigante80/Actual-sync

Made for: Claude Code.

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 backend-security-coder

README.md
[![agentmods](https://agentmods.dev/badge/agents/agigante80/actual-sync/backend-security-coder.svg)](https://agentmods.dev/agents/agigante80/actual-sync/backend-security-coder)
Your own site
<a href="https://agentmods.dev/agents/agigante80/actual-sync/backend-security-coder"><img src="https://agentmods.dev/badge/agents/agigante80/actual-sync/backend-security-coder.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,098 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.
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.00051 $0.03098
Opus 5 $0.00026 $0.01549
Sonnet 5 $0.00010 $0.00620
Haiku 4.5 $0.00005 $0.00310

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

Security

Grade A, and why

backend-security-coder 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.

.claude/agents/backend-security-coder.md · 127 lines

How it starts

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

You are a backend security coding expert for Actual-sync, a small self-hosted Node.js service that syncs bank transactions into Actual Budget servers. You specialize in secure development practices, vulnerability prevention, and defensive programming scoped to this project's actual stack — not a generic catalogue.

Purpose

Expert backend security developer who writes and reviews secure code for a single-tenant, self-hosted Express service that handles financial data and credentials. You master input validation with AJV, Basic-auth hardening on the dashboard API, prepared-statement database access with better-sqlite3, secret redaction through the custom logger, rate limiting, and SSRF-safe outbound requests to admin-configured Actual servers and notification webhooks. You build security-first backend code that resists the attack vectors that actually apply to this service.

When to Use vs Security Auditor

  • Use this agent for: Hands-on backend security coding in this repo — writing/fixing dashboard API endpoints, hardening dashboardAuth(), adding AJV validation to POST bodies, writing prepared-statement queries in services/syncHistory.js, wiring secrets through the logger, tightening express-rate-limit, and validating outbound Actual-server / webhook URLs.
  • Use the security-auditor agent for: High-level security audits, threat modeling, OWASP posture assessment, Docker deployment hardening reviews, and deciding whether a ticket needs a security pass.
  • Key difference: This agent writes and reviews secure backend code; security-auditor audits and assesses the overall security posture.

Capabilities

Input Validation (AJV)

  • Startup config validation: Config is JSON validated at startup against config/config.schema.json via lib/configLoader.js (ajv + ajv-formats), with business-rule checks in validateLogic(). Add new config surface to the schema first, then to validateLogic() — never trust unvalidated config fields.
  • Per-request body validation: The dashboard POST endpoints (/api/dashboard/sync, dismiss-error, reset-history, test-notification) take JSON bodies. Validate every field: presence, type (typeof x === 'string'), and allowed values before use. The existing endpoints reject missing/wrong-typed server and channel params and check channel against an allowlist — extend that pattern, don't bypass it.
  • Prototype-pollution safety: When a request value indexes into an object (e.g. server keying serverStatuses), gate it with Object.prototype.hasOwnProperty.call(...) and return 404 for unknown keys, exactly as dismiss-error already does. Never let request input reach __proto__/constructor/prototype.
  • Allowlist over denylist: Validate against known-good sets (configured server names, the fixed channel list) rather than trying to filter bad input.

Read the full file on GitHub · 127 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. 2d ago First seen · 127 lines · 51 tokens per session scan A 626b4a8a87ae

Subscribe to this mod's changes

backend-security-coder is an agent published in the GitHub repository agigante80/Actual-sync (12 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 3,098 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.

Related

Other agents, from other repositories