Fix weak asset ID entropy, GPS PII console exposure, missing password policy, and upload queue auth gaps#40
Draft
Fix weak asset ID entropy, GPS PII console exposure, missing password policy, and upload queue auth gaps#40
Conversation
…cy, upload auth validation Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Security] Fix weak asset ID entropy and privacy issues
Fix weak asset ID entropy, GPS PII console exposure, missing password policy, and upload queue auth gaps
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four medium-severity security issues: non-cryptographic PRNG for asset IDs, GPS coordinates logged as PII, no password strength enforcement on signup, and upload queue processing without auth token validation.
Changes
Asset ID entropy (
src/background/service-worker.ts)Math.random().toString(36).slice(2, 11)withcrypto.randomUUID().slice(0, 8)in both capture paths (selection + full-page)GPS PII in console (
src/background/service-worker.ts)gpsLocation.latitude/gpsLocation.longitudefrom bothconsole.logcalls; logs now confirm capture without exposing coordinatesPassword policy (
src/services/AuthService.ts,src/popup/AuthForm.tsx)AuthService.signup()now callsvalidatePasswordStrength()before the API call — enforces min 8 chars, upper, lower, digit, special character; throws a user-facing error on failureAuthFormadds a password strength bar + label (signup mode only), a requirements hint, and progressive login rate limiting: 0 → 5 → 10 → 30 → 60s delays on consecutive failures with submit button disabled during cooldownUpload queue auth validation (
src/services/UploadService.ts)processQueue()now checksapiClient.getAuthToken()before dequeuing; if absent, pauses the queue and broadcastsAUTH_STATUS_CHANGED { authenticated: false, reason: 'no_token' }handleUploadError()detectsstatusCode === 401, pauses the queue, broadcastsAUTH_STATUS_CHANGED { reason: 'token_expired' }, and tags the asset witherrorType: 'auth_expired'Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.