Explore

Rule Explorer

Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.

Public rules
4797
Downloads
7.4M
Verified
4797
Authors
2
Search the rule indexUse CVE, GHSA, CWE, language, framework, package, or rule slug.
1 rules matched. Showing 1 loaded rules.
Publish rule
CVE-2025-25204: Go Nil Error Return On Empty Checkcve-2025-25204-go-nil-error-return-on-empty-check

Returning an unassigned `err` variable inside an empty collection or nil check (`len(x) == 0` or `x == nil`) often results in inadvertently returning `nil` when a failure was intended. Ensure that you explicitly create and return a new error using `fmt.Errorf` or `errors.New` if this logic path represents a failure state.

by Provallyupdated 2026-06-12Apache-2.0
2.3K0 direct2.3K via packs
downloads
74quality
All matching rules loaded.