.agents/skills/security-advisory-lessons/SKILL.md
Use this skill as a RustFS-specific security lens before changing or approving code. For the distilled advisory lessons and review patterns, read advisory-patterns.md.
When currentness matters, fetch the live advisory inventory instead of relying on this skill as a status mirror:
gh api repos/rustfs/rustfs/security-advisories --paginate \
--jq '.[] | {ghsa_id,state,severity,summary,updated_at}'
Fetch full advisory details only when the live summary suggests a new or changed lesson:
gh api repos/rustfs/rustfs/security-advisories/<GHSA_ID>
For the full pattern map, read advisory-patterns.md.
rustfs/src/admin/, rustfs/src/storage/, rustfs/src/auth.rs, rustfs/src/server/layer.rs, crates/iam/, crates/policy/, crates/credentials/, crates/ecstore/src/rpc/, crates/protocols/, crates/rio/, OIDC/STS federation code, and console preview/auth code.validate_admin_request or the established equivalent with the right AdminAction.Resource scoping constrains blast radius unless the policy engine actually enforces resources for that action.parent, claims, accessKey, secretKey, status, policy names, and groups.target_user.deny_only or "no explicit deny" become an allow decision that skips required allow checks.Host, X-Forwarded-Proto, redirect targets, state, and callback parameters as untrusted; credential-bearing redirects require a configured, allowlisted origin.GetObject and destination PutObject semantics equivalent to CopyObject, including copy-source and policy conditions.CreateMultipartUpload, UploadPartCopy, CompleteMultipartUpload, or AbortMultipartUpload return success without authorization.content-length-range, key prefix, exact metadata/content-type, and all signed policy conditions.RETR to GetObject, SIZE/MDTM to HeadObject, MKD to CreateBucket, and bucket probes to ListBucket or HeadBucket..., absolute paths, URL-encoded traversal, platform separators, empty components, and paths that canonicalize outside the intended root.Debug implementations, ?value tracing, merged config dumps, and dependency-level HTTP body logging as leak surfaces.? and get printed by error!/startup logging far from where they were constructed. Never interpolate a raw config or credential value into an error string.<name>: prefix), so a parse-failure hint must name the env var or file and the expected format, never echo the input. Redacting Debug impls does not cover this channel.unwrap, expect, and panic-prone deserialization with typed errors.Origin while also allowing credentials. Default CORS should be no CORS unless explicitly configured.nosniff, CSP, strict content-type handling, and avoiding durable credentials in localStorage..pdf.X-Forwarded-For or X-Real-IP when the request came from a configured trusted proxy.Host, X-Forwarded-Host, or X-Forwarded-Proto.aws:SourceIp and policy condition evaluation.Use these prompts while reviewing a diff:
format! interpolate a variable that can hold secret material, including a config parse error that echoes the raw input?exp, forge sessionPolicy, or use a principal-controlled key as signing authority?CopyObject vs UploadPartCopy, and do all paths enforce the same security contract?