You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matchPattern in pkg/logger/logger.go handles middle-wildcard patterns (e.g. "a*b") by splitting on * and checking HasPrefix + HasSuffix. However, it does not verify that the namespace string is long enough to contain both the prefix and suffix without overlap.
In practice the codebase uses namespaces of the form "package:subpackage" and patterns like "package:*", so this edge case is unlikely to trigger in production. However the bug is a latent correctness defect.
Impact
Severity: Medium (latent, unlikely to trigger with current namespace conventions)
Incorrect logger enablement could expose debug output for a namespace that was not intended to be enabled
Recommendation
Add a length guard before the prefix/suffix check:
Activity