Skip to content

🛡️ Sentinel: [MEDIUM] Fix sensitive credentials exposure by using password fields#80

Open
bobdivx wants to merge 1 commit into
devfrom
sentinel/secure-credential-inputs-11999556888527800874
Open

🛡️ Sentinel: [MEDIUM] Fix sensitive credentials exposure by using password fields#80
bobdivx wants to merge 1 commit into
devfrom
sentinel/secure-credential-inputs-11999556888527800874

Conversation

@bobdivx
Copy link
Copy Markdown
Owner

@bobdivx bobdivx commented May 17, 2026

🚨 Severity: MEDIUM
💡 Vulnerability: Sensitive credentials like TMDB API keys, Tracker Passkeys, and custom Indexer API keys were exposed in the UI through standard <input type="text"> fields. This exposed credentials to shoulder-surfing, screen sharing, and browser autocomplete mechanisms.
🎯 Impact: An attacker with physical access or a malicious entity observing a screen share could capture these credentials. Furthermore, browsers might inadvertently cache or sync these secrets via their autocomplete features.
🔧 Fix: Updated the input fields for these sensitive credentials in TmdbConfig.tsx, TmdbStep.tsx, UploadTrackerPanel.tsx, UploadTrackersManagerPanel.tsx, and UploadAssistantPanel.tsx to use type="password" combined with autoComplete="off".
✅ Verification: Ran pnpm test and pnpm build to ensure the changes did not cause regressions, which all passed successfully. The changes were also verified by reading the updated source files.

Recorded the finding in .jules/sentinel.md as required.


PR created automatically by Jules for task 11999556888527800874 started by @bobdivx

…sword fields

- Changed TMDB API key input fields to `type="password"` with `autoComplete="off"`.
- Changed Tracker Passkeys and custom Indexer API keys to `type="password"` with `autoComplete="off"`.
- Recorded security learning in `.jules/sentinel.md`.

Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
popcorn-client Ready Ready Preview, Comment May 17, 2026 6:17am

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances security by converting sensitive input fields, such as TMDB API keys and tracker passkeys, from plain text to password types and adding autocomplete prevention across multiple components. It also updates the security log to document this change. Feedback focuses on maintaining the reverse chronological order of the security log and improving the autocomplete configuration by using "new-password" and adding descriptive name attributes to help browsers correctly handle these fields.

Comment thread .jules/sentinel.md
**Learning:** `Math.random()` is not cryptographically secure and shouldn't be used for IDs, especially not for indexer setups and device IDs. Moreover, calling `globalThis.crypto.randomUUID()` directly fails on HTTP non-localhost sites since it requires a Secure Context.
**Prevention:** Always use the Web Crypto API (`crypto.getRandomValues()` or `crypto.randomUUID()`) through a centralized utility like `src/lib/utils/uuid.ts` that provides safe fallbacks for unsupported environments and non-secure contexts.

## 2025-02-14 - Use Password Fields for Sensitive Inputs
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new entry for 2025-02-14 is added at the end of the file, which breaks the reverse chronological order established by the previous entries (starting with 2025-02-27). For better maintainability and readability of the security log, entries should be kept in descending chronological order.

Comment on lines +207 to +208
type="password"
autoComplete="off"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using autoComplete="new-password" is generally more effective than "off" for sensitive fields like API keys. It explicitly signals to modern browsers and password managers that they should not attempt to autofill the user's site password into this field, nor should they offer to save the API key as the site's password. Additionally, adding a name attribute helps browsers correctly identify the field's purpose.

Suggested change
type="password"
autoComplete="off"
type="password"
autoComplete="new-password"
name="tmdb_api_key"

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