Skip to content

fix(auth): prevent browser autofill of PAT field#693

Open
anshul23102 wants to merge 1 commit into
GitMetricsLab:mainfrom
anshul23102:fix/687-token-exposure
Open

fix(auth): prevent browser autofill of PAT field#693
anshul23102 wants to merge 1 commit into
GitMetricsLab:mainfrom
anshul23102:fix/687-token-exposure

Conversation

@anshul23102
Copy link
Copy Markdown
Contributor

Description

The Personal Access Token input field did not set an autocomplete attribute. Browsers with saved form data could auto-fill the field with previously stored passwords, potentially placing a credential into the PAT field without the user's intent and without them knowing which credential was filled.

Root Cause

The TextField for the PAT did not specify inputProps.autoComplete. Browsers default to treating password fields as login credentials and may autofill them from the password manager.

Related Issue

Closes #687

Type of Change

  • Bug fix (security)

Changes Made

  • src/pages/Tracker/Tracker.tsx: Added inputProps with autoComplete set to new-password on the PAT TextField. This signals to the browser that the field is for entering a new credential rather than filling a saved one. The field already uses type=password for visual masking.

Testing Done

  1. Open the tracker form: browser no longer autofills the PAT field.
  2. The field still masks input correctly with type=password.
  3. User-typed PAT values work as before.

Checklist

  • My code follows the style and formatting of this project
  • I have tested my changes locally and they work as expected
  • There are no merge conflicts with the base branch
  • This PR is linked to the correct issue

…ecurity guard

The Personal Access Token input field did not set autocomplete='new-password'.
Browsers with saved form data could auto-fill the field with stored passwords
or prefill it on page load, potentially exposing the credential without the
user's intent.

Set inputProps.autoComplete to 'new-password' on the PAT TextField so
browsers treat the field as a new-credential input rather than a fillable
login field. The field already uses type='password' for masking; this
change prevents the autofill vector.

Closes GitMetricsLab#687
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 0f3b21c
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a2028560eb971000762c55b
😎 Deploy Preview https://deploy-preview-693--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@anshul23102, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 2 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ebab9065-85ab-4e50-a22d-168b05565e2a

📥 Commits

Reviewing files that changed from the base of the PR and between 53f820b and 0f3b21c.

📒 Files selected for processing (1)
  • src/pages/Tracker/Tracker.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security] API Exposes Raw User Tokens in JSON Response - Credential Leak

1 participant