Files
Julian LechnerandClaude Opus 5.5 368cf5ee4a docs(security): add logging and client app rules, close coverage gaps
New focused rules: security logging and audit (events to log, log
injection, what never to log, tamper-evident audit trails) and desktop
and mobile client apps (shipped code is public, platform secret stores,
pinning with rotation, signed updates, WebView limits).

Existing rules gain inbound webhook verification in api, GDPR handling
of personal data in data, container and infrastructure-as-code
hardening in supply-chain, and post-quantum key establishment with
ML-KEM (FIPS 203) in a hybrid construction in crypto. Security testing
of a third-party or public target now needs one confirmation of
ownership or permission. Duplicate authorization bullets in auth and
api are merged, and webhook routing distinguishes inbound from outbound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:03:44 +01:00

31 lines
3.1 KiB
Markdown

# Security Baseline
Apply this language- and framework-independent baseline to changes to or reviews of code, scripts, hooks, tests, infrastructure, integrations, and executable configuration. Use the platform's established controls to implement it. Load focused security rules only for boundaries affected by the task; triggers are listed in the global instructions.
* Prioritize confidentiality, integrity, and availability. When security and performance conflict, preserve the security control and find a more efficient implementation; explain unavoidable cost.
* Identify trust boundaries and likely abuse paths. Treat external input as untrusted; validate it before use and enforce authorization at the resource or operation boundary.
* Default to deny, least privilege, and fail-closed behavior. Keep protections consistent across alternate paths, background work, caches, and administrative operations.
* Bound attacker-controlled work: input and output sizes, computation, memory, concurrency, retries, and time. Use timeouts, quotas, and rate limits where needed to prevent resource exhaustion and denial of service.
* Protect secrets and sensitive data throughout their lifecycle. Minimize collection and retention; never hardcode, commit, log, expose, or send them to unauthorized destinations.
* Use maintained platform mechanisms for authentication, authorization, cryptography, serialization, and transport security. Do not invent cryptography or bypass validation, certificate checks, or other controls.
* Keep dependencies and privileges minimal. Return safe errors and diagnostics without exposing secrets or internal details.
## Focused Security Rules
Load only the topic rules that match the affected boundary.
| Topic | Codex rule | Claude skill |
| --- | --- | --- |
| Authentication, authorization, sessions, tokens, permissions, and tenants | `references/auth.md` | `rules-security-auth` |
| Inbound HTTP endpoints, webhooks, request handling, and API (de)serialization | `references/api.md` | `rules-security-api` |
| Browsers, cookies, redirects, XSS, and CSRF | `references/web.md` | `rules-security-web` |
| Databases, queries, persistence, and sensitive data | `references/data.md` | `rules-security-data` |
| Files, uploads, archives, paths, processes, IPC, XML parsing, and deserialization | `references/files.md` | `rules-security-files` |
| Outbound HTTP calls, URL fetching, proxies, TLS, and SSRF | `references/network.md` | `rules-security-network` |
| Cryptography, secrets, keys, and credentials | `references/crypto.md` | `rules-security-crypto` |
| Dependencies, packages, plugins, builds, containers, infrastructure as code, deployment, and CI | `references/supply-chain.md` | `rules-security-supply-chain` |
| LLM calls, prompts, agents, tools, and retrieval (RAG) | `references/ai.md` | `rules-security-ai` |
| Security logging, audit trails, and monitoring | `references/logging.md` | `rules-security-logging` |
| Desktop and mobile client apps | `references/clients.md` | `rules-security-clients` |
| Active security testing and exploit validation | `references/testing.md` | `rules-security-testing` |