Skill reviewed
skills/ai-security/model-supply-chain/SKILL.md
Gap
The current model supply-chain review mentions unsafe deserialization, but it does not force reviewers to build a complete evidence trail for model serialization safety: actual artifact format, loader API, explicit loader flags, framework-version default behavior, safetensors conversion provenance, and executable-code escape hatches such as trust_remote_code=True.
False-positive scenario
A team verifies a model checksum and marks the model artifact as safe. The model still loads from a pickle-backed .bin, .pt, or .pth checkpoint through torch.load, from_pretrained, a conversion script, or a compatibility shim. The checksum proves byte stability, but the loader can still execute code or rely on unsafe framework defaults.
Missed variants
- Production or CI calls
torch.load without an explicit weights_only=True, or sets weights_only=False to keep legacy checkpoints working.
from_pretrained can fall back to pickle-backed weights because use_safetensors is absent or false.
- Safetensors conversion downloads and deserializes the unsafe source artifact first, but the conversion environment, source digest, converter version, and output digest are not recorded.
trust_remote_code=True or custom model classes execute registry-provided code without pinned revision and code-owner approval.
Edge cases
A legacy checkpoint may need one-time unsafe loading, but that should happen only inside an isolated conversion job with no production secrets, no broad filesystem access, no network egress, and a signed non-pickle output artifact promoted to production. Public safetensors artifacts are still not proof against poisoned weights or backdoors; this gate only covers executable deserialization risk.
Proposed remediation
Add a serialization safety evidence gate, detection patterns, evidence table, output fields for loader safety, finding classifications, and a common pitfall covering unsafe checkpoint conversion provenance.
Bounty note
If accepted under the project bounty terms, payment details can be provided privately through the maintainer's preferred channel.
Skill reviewed
skills/ai-security/model-supply-chain/SKILL.mdGap
The current model supply-chain review mentions unsafe deserialization, but it does not force reviewers to build a complete evidence trail for model serialization safety: actual artifact format, loader API, explicit loader flags, framework-version default behavior, safetensors conversion provenance, and executable-code escape hatches such as
trust_remote_code=True.False-positive scenario
A team verifies a model checksum and marks the model artifact as safe. The model still loads from a pickle-backed
.bin,.pt, or.pthcheckpoint throughtorch.load,from_pretrained, a conversion script, or a compatibility shim. The checksum proves byte stability, but the loader can still execute code or rely on unsafe framework defaults.Missed variants
torch.loadwithout an explicitweights_only=True, or setsweights_only=Falseto keep legacy checkpoints working.from_pretrainedcan fall back to pickle-backed weights becauseuse_safetensorsis absent or false.trust_remote_code=Trueor custom model classes execute registry-provided code without pinned revision and code-owner approval.Edge cases
A legacy checkpoint may need one-time unsafe loading, but that should happen only inside an isolated conversion job with no production secrets, no broad filesystem access, no network egress, and a signed non-pickle output artifact promoted to production. Public safetensors artifacts are still not proof against poisoned weights or backdoors; this gate only covers executable deserialization risk.
Proposed remediation
Add a serialization safety evidence gate, detection patterns, evidence table, output fields for loader safety, finding classifications, and a common pitfall covering unsafe checkpoint conversion provenance.
Bounty note
If accepted under the project bounty terms, payment details can be provided privately through the maintainer's preferred channel.