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
fix(audit): exempt a token-response field only where the tool declares it
The reachability audit treated seven credential-derived fields as guaranteed
fillers for a required hidden parameter on any OAuth tool. Only `accessToken`
is: the resolver assigns it unconditionally. `idToken`, `instanceUrl`,
`apiDomain`, `cloudId`, `domain` and `authStyle` are assigned under
`if (data.X)` — present on some providers' credentials and absent on others —
and `credentialType` additionally only when the tool lists it in
`authoritativeParams`. Whether a credential carries one is a fact about the
provider that the resolver cannot vouch for.
The tool can. `oauth.authoritativeParams` is already the declaration that the
token response supplies the named field, and every real case — the eight
`microsoft_dynamics_365_*` tools hiding `instanceUrl` — already lists it. So a
required hidden parameter in that set is now exempt only when its tool declares
it there, generalising the rule `credentialType` alone had. A tool that hides
one without declaring it is asserting a filler the resolver may never run,
which is the shape this audit exists to reject.
Mutation-tested at the real declaration site: stripping `authoritativeParams`
from `DYNAMICS_365_OAUTH_CONFIG` fails the audit naming all eight tools with the
remedy; restoring passes. Nothing is flagged on the current tree.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@@ -134,7 +145,9 @@ function findUnreachableParams(): Finding[] {
134
145
toolId,
135
146
param,
136
147
reason: config.oauth
137
-
? `declares oauth (${config.oauth.provider}), which does not supply '${param}'`
148
+
? TOKEN_RESPONSE_FIELDS.has(param)
149
+
? `declares oauth (${config.oauth.provider}) but not \`authoritativeParams: ['${param}']\`, and the resolver assigns '${param}' only when the credential carries it`
150
+
: `declares oauth (${config.oauth.provider}), which does not supply '${param}'`
138
151
: config.hosting?.enabled
139
152
? `hosting is conditional, so it is not a guarantee for '${param}'`
0 commit comments