Skip to main content

OAuth scope and third-party integrations

These checks cover OAuth scopes on connected apps, auth providers and credentials, and the data Apex sends out through Named Credential callouts.

vulkro-sf scan ./force-app
vulkro-sf org oauth-risk -o <alias> # live org

Checks​

Rule IDWhat it findsFix
SF-OAUTH-SCOPE-001A third-party connected app, auth provider or credential granted full, refresh_token or api with no IP or scope constraint.Use the narrowest scope and bind the app to an IP allowlist.
SF-OAUTH-SCOPE-002Apex forwarding request input (Aura, REST or page parameters) into the body or URL of a Named Credential callout in the same file.Validate and map caller input to known-safe values before the callout.
SF-OAUTH-SCOPE-003refresh_token granted to an auth provider or app not on the verified provider list.Drop refresh_token unless offline access is needed; grant it only to verified providers.
SF-OAUTH-SCOPE-004A connected app with an over-broad scope and no admin pre-approval.Require admin-approved users.
SF-OAUTH-SCOPE-005A Named or External Credential holding an over-broad scope under a shared named principal.Give each integration its own principal with the minimum scope.
SF-OAUTH-SCOPE-006Summary row naming every over-broad, unconstrained third-party OAuth grant in the project.Work through the findings it lists.
SF-OAUTH-SCOPE-007A connected app with full scope, no IP constraint and no admin pre-approval together.Fix all three.
SF-OAUTH-SCOPE-008A client credentials flow that runs as an administrator, with full or api scope and relaxed IP restrictions.Run as a dedicated, minimum-privilege integration user.

See also: Connected Apps, Named Credentials