Skip to content

Harden browser vault custody surface#27

Merged
sidhujag merged 5 commits intomasterfrom
hardening/browser-custody
Apr 25, 2026
Merged

Harden browser vault custody surface#27
sidhujag merged 5 commits intomasterfrom
hardening/browser-custody

Conversation

@sidhujag
Copy link
Copy Markdown
Member

Summary

  • Add CSP and related security headers to the static frontend server.
  • Remove Google Fonts loading and switch to system font stacks.
  • Auto-lock unlocked vaults on idle/background and best-effort zeroize data-key bytes.

Test plan

  • CI=true npm test -- --watch=false --runInBand src/context/VaultContext.test.js src/lib/apiClient.test.js
  • node --check server.js
  • rg "googleapis|gstatic|fonts.googleapis|@import url" .

Note: npm run build still fails locally with the pre-existing Unexpected end of JSON input CRA environment issue.

Made with Cursor

Add static security headers, remove third-party font loading, auto-lock unlocked vaults on idle/background, and zeroize data-key bytes before dropping refs.

Made-with: Cursor
@sidhujag
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74054566b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server.js
Comment thread server.js Outdated
Comment thread server.js Outdated
Disable CRA inline runtime and permit the known API and exchange-image origins without weakening the custody CSP broadly.

Made-with: Cursor
@sidhujag sidhujag changed the base branch from hardening/same-origin-auth to master April 25, 2026 04:37
@sidhujag
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52d0eb7739

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server.js Outdated
Use an HTTPS connect-src source so build-time API overrides are not blocked by the runtime static server CSP.

Made-with: Cursor
@sidhujag
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cb4a9b2d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/context/VaultContext.js
Encrypt saves with a local data-key copy so lock/reset zeroization cannot mutate the bytes used by an in-flight envelope write.

Made-with: Cursor
@sidhujag
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afaa09ad51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/context/VaultContext.js
When an unlock completes in an already-hidden tab, lock the vault as soon as the idle/background effect starts instead of waiting for the idle timer.

Made-with: Cursor
@sidhujag
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidhujag sidhujag merged commit 55e8015 into master Apr 25, 2026
4 checks passed
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