Skip to content

fix(security): harden session and resource boundaries - #175

Merged
bifrost0x merged 1 commit into
mainfrom
dev/security-medium-hardening
Aug 31, 2026
Merged

fix(security): harden session and resource boundaries#175
bifrost0x merged 1 commit into
mainfrom
dev/security-medium-hardening

Conversation

@bifrost0x

Copy link
Copy Markdown
Owner

Summary

  • invalidate browser authentication state when passwords change, accounts are locked, or a preliminary account-deletion lock survives a failed delete
  • sanitize replayable authentication, OAuth/step-up, Socket.IO, and SSH state after web, CLI, rollback, and interrupted restores
  • classify every non-global address as internal while keeping Tailscale SSH available only through an exact attempt-scoped authorization
  • bound SSH input envelopes and throughput, add structured backpressure, and preserve ordered UTF-8-safe large pastes with a per-session FIFO
  • enforce field, record, per-store, aggregate-byte, and mutation-rate limits for commands and command sets

Compatibility

  • the password-changing browser receives one replacement authentication session while all older sessions are invalidated
  • durable users, provider identities, passkeys, active TOTP authenticators, and recovery codes survive restore sanitization
  • authorized Tailscale SSH remains available for the exact WebSSH user, canonical target, and remote username
  • existing oversized legacy command stores remain readable and can shrink or be deleted, but cannot grow further
  • normal typing keeps its immediate path while backpressured pastes remain ordered

Validation

  • Python: 2302 passed, 29 skipped
  • JavaScript: 35 test files passed
  • focused authentication, restore, network policy, SSH input, and command-storage regression tests
  • git diff --check

Scan coverage

This addresses all five validated Medium findings from the Codex Security repository scan: browser-session revocation, restore-session resurrection, CGNAT/internal-target bypass, oversized SSH input resource exhaustion, and persistent command-store exhaustion.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T12:02:14.740765Z 032803d PR opened
ℹ️ 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.

@bifrost0x
bifrost0x merged commit 2665dee into main Aug 31, 2026
20 of 21 checks passed
@bifrost0x
bifrost0x deleted the dev/security-medium-hardening branch August 31, 2026 12:01
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WebSSH Roadmap Aug 31, 2026

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

Copy link
Copy Markdown

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: 032803d3a1

ℹ️ 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 static/js/ssh-input.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant