xche-ai-app-security-pack: Instructions file for Codex

AGENTS.md

xche-ai-app-security-pack AGENTS.md is an instructions file for Codex, OpenCode from xChechi/xche-ai-app-security-pack. It costs 763 tokens per session, scanned B, original, MIT.

A set of security rules for applications made with AI coding tools. It covers common risks such as exposed secrets, unsafe database queries, cross-site scripting, command injection, and weak input validation.

In plain words
What is it for?
Use it to guide coding work involving secrets, databases, browser output, shell commands, authentication, payments, or AI and tool integrations.
Why use it?
It gives a coding agent clear boundaries for handling sensitive code and user input. This helps prevent insecure shortcuts during development.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is xChechi/xche-ai-app-security-pack's own configuration. It tells Codex and OpenCode how to work on xche-ai-app-security-pack 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 xche-ai-app-security-pack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xChechi/xche-ai-app-security-pack. 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/xChechi/xche-ai-app-security-pack/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/xChechi/xche-ai-app-security-pack

Made for: Codex, OpenCode.

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 xche-ai-app-security-pack AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xchechi/xche-ai-app-security-pack/agents-md.svg)](https://agentmods.dev/instructions/xchechi/xche-ai-app-security-pack/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xchechi/xche-ai-app-security-pack/agents-md"><img src="https://agentmods.dev/badge/instructions/xchechi/xche-ai-app-security-pack/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 763 This file is loaded in full into every session.
When invoked 763 The same file — it is already loaded in full.
Security scan B 1 finding. 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.00763 $0.00763
Opus 5 $0.00381 $0.00381
Sonnet 5 $0.00153 $0.00153
Haiku 4.5 $0.00076 $0.00076

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

Security

Grade B, and why

xche-ai-app-security-pack AGENTS.md scanned grade B 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 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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- **SSRF:** never let user input control a server-side request target; allow-list destinations; block private/link-local ranges incl. `169.254.169.254`.

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

AGENTS.md · 28 lines

What it actually says

AGENTS.md — Security rules (cross-tool)

The portable, cross-tool version of these rules. Read natively by Codex, Cursor, GitHub Copilot, Gemini CLI, Aider, Windsurf, Zed and 25+ other agents. Claude Code users: CLAUDE.md carries the same rules plus Claude-specific extras. Full policy with rationale: see SECURITY.md.

These are defaults. If a task conflicts with a rule, stop and flag it — never bypass a control to "make it work."

  • Never hardcode secrets. Read keys/tokens/DB URLs from env vars. Ensure .env/*.env* is gitignored before the first commit. Never put secrets/PII in client code, logs, URLs, or error messages.
  • SQL: always parameterized / ORM. Never build queries with string concatenation, f-strings, .format(), %, or template literals containing user input.
  • XSS: never feed user input to dangerouslySetInnerHTML, innerHTML, v-html, |safe, or document.write. Rely on framework escaping; encode output for its context.
  • No command injection: never pass input to a shell, eval, new Function, or unsafe deserialization (pickle, unsafe yaml.load).
  • Validate every input server-side against a schema (Zod/Pydantic), allow-list not block-list. Client-side checks are UX only.
  • Access control: every endpoint that reads/writes an object must verify ownership/permission server-side. No exceptions for "internal" or unlinked admin routes.
  • Multi-tenant: scope every query to the caller's tenant. Cross-tenant access (IDOR/BOLA) is a critical bug — assume it's there until proven otherwise.
  • Mass assignment: bind request bodies to explicit allow-listed fields; never let users set their own role/owner/price/tenant.
  • Passwords: hash with argon2id or bcrypt — never MD5/SHA-1/unsalted. Rate-limit auth endpoints; generic "invalid credentials" messages.
  • Sessions/cookies: HttpOnly + Secure + SameSite. Never store secrets/sensitive data in a readable signed cookie or JWT payload.
  • Security headers: set CSP (Report-Only first), HSTS, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy. No Access-Control-Allow-Origin: * on authenticated endpoints.
  • SSRF: never let user input control a server-side request target; allow-list destinations; block private/link-local ranges incl. 169.254.169.254.
  • File uploads: validate by content type, cap size, store outside web root with generated names, never execute.
  • Dependencies: verify a package actually exists before adding it (no hallucinated/slopsquatted names); pin versions; run the audit tool; keep deps minimal.
  • LLM/MCP: treat model + tool output as untrusted (encode before render/execute); sandbox MCP servers, allow-list commands by absolute path; require human confirmation for high-impact actions; never send secrets or unminimized PII to models.
  • Errors: return generic messages to clients; never leak stack traces, SQL, or internal paths. Log security events but never secrets/PII.
  • Process: for changes touching auth, payments, secrets, or LLM tools, say so explicitly. Never weaken an existing control to pass a test. Confirm fixes on staging, not prod.
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 · 28 lines · 763 tokens per session scan B b0ea9b2ec082

Subscribe to this mod's changes

xche-ai-app-security-pack AGENTS.md is an instructions file published in the GitHub repository xChechi/xche-ai-app-security-pack (5 stars, last pushed 2mo ago), licensed MIT. It adds 763 tokens to every session, about $0.0038 per session on Opus 5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens