Skip to content

🔒 Fix Insufficient Data Masking (Data Exposure) in helpers.ts - #453

Merged
zknpr merged 2 commits into
mainfrom
fix-pii-masking-10008601063142684167
Jun 8, 2026
Merged

🔒 Fix Insufficient Data Masking (Data Exposure) in helpers.ts#453
zknpr merged 2 commits into
mainfrom
fix-pii-masking-10008601063142684167

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

🎯 What: Improved the regular expressions used in src/helpers.ts (CC_REGEX and SSN_REGEX) for masking sensitive data.
⚠️ Risk: The previous regexes were too strict (e.g., CCs required exactly 16 digits split by dashes/spaces in groups of four). This could lead to data exposure where unbroken strings of digits or cards with different lengths (like 15-digit Amex) were not redacted when logged or displayed.
🛡️ Solution: Updated CC_REGEX to /\b(?:\d[ -]*?){13,16}\b/g and SSN_REGEX to /\b\d{3}[-\s]?\d{2}[-\s]?\d{4}\b/g to catch various formats of credit card numbers and SSNs safely, without excessive backtracking. Reordered regex execution in maskSensitiveData to match Credit Cards before Phone numbers, preventing partial matches from exposing remaining digits. Added unit tests to verify behavior and prevent regressions.


PR created automatically by Jules for task 10008601063142684167 started by @zknpr

@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
sq-lite-explorer Ready Ready Preview, Comment Jun 8, 2026 4:37pm

@zknpr
zknpr merged commit ba09036 into main Jun 8, 2026
6 checks passed
zknpr added a commit that referenced this pull request Jun 14, 2026
The first draft only listed this session's PRs (#457+). main had ~20 more
unreleased PRs merged after the v1.5.2 tag (#428#456) that were never
changelogged — fixes (#456 rowid validation, #453 data masking), a security
fix (#449 crypto savepoint names), perf (#443, #439, #440), refactors, tests,
and dep bumps. Entry now reflects the full v1.5.2..HEAD range.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zknpr added a commit that referenced this pull request Jun 14, 2026
* chore: release 1.5.3

Maintenance release covering everything merged since 1.5.2: internal
code-health, expanded unit-test coverage, and dev-dependency bumps. No
user-facing behavior change; error logging now routes to the SQLite
Explorer output channel.

package.json version + CHANGELOG only — package-lock.json left at 1.5.2
per the project's lockfile-drift convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(changelog): expand 1.5.3 to cover all PRs since v1.5.2

The first draft only listed this session's PRs (#457+). main had ~20 more
unreleased PRs merged after the v1.5.2 tag (#428#456) that were never
changelogged — fixes (#456 rowid validation, #453 data masking), a security
fix (#449 crypto savepoint names), perf (#443, #439, #440), refactors, tests,
and dep bumps. Entry now reflects the full v1.5.2..HEAD range.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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