Skip to content

fix: harden model provider endpoints - #14

Merged
fly1d merged 1 commit into
mainfrom
codex/harden-provider-endpoints
Aug 11, 2026
Merged

fix: harden model provider endpoints#14
fly1d merged 1 commit into
mainfrom
codex/harden-provider-endpoints

Conversation

@fly1d

@fly1d fly1d commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace regex/string URL assembly with structured URL parsing in the Web API and macOS provider
  • restrict Web model requests to server-configured endpoints and expose the policy to the UI
  • remove permissive CORS because Web development and production use same-origin requests
  • fix the desktop OpenAI hostname boundary check
  • add Web/API and Rust regression tests and execute Rust tests in the desktop gate
  • disable unsupported CodeQL database uploads while retaining local SARIF enforcement

Verification

  • npm run check (10 tests passed)
  • npm run test:smoke (5 passed, 1 intentional desktop skip)
  • npm run desktop:check (2 Rust tests passed)
  • npm audit (0 vulnerabilities)
  • workflow YAML and diff checks

Security impact

Fixes js/request-forgery and js/polynomial-redos found by the full main-branch CodeQL scan. Web custom endpoints must now be supplied via OLLAMA_BASE_URL or OPENAI_BASE_URL; the macOS app remains locally configurable.

@fly1d fly1d left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Security-aware code review completed. No blocking findings.

Reviewed the trusted endpoint boundary, structured URL assembly, same-origin Web policy, desktop hostname handling, CodeQL upload settings, dependency removal, UI policy propagation, and regression coverage. All PR checks are green, including CodeQL, browser smoke, 10 Web/API tests, and 2 Rust tests.

@fly1d
fly1d merged commit e18aca6 into main Aug 11, 2026
4 checks passed
@fly1d
fly1d deleted the codex/harden-provider-endpoints branch August 11, 2026 10:12
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