Skip to content

🛡️ Sentinel: [CRITICAL fix] Prevent Silent Disabling of Global Security Preferences#88

Open
manupawickramasinghe wants to merge 3 commits into
mainfrom
fix-biometrics-security-bypass-15046785161170487561
Open

🛡️ Sentinel: [CRITICAL fix] Prevent Silent Disabling of Global Security Preferences#88
manupawickramasinghe wants to merge 3 commits into
mainfrom
fix-biometrics-security-bypass-15046785161170487561

Conversation

@manupawickramasinghe
Copy link
Copy Markdown
Member

🛡️ Sentinel: [CRITICAL fix] Prevent Silent Disabling of Global Security Preferences

🎯 Focus: Security Patch
💡 Context: Discovered a critical issue via app growth context on Web. When a user accesses the app via web where biometrics might automatically fail or be bypassed, the resulting error popup would implicitly call updateSettings("requireAuth", false). This inadvertently disabled global security settings across all user devices.
🔧 Fix/Addition: Removed the updateSettings call from the onSubmit handlers in _biometricErrorPopup (inside initializeBiometrics.dart) and the corresponding dialog in settingsPage.dart. The UI now correctly handles the failure session-locally by closing the dialog or un-toggling the switch without persisting the security downgrade to the database.
📈 gemini.md Status: Updated the "Critical Security Learnings" section to reflect this pattern of preventing session-specific errors from overriding global security preferences.
Verification: Verified via flutter analyze and running the test suite (flutter test test/) to ensure the application still complies with structural health and logic tests.


PR created automatically by Jules for task 15046785161170487561 started by @manupawickramasinghe

…ccess

When a biometric error occurred (which can happen automatically on the Web platform due to lack of support in some contexts), `_biometricErrorPopup` and the `settingsPage` silently overwrote the global `requireAuth` preference to `false`. This effectively defeated user intent across all devices.

The error callbacks now only modify local UI state (`isLocked = false`) and leave the persistent database `requireAuth` flag intact.

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

👋 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.

Copilot AI review requested due to automatic review settings May 28, 2026 09:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes two updateSettings("requireAuth", false, ...) calls from biometric error popup submit handlers so transient/web biometric failures no longer persistently disable the global requireAuth security setting (which would otherwise propagate to other devices via settings backup/sync). UI state is still handled locally (popup dismissed, toggle reverted to unlocked).

Changes:

  • Remove persistent requireAuth=false write from _biometricErrorPopup submit handler in initializeBiometrics.dart.
  • Remove persistent requireAuth=false write from the biometric error popup in BiometricsSettingToggle (settingsPage.dart); local isLocked state is still cleared.
  • Document the fix in gemini.md under "Critical Security Learnings".

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
budget/lib/struct/initializeBiometrics.dart Drops persistent requireAuth downgrade in biometric error popup submit.
budget/lib/pages/settingsPage.dart Drops persistent requireAuth downgrade in settings biometric error popup submit; keeps local isLocked reset.
gemini.md Adds 2026-05-28 entry documenting the fix and prevention guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

google-labs-jules Bot and others added 2 commits May 28, 2026 10:27
…ccess

When a biometric error occurred (which can happen automatically on the Web platform due to lack of support in some contexts), `_biometricErrorPopup` and the `settingsPage` silently overwrote the global `requireAuth` preference to `false`. This effectively defeated user intent across all devices.

The error callbacks now only modify local UI state (`isLocked = false`) and leave the persistent database `requireAuth` flag intact.

Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
…ccess

When a biometric error occurred (which can happen automatically on the Web platform due to lack of support in some contexts), `_biometricErrorPopup` and the `settingsPage` silently overwrote the global `requireAuth` preference to `false`. This effectively defeated user intent across all devices.

The error callbacks now only modify local UI state (`isLocked = false`) and leave the persistent database `requireAuth` flag intact.

Fix CI errors:
- Update `compileSdk` to 37 in `android/app/build.gradle` and `settings.gradle`.
- Upgrade Android Gradle Plugin to 9.1.0 in `android/settings.gradle`.
- Upgrade Kotlin version to 2.2.20 in `android/settings.gradle`.
- Upgrade `material_symbols_icons` to 4.2928.1.

Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.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.

2 participants