CI / CI configuration security checks (pull_request) Successful in 2s
CI / Capabilities and shell quality (pull_request) Successful in 15s
CI / Python tests and compilation (pull_request) Successful in 36s
CI / QMD unit tests (pull_request) Successful in 7s
CI / Build and inspect generated packages (pull_request) Successful in 16s
CI / Bash integration and installation guards (pull_request) Failing after 51s
CI / PowerShell tests on Ubuntu (pull_request) Failing after 1m45s
CI / Installed client configuration smoke tests (pull_request) Canceled after 1m24s
- Resolve contradictions: authorization is never a skipped "boundary check"; one browser token policy (BFF/HttpOnly cookies first, RFC 10017); one sanitizer-bypass rule; Angular responses are unknown until validated. - Add security rules for AI/LLM integration and Java XXE, concrete crypto and password-hashing parameters, and RFC 8725 JWT validation. - Update version-dependent guidance after checking official sources: Angular 22, TypeScript 6/7, Node 24+, .NET 10/C# 14, JDK 21-25, Spring Boot 4; add a Spring Boot and Spring Security topic. - Give every rule a unique level-1 title and scope line, keep language security files to language specifics, and fix routing for inbound vs outbound HTTP, XML parsing, and WPF/Angular parent rules. - Validate rule structure and routing in validate-config.py, with tests. - Fix CI issues found by a local run: shellcheck directive order, pinned ruff rule set, Invoke-Python test mock, CRLF-tolerant package checks, Windows-only credential test, and refreshed prompt-budget baselines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
1.6 KiB
Markdown
14 lines
1.6 KiB
Markdown
# API security
|
|
|
|
* Authenticate and authorize protected endpoints; validate every request payload and identifier.
|
|
* Enforce object-level authorization on every read and write, using the authenticated principal and resource ownership at the operation that accesses the data.
|
|
* Bind only explicitly permitted request fields. Do not allow mass assignment of ownership, role, state, or other privileged properties.
|
|
* Bound request and response sizes, pagination, query results, and expensive operations.
|
|
* Apply rate limits and quotas to authentication, search, uploads, expensive operations, and other abuse-prone endpoints. Keep administrative routes separately protected.
|
|
* Define safe retry and idempotency behavior for state-changing requests. Protect against replay and duplicate side effects where relevant.
|
|
* Return only authorized fields. Do not expose stack traces, internal models, secrets, or implementation details in API responses or errors.
|
|
* Prefer explicit DTOs and schemas; reject unknown or ambiguous fields when accepting them could alter privileged state.
|
|
* Deserialize request bodies into explicit types. Never let the payload choose the runtime type (polymorphic type names, class names, or default typing) unless the allowed subtypes are registered explicitly; bound body size and nesting depth. Parse XML with external entities and DTDs disabled.
|
|
* Keep authorization, validation, serialization, and error responses consistent with the published schema and supported clients.
|
|
* Test malformed, oversized, unauthenticated, unauthorized, cross-user, cross-tenant, and duplicate requests within the user's requested scope.
|