Skip to content

Security: close the audit findings (4 commits) - #4

Open
Avithegod2010 wants to merge 4 commits into
mainfrom
security/audit-2026-11
Open

Avithegod2010 wants to merge 4 commits into
mainfrom
security/audit-2026-11

Conversation

@Avithegod2010

Copy link
Copy Markdown
Owner

Closes the findings from the full-history security audit of 2026-11-21.

Commits:

  • 45650f9 fix(locker): count failed guesses made through the decoy, hidden and collection locks (M2)
  • e46b444 ci(security): scan full history for secrets and audit dependencies
  • 1155f44 chore(security): add dependabot.yml
  • 9be166b fix(duress): compare password verifiers in constant time

Per-finding detail lives in the local audit workspace (E:/Dev/repo-audit/reports/locker.md). Every fix is its own commit, so any one of them can be reverted on its own.

Both verifier paths used ByteArray.contentEquals, which short-circuits on the first
differing byte. MessageDigest.isEqual removes that leak. This does NOT replace the
fast SHA-256 verifier with Argon2id — that needs a KDF-version migration for existing
vaults and is still open.
Dependency updates were entirely manual, so patched releases sat unadopted (e.g. Next 16.1.3, vite 7.3.2). Groups minor/patch into one weekly PR.
Nothing stopped a committed key or a known-vulnerable pin from coming back. This runs
gitleaks 8.30.1 over every commit (pinned by release URL, not a movable action tag) on every push and PR.
…collection locks (M2)

The decoy and hidden lock screens probed the real vault with tryUnlockQuiet(), and the per-collection gate used verifyPasswordQuiet(). Both were written to leave the failed-attempt counter alone, so once an attacker knew the duress password the decoy screen was an unlimited, unpaced oracle against the real password: no counter, no backoff, no erase-after-N-attempts. The coercer scenario the counter exists for was the one path that bypassed it.

Every password path now moves the committed counter through one bumpAttempt() (guarded by a mutex so two concurrent guesses cannot lose an increment) and shares applyFailurePolicy(), which calls onWipeRequired() at the threshold and keeps the progressive backoff. On the decoy/hidden screens the guess is offered to the active space first and charged to the real vault only when every space refused it, so normal use of the decoy never burns real-vault attempts; a correct password clears the counter it just proved.

The wipe threshold default is still 0 (off): making erasure the default destroys user data and needs a product decision.
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