web-data-fetching-graphql-apollo
Pass
Audited by Gen Agent Trust Hub on Nov 9, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The
PostDetailcomponent inexamples/fragments.mdutilizesdangerouslySetInnerHTMLto render thepost.contentfield directly from a GraphQL query. This creates a vulnerability surface for Cross-Site Scripting (XSS) if the content returned by the server is malicious or compromised. - Ingestion points: External data from GraphQL query results (e.g.,
data.post.contentinPostDetail). - Boundary markers: There are no explicit delimiters or instructions to the agent to treat this content as untrusted.
- Capability inventory: While the code primarily handles rendering, the presence of an XSS vector combined with the skill's use of sensitive data in
localStorage(auth tokens) increases the risk of data theft. - Sanitization: The provided examples do not include any sanitization or filtering logic (such as
DOMPurify) before rendering raw HTML. - [SAFE]: The skill demonstrates standard and secure authentication patterns, including the dynamic attachment of Bearer tokens via Apollo's
setContextlink and the appropriate removal of tokens fromlocalStorageupon authentication failure. - [SAFE]: The configuration for WebSocket-based subscriptions using
graphql-wsfollows architectural best practices, such as ensuring connections are only initiated in a browser environment and using functions to retrieve tokens at connection time. - [SAFE]: The use of official migration tools and code generation utilities, such as
npx @apollo/client-codemod-migrate-3-to-4and@graphql-codegen/cli, represents standard and expected development workflows.
Audit Metadata