Skip to content

Conversation

Shasheen8
Copy link

Security Fix: NPM Registry Token Exposure

Issue: NPM registry authentication tokens were exposed in the DOM on the Custom NPM Registry settings page, accessible to all workspace members including read-only users (SEC-520).

Changes:

  • Modified NpmRegistry type
  • Updated compile.ts to handle the boolean flag instead of the actual token
  • Removed client-side token handling from NPM registry fetcher

Impact:

  • Auth tokens are no longer sent to the client
  • Client only receives a boolean indicating if a token is configured
  • Tokens cannot be extracted from DOM, network requests, or browser storage
  • NPM package fetching continues to work as authentication is handled server-side

This fix will ensures sensitive NPM registry credentials remain server-side only, preventing unauthorized access by workspace members with limited permissions.

Associated tickets:

  1. SEC-520
  2. ENG-39975

Copy link

codesandbox bot commented Sep 23, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@Shasheen8 Shasheen8 requested a review from necoline September 23, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant