fix(workspace): block Hermes custom provider bypass #1863

Merged
hongming merged 1 commits from fix/hermes-platform-proxy-guard into main 2026-05-26 04:13:01 +00:00
Owner

Summary

  • reject HERMES_CUSTOM_API_KEY and HERMES_CUSTOM_BASE_URL writes for platform-managed LLM workspaces
  • apply the guard to workspace create payload secrets, workspace secret writes, and global secret writes
  • add regression coverage for platform-managed secret rejection

Tests

  • cd workspace-server && go test ./internal/handlers -run 'TestExtended_SecretsSet|TestExtended_SecretsSetRejectsHermesCustomProviderInPlatformManagedMode' -count=1

Security context

This makes the control plane enforce the platform proxy boundary instead of relying on template/runtime discipline alone.

## Summary - reject HERMES_CUSTOM_API_KEY and HERMES_CUSTOM_BASE_URL writes for platform-managed LLM workspaces - apply the guard to workspace create payload secrets, workspace secret writes, and global secret writes - add regression coverage for platform-managed secret rejection ## Tests - cd workspace-server && go test ./internal/handlers -run 'TestExtended_SecretsSet|TestExtended_SecretsSetRejectsHermesCustomProviderInPlatformManagedMode' -count=1 ## Security context This makes the control plane enforce the platform proxy boundary instead of relying on template/runtime discipline alone.
hongming added 1 commit 2026-05-26 03:56:28 +00:00
fix(workspace): block Hermes custom provider bypass
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 8s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 12s
CI / Detect changes (pull_request) Successful in 17s
CI / Python Lint & Test (pull_request) Successful in 12s
E2E API Smoke Test / detect-changes (pull_request) Successful in 22s
E2E Chat / detect-changes (pull_request) Successful in 22s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 27s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 1m19s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
Harness Replays / detect-changes (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
gate-check-v3 / gate-check (pull_request) Successful in 10s
qa-review / approved (pull_request) Successful in 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
sop-checklist / review-refire (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 6s
sop-tier-check / tier-check (pull_request) Successful in 7s
CI / Canvas (Next.js) (pull_request) Successful in 13s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
E2E Chat / E2E Chat (pull_request) Successful in 5s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m20s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m21s
Harness Replays / Harness Replays (pull_request) Successful in 5s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
security-review / approved (pull_request) Refired via /security-recheck by unknown
CI / Platform (Go) (pull_request) Successful in 5m20s
CI / all-required (pull_request) Successful in 11m23s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1m40s
audit-force-merge / audit (pull_request) Successful in 7s
3682465525
agent-reviewer approved these changes 2026-05-26 03:57:40 +00:00
agent-reviewer left a comment
Member

Approved — blocks Hermes direct-provider bypass secrets in platform-managed mode across secret writes and workspace creation; targeted regression coverage included.

Approved — blocks Hermes direct-provider bypass secrets in platform-managed mode across secret writes and workspace creation; targeted regression coverage included.
core-security approved these changes 2026-05-26 04:03:43 +00:00
core-security left a comment
Member

Security review passed. Scope is limited to blocking Hermes custom-provider escape-hatch keys in platform-managed mode across create, workspace secret set, and global secret set. No new endpoints, dependencies, raw SQL interpolation, or secret material introduced. Regression test covers the rejected workspace secret path; existing provisioning tests cover the platform-managed env mode boundary.

Security review passed. Scope is limited to blocking Hermes custom-provider escape-hatch keys in platform-managed mode across create, workspace secret set, and global secret set. No new endpoints, dependencies, raw SQL interpolation, or secret material introduced. Regression test covers the rejected workspace secret path; existing provisioning tests cover the platform-managed env mode boundary.
core-security approved these changes 2026-05-26 04:03:55 +00:00
core-security left a comment
Member

Security review passed.

Security review passed.
Author
Owner

/security-recheck

/security-recheck
hongming merged commit 0129548657 into main 2026-05-26 04:13:01 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1863