graphql-expert-best-practices

Fail

Audited by Socket on Feb 15, 2026

1 alert found:

Obfuscated File
Obfuscated FileHIGH
rules/schema-field-overload.md

The provided insecure example demonstrates a common API design anti-pattern: overloading a GraphQL field to return either the authenticated viewer or an arbitrary user based on a nullable argument and returning the same concrete type for both. This pattern risks accidental disclosure of private fields. The recommended fix — distinct fields (viewer vs user(id: ID!)) and distinct types (Viewer vs PublicUser) — is appropriate and reduces surface area for accidental leaks by using schema/type enforcement rather than runtime branching. No signs of malware or obfuscation were found in the examples; this is a security design issue rather than malicious code.

Confidence: 98%
Audit Metadata
Analyzed At
Feb 15, 2026, 08:09 PM
Package URL
pkg:socket/skills-sh/wispbit-ai%2Fskills%2Fgraphql-expert-best-practices%2F@842983a213ec54c5e98979f4ea916c57a6c6e2d6