Skip to content

Fix repository security scan findings - #202

Merged
bifrost0x merged 10 commits into
mainfrom
dev/security-scan-remediation-20260906
Sep 7, 2026
Merged

Fix repository security scan findings#202
bifrost0x merged 10 commits into
mainfrom
dev/security-scan-remediation-20260906

Conversation

@bifrost0x

@bifrost0x bifrost0x commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Remediates all ten validated findings from the repository-wide Codex Security scan of origin/main, plus every issue found during repeated exact-head security and compatibility review of the remediation branch.

The final integration pass additionally:

  • coalesces concurrent LDAP session revalidation into one identity-bound lookup without weakening the durable fail-closed revocation fence
  • returns a retryable 503 to ordinary followers while rejecting Engine.IO followers before they retain transport or socket capacity
  • pins every non-root SMB prefix used by the list-denied known-child compatibility path against rename, delete, attribute, and reparse ABA races
  • preserves known-child access on list-denied Samba shares and keeps exact FileID, type, reparse, share-binding, and second-pass verification

The broader remediation also hardens MFA bootstrap, OAuth/account step-up, Tailscale SSH target and interface authority, backup/restore durability, Socket.IO and terminal bounds, SFTP parsing and pagination, SMB transport and namespace integrity, transfer ownership/cancellation, saved-connection storage and recovery, audit redaction, session aliases, and deployment defaults.

Compatibility guardrails

  • the supported single-worker Gunicorn runtime is retained and explicitly tested
  • existing oversized connection stores remain recoverable through bounded offline inspection, deletion, and shrink operations
  • the default Compose deployment now provides a private durable recovery volume; custom deployments must explicitly provide and acknowledge durable recovery storage for online restore
  • Tailscale SSH remains opt-in and now requires exact host/port targets plus the configured Tailscale interface
  • SMB known-child reads continue to work when directory listing is denied, as verified against a real Samba service
  • no public API or browser wire change is accepted silently: the explicit Socket.IO wire revision forces stale clients to reload

Test-suite consolidation

The final commit removes 14 redundant test cases and 160 net test lines without changing production code or removing a security boundary from coverage.

  • Python 3.14 remains the authoritative complete non-integration suite
  • Python 3.11 compiles all application and test modules, then runs a representative compatibility set across startup, authentication, migrations, network policy, SFTP, SMB, SSH, file services, and threaded runtime admission
  • duplicate Flask CLI subprocess variants are replaced by one real safe-factory invocation plus exhaustive direct command/entrypoint detection
  • duplicate Playwright runner subprocess checks are removed because the two-shard browser workflow and the JavaScript network guard already exercise configured-port behavior
  • browser E2E, real SSH, real SMB, Redis, dependency locks, CodeQL, container smoke, and both image-security jobs remain unchanged

Exact-head validation

Validated commit: d2636c37b50258acf92c29a52f64542d359d9fe8
Base: 7e6cc818ddc6e1e4086cd59c7d717e056b992000
Frozen patch SHA-256: 06925088a403cf09705d2d43d7e6a1ddbfb4777ac4c83e99225bd0c5be84167f

  • 2760 passed, 2 skipped in the complete non-integration Python suite
  • 538 passed in the reduced minimum-version compatibility selection on Python 3.11 CI (31.23s test execution)
  • 223 passed across the SMB ownership modules before the test-only consolidation
  • all direct LDAP/SMB finding regressions passed after consolidation
  • 108 passed in the complete Chromium Playwright suite before the test-only consolidation; the two-shard browser jobs remain unchanged
  • all 40 JavaScript test groups passed after consolidation
  • 27 passed against real OpenSSH/Paramiko/Socket.IO integration services before the test-only consolidation; that job remains unchanged
  • the real Samba integration suite passed before the test-only consolidation, including list-denied known-child access; that job remains unchanged
  • the Python 3.14 production-like non-root container smoke passed before the test-only consolidation; that job remains unchanged
  • ESLint, authentication-i18n generation, vendored-asset integrity, compileall, and git diff --check passed after consolidation

The sealed full-PR Codex Security diff scan (7adaca24-2bc7-43e5-98b8-ebcac96159c8) reviewed all 66 authoritative changed-source items on the preceding application-code head and completed with full coverage, zero reportable findings, and zero deferred findings. The final test-only follow-up received its own completed Codex Security diff scan (7dbd9246-bf5f-434f-8d7a-40aa235ce3bb): all three changed coverage surfaces were reviewed with zero findings and no production-source change.

Review posture and remaining target-specific checks

The immutable patch-risk assessment recommends merge after human review; automatic merge is intentionally not recommended because this is a broad, security-critical change touching authentication, remote-file mutation, persistent-state migration, deployment behavior, and public browser/runtime contracts.

Local evidence does not replace environment-specific canaries for the deployment's real LDAP provider, an end-to-end Tailscale peer, a concurrent two-principal live SMB race/Windows SMB server, Firefox/Safari, or an operational schema-v3-to-previous-version rollback rehearsal. These are recorded rollout checks, not unresolved code findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 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-09-07T10:25:48.098874Z d2636c3 Manual request
ℹ️ 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.

@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: 9ac97cfce7

ℹ️ 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 app/sftp_handler.py Outdated
Comment thread app/jump_host_manager.py Outdated
@bifrost0x

Copy link
Copy Markdown
Owner Author

@codex review

@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: c302ec03f2

ℹ️ 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/sftp-file-manager.js Outdated
@bifrost0x

Copy link
Copy Markdown
Owner Author

@codex review

@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: ba51b0ed8c

ℹ️ 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 app/command_set_manager.py Outdated
@bifrost0x bifrost0x self-assigned this Sep 7, 2026
@bifrost0x bifrost0x added security bug Something isn't working enhancement New feature or request labels Sep 7, 2026
@bifrost0x

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 290581a4f9

ℹ️ 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".

@bifrost0x

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: d2636c37b5

ℹ️ 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".

@bifrost0x
bifrost0x merged commit e779737 into main Sep 7, 2026
20 of 21 checks passed
@bifrost0x
bifrost0x deleted the dev/security-scan-remediation-20260906 branch September 7, 2026 10:40
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WebSSH Roadmap Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request security

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant