Skip to content

Commit b92e99f

Browse files
crysmagsclaude
andcommitted
fix(graphql): publish apm:graphql:resolve:start for IAST taint tracking
The IAST plugin subscribes to 'apm:graphql:resolve:start' to taint resolver args when they originate from a tainted query source (e.g. hardcoded query literals like books(title: "ls")). The orchestrion resolve.js was only publishing to the AppSec channel, so IAST never received field args for hardcoded arguments — only variable args were tainted via HTTP request body tracking. Publish { rootCtx, args, info, path, pathString } to the IAST channel from bindStart to restore parity with the shimmer instrumentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6c4c132 commit b92e99f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/datadog-plugin-graphql/src/resolve.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class GraphQLResolvePlugin extends TracingPlugin {
2020
super(...args)
2121

2222
this.resolverStartCh = dc.channel('datadog:graphql:resolver:start')
23+
this.iastResolveCh = dc.channel('apm:graphql:resolve:start')
2324
}
2425

2526
bindStart (ctx) {
@@ -144,6 +145,10 @@ class GraphQLResolvePlugin extends TracingPlugin {
144145
this.resolverStartCh.publish({ abortController, resolverInfo: getResolverInfo(info, resolverArgs) })
145146
}
146147

148+
if (this.iastResolveCh.hasSubscribers) {
149+
this.iastResolveCh.publish({ rootCtx, args: resolverArgs, info, path: computedPath, pathString: computedPathString })
150+
}
151+
147152
return ctx.currentStore
148153
}
149154

0 commit comments

Comments
 (0)