Skip to content

fix(security): harden Token Vault and add credential dashboard - #22

Merged
zskbot merged 10 commits into
mainfrom
fix/token-vault-security-and-dashboard
Nov 7, 2026
Merged

zskbot merged 10 commits into
mainfrom
fix/token-vault-security-and-dashboard

Conversation

@zskbot

@zskbot zskbot commented Nov 7, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up hardening for the already-merged Token Vault scaffold.

Changes

  • Require an exact same-origin Origin header and reject cross-site Fetch Metadata for state-changing browser requests.
  • Verify session signatures with Web Crypto HMAC verification; use the current identity role from D1 on every request.
  • Shorten session lifetime to four hours and validate signing/encryption key configuration.
  • Add IP-based D1 throttles for login and reveal; clear failed-login counters after successful login.
  • Add no-store and browser security headers.
  • Serve the password-only login and protected credential inventory UI from the Worker, including create, reveal, delete, and sign-out actions.
  • Fix the hidden-input password utility (the previous Enter-key handling compared escaped text instead of control characters) and require a 16-character bootstrap password.
  • Add source-level security/syntax validation and a GitHub Actions workflow.

Important limitations

  • This does not configure or deploy a Cloudflare Worker, D1 database, secrets, or Access policy.
  • The only provisioned identity remains the bootstrap TOKEN owner. Staff identity provisioning and project-scoped AI-agent capabilities are not implemented; AI agents must not receive the bootstrap password or administrator role.
  • The UI/API changes are source code only until Cloudflare resources and secrets are configured through an authorized secret-management path.

No production deployment or secret operation is included. Please keep this PR unmerged until CI and a security review pass.

@zskbot
zskbot marked this pull request as ready for review November 7, 2026 17:57
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T17:57:34.741383Z
We couldn’t complete this review. Comment @codex review to try again.
4b01542 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zskbot
zskbot merged commit a30aa07 into main Nov 7, 2026
2 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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