diff --git a/apps/backend/src/app/api/latest/integrations/credential-scanning/revoke/route.tsx b/apps/backend/src/app/api/latest/integrations/credential-scanning/revoke/route.tsx index 086f70d44..3fb7e5e42 100644 --- a/apps/backend/src/app/api/latest/integrations/credential-scanning/revoke/route.tsx +++ b/apps/backend/src/app/api/latest/integrations/credential-scanning/revoke/route.tsx @@ -6,6 +6,7 @@ import { createSmartRouteHandler } from "@/route-handlers/smart-route-handler"; import { KnownErrors } from "@stackframe/stack-shared"; import { yupNumber, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields"; import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors"; +import { escapeHtml } from "@stackframe/stack-shared/dist/utils/html"; export const POST = createSmartRouteHandler({ metadata: { @@ -166,7 +167,7 @@ export const POST = createSmartRouteHandler({

API Key Revoked

- Your API key "${updatedApiKey.description}" for ${project.displayName} has been automatically revoked because it was found in a public repository. + Your API key "${escapeHtml(updatedApiKey.description)}" for ${escapeHtml(project.displayName)} has been automatically revoked because it was found in a public repository.

This is an automated security measure to protect your api keys from being leaked. If you believe this was a mistake, please contact support.