zig-0-16

Warn

Audited by Socket on Oct 8, 2026

1 alert found:

Anomaly
AnomalyLOW
references/std-once.md

This is a legitimate, readable one-time initialization utility with no apparent malicious behavior. However, the claimed thread safety is questionable because the double-checked `done` accesses are ordinary non-atomic boolean operations, creating a potential data race. Manual mutex management also risks a permanently locked mutex if the initializer panics. The implementation should use appropriate atomic acquire/release operations or lock on every check, and ensure mutex release with guaranteed cleanup. The wrapped function itself must be audited separately because it is supplied externally to this fragment.

Confidence: 97%Severity: 62%
Audit Metadata
Analyzed At
Oct 8, 2026, 04:42 AM
Package URL
pkg:socket/skills-sh/full-stack-skills%2Fzig-skills%2Fzig-0-16%2F@8a291f2d703bd71bc2afdada4a7682cb82b65fe19b992655320ba7c0d6fbbf0a