corrections
CI / CI configuration security checks (push) Successful in 6s
CI / Python tests and compilation (push) Failing after 12s
CI / QMD unit tests (push) Skipped
CI / Capabilities and shell quality (push) Successful in 1m50s
CI / Build and inspect generated packages (push) Skipped
CI / Bash integration and installation guards (push) Skipped
CI / Installed client configuration smoke tests (push) Skipped
CI / PowerShell tests on Ubuntu (push) Failing after 7m24s
CI / CI configuration security checks (push) Successful in 6s
CI / Python tests and compilation (push) Failing after 12s
CI / QMD unit tests (push) Skipped
CI / Capabilities and shell quality (push) Successful in 1m50s
CI / Build and inspect generated packages (push) Skipped
CI / Bash integration and installation guards (push) Skipped
CI / Installed client configuration smoke tests (push) Skipped
CI / PowerShell tests on Ubuntu (push) Failing after 7m24s
This commit is contained in:
1 parent
b35e2254b3
commit
c3e22eb902
39 files changed
+246
-151
No files matched your search
@@ -1,5 +1,7 @@
|
||||
# API security
|
||||
|
||||
Apply these rules when adding or changing inbound HTTP endpoints, webhooks, request handling, or API (de)serialization.
|
||||
|
||||
* Authenticate protected endpoints and 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.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Authentication and authorization security
|
||||
|
||||
Apply these rules when changing authentication, authorization, sessions, tokens, permissions, or tenant isolation.
|
||||
|
||||
* Use established authentication standards and password hashing; never store plaintext or reversibly encrypted passwords.
|
||||
* Hash passwords with Argon2id (at least m=19 MiB, t=2, p=1); if unavailable, scrypt (N=2^17, r=8, p=1), bcrypt (cost 10 or higher; inputs beyond 72 bytes are truncated, so reject or pre-handle longer passwords), or PBKDF2-HMAC-SHA256 with at least 600,000 iterations where FIPS compliance requires it (OWASP Password Storage Cheat Sheet). Never create password schemes or reduce work factors merely to improve latency; rehash on login when parameters are raised.
|
||||
* Enforce authorization server-side, deny by default, and check it on every request and sensitive operation, including background jobs and alternate API paths. Verify resource ownership and tenant boundaries, and do not trust role or identity values supplied by clients.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Cryptography and secrets security
|
||||
|
||||
Apply these rules when using cryptography or handling secrets, keys, or credentials.
|
||||
|
||||
* Never implement custom cryptographic primitives. Never use MD5 or SHA-1 for security purposes, DES, 3DES, RC4, ECB mode, or unauthenticated CBC.
|
||||
* Use maintained platform cryptography with authenticated encryption, secure randomness, and verified signatures and certificates. Minimum choices (as of OWASP and NIST guidance in 2026; check current guidance when starting a project):
|
||||
* Symmetric encryption: AES-256-GCM with a unique 96-bit nonce per key and message, never reused, or ChaCha20-Poly1305.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Database and data security
|
||||
|
||||
Apply these rules when writing database queries, persistence code, or code that stores or exposes sensitive data.
|
||||
|
||||
* Use parameterized queries or ORM parameter binding; never concatenate untrusted input into SQL.
|
||||
* Parameterize values in every query path, including raw SQL and stored procedures. Allowlist dynamic table names, columns, and sort directions.
|
||||
* Use least-privilege database identities, separate application and migration privileges, and protect connection strings and backup credentials.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# File and process security
|
||||
|
||||
Apply these rules when handling files, uploads, archives, paths, processes, IPC, XML parsing, or deserialization.
|
||||
|
||||
* Validate filenames, content, sizes, and paths; prevent traversal, zip-slip, and unsafe symbolic-link use.
|
||||
* Resolve paths against a trusted root and verify the canonical result remains inside it. Account for symlink or reparse-point changes where an attacker can modify directories.
|
||||
* Restrict filesystem permissions to the intended identity and directory. Use safe temporary-file creation and avoid predictable names or permissive shared locations.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Network and SSRF security
|
||||
|
||||
Apply these rules when making outbound HTTP calls, fetching URLs, configuring proxies or TLS, or guarding against SSRF.
|
||||
|
||||
* Use HTTPS and never disable certificate or TLS validation.
|
||||
* Restrict inbound and outbound access to required ports, interfaces, hosts, and protocols.
|
||||
* Treat user-controlled URLs as dangerous. Allowlist schemes and destinations, reject loopback, link-local, private, and cloud metadata ranges unless explicitly needed, and validate the resolved destination.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Supply-chain security
|
||||
|
||||
Apply these rules when changing dependencies, packages, plugins, builds, containers, infrastructure as code, deployment, or CI.
|
||||
|
||||
* Keep dependencies minimal, maintained, and from verified sources; respect lockfiles and review identity and compatibility before adding or upgrading packages.
|
||||
* Verify package identity, source, maintainer, release history, transitive dependencies, and install-time behavior. Treat typosquats and unexpected ownership changes as risks.
|
||||
* Pin or constrain versions according to project policy, commit lockfiles, and remove unused dependencies. Review lockfile changes instead of hand-editing generated entries.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Web and frontend security
|
||||
|
||||
Apply these rules when changing browser code, cookies, redirects, or defenses against XSS and CSRF.
|
||||
|
||||
* Escape or sanitize untrusted content; never inject untrusted HTML. Bypass framework sanitization (for example Angular `bypassSecurityTrust*` or React `dangerouslySetInnerHTML`) only for compile-time constants, developer-controlled values, or the output of a maintained sanitizer, and state the reason in a comment at the call site.
|
||||
* Encode output for its exact context (HTML, attributes, JavaScript, CSS, or URL). Prefer text APIs and framework-safe templates; use a maintained sanitizer only when rich HTML is required.
|
||||
* Protect state-changing browser requests from CSRF where applicable; validate origin or anti-CSRF tokens and do not treat CORS as authorization.
|
||||
|
||||
Reference in new issue
Block a user