Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix blocked scopes
adilsona85d99319b1e
diff --git a/backend/src/ee/services/dynamic-secret/providers/tailscale.ts b/backend/src/ee/services/dynamic-secret/providers/tailscale.tsindex 5fca9fd0eb..66f00ec4b8 100644--- a/backend/src/ee/services/dynamic-secret/providers/tailscale.ts+++ b/backend/src/ee/services/dynamic-secret/providers/tailscale.ts@@ -80,7 +80,8 @@ export const TailscaleProvider = (): TDynamicProviderFns => {// oauth credentials issued can have the auth-keys or oauth scope, which allow them// to modify other credentials. Let's block it so this is not possibleconst $validateScopes = (scopes: string[]) => {- if (scopes.includes("auth-keys") || scopes.includes("oauth")) {+ const blockedScopes = new Set(["auth_keys", "oauth_keys", "federated_keys", "api_access_tokens", "all"]);+ if (scopes.some((scope) => blockedScopes.has(scope))) {throw new BadRequestError({ message: "OAuth credentials cannot be used to create or modify other credentials" });}return scopes;