molecule-core/workspace-server
Molecule AI Core-BE 66e00cb3b7
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
audit-force-merge / audit (pull_request) Has been skipped
fix(security): add SSRF guard on external workspace URL creation (core#212)
Add validateAgentURL guard before any DB transaction in POST /workspaces
so that SSRF targets (cloud metadata, RFC-1918, loopback) are rejected
with 400 before the workspace row is written. The guard is placed
before BeginTx so rejection never touches the DB.

Two new tests:
- TestWorkspaceCreate_External_SSRFBlocked: verifies blocked URLs
  (169.254.x.x, RFC-1918, loopback, wrong scheme) return 400.
- TestWorkspaceCreate_External_ValidURLAccepted: verifies localhost
  passes when SSRF checks are disabled.

Additionally fixes:
- drift_sweeper.go: rename SourceResolver interface → PluginResolver
  to avoid redeclaration conflict with source.go's type.
- restart_signals.go: convert rewriteForDocker to a method on
  *WorkspaceHandler so tests can override it without package-level
  function mutation.
- org_external.go: fix spurious append() call in clone args.
- delegation_test.go: remove pre-existing duplicate closing brace.
- admin_plugin_drift.go: remove unused "context" import.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 03:57:17 +00:00
..
cmd feat(plugins): plugin drift detector + queue + admin apply endpoint (#123) 2026-05-10 00:39:50 +00:00
internal fix(security): add SSRF guard on external workspace URL creation (core#212) 2026-05-10 03:57:17 +00:00
migrations feat(plugins): plugin drift detector + queue + admin apply endpoint (#123) 2026-05-10 00:39:50 +00:00
pkg/provisionhook
.air.toml
.ci-force
.gitignore feat(local-dev): containerize platform + canvas stack via docker-compose (closes #126) 2026-05-08 10:53:39 -07:00
.golangci.yaml
Dockerfile ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
Dockerfile.dev ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
Dockerfile.tenant ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
entrypoint-tenant.sh
go.mod fix(deps): migrate gh-identity from GitHub to Gitea module path 2026-05-09 22:50:45 +00:00
go.sum