Skill 23 · Secret Serialization
Subchapter 23.4
SPEC.mdMarkdown5 KBView on GitHub
secret-serialization catches credentials that leak through generated serialization. The leak needs a holder (a credential field on a type with generated repr, asdict, model_dump, or property enumeration) and a sink (code that serializes whole objects or every kwarg into logs, spans, errors, caches, or responses). The two sides are usually added separately, and each looks safe in its own diff.
The skill reports either side alone and searches the whole repository for the other side, so a leak is caught whichever half lands second.
In scope:
Out of scope:
security-review covers that..env files. Secret scanners cover those.remote = "getsentry/skills", and engineers reviewing such changes locally.This is opt-in and specialized. It reports an unexcluded credential field before a sink is proven, which is too noisy for a default review of every repository.
allowed-tools space-delimited (Read Grep Glob). Warden drops comma-suffixed tokens such as Read,, which leaves the agent with only find and ls and caps every finding at medium because no sink can be traced.__repr__, asdict, model_dump, toJSON, enumeration). A field is fully excluded when its mechanisms together block all of them.vars, __dict__, pickle, default=vars) as a sink category. No field flag or wrapper defeats it, so it never makes a fully excluded holder partial.private, __slots__, or a custom __init__ as blocking any path. Pydantic Field(exclude=True) or Field(repr=False) alone is partial.references/.See SOURCES.md. Do not store secrets, customer data, span payloads, or internal repository identifiers in this skill.
SKILL.md: threat model, boundary with security-review, credential heuristics, exclusion rules, investigation steps, report table, severity, exclusions, fix guidance, finding format.references/python.md: generated paths and exclusions per Python type, sink table, report and do-not-report examples, regression test shape.references/javascript-typescript.md: the same for JavaScript and TypeScript.uv run scripts/quick_validate.py ../secret-serialization from skills/skill-writer.str(value) kwarg sink elsewhere in the repository, should produce a high finding naming both.SecretStr, #private, a lazily read property, a filtered sink, and Field(repr=False, exclude=True) with only repr or model_dump sinks should produce no finding.Field(exclude=True) alone on a model passed to str() should produce a partial-exclusion finding. Any credential-bearing instance, including a fully excluded or SecretStr one, passed to pickle or default=vars should produce a raw attribute sink finding.SKILL.md when exclusion rules, severity, or the report table change.references/ when a new serializer or sink causes a real leak or a repeated false positive.SOURCES.md.