forked from molecule-ai/molecule-core
F1085 (CWE-78): deleteViaEphemeral changed from 2-arg rm form rm -rf /configs filePath → rm -rf /configs/ + filePath The 2-arg form gives rm two directory arguments; rm processes ".." literally in filePath, enabling volume escape: rm -rf /configs foo/../bar deletes BOTH /configs AND bar (host path). The concat form gives rm ONE path: /configs/foo/../bar resolves to /configs/bar inside the volume — rm never operates outside /configs. GH#756/#1609: terminal.go now uses ValidateToken(ctx, db.DB, callerID, tok) instead of ValidateAnyToken. ValidateAnyToken accepted ANY valid org token, allowing Workspace A to forge X-Workspace-ID: B and access B's terminal. ValidateToken binds the bearer token to the claimed X-Workspace-ID. KI-005: adds CanCommunicate(callerID, workspaceID) hierarchy check to terminal WebSocket upgrade. Shell access requires workspace authorization, not just a valid token. Co-Authored-By: Molecule AI CP-QA <cp-qa@agents.moleculesai.app> |
||
|---|---|---|
| .. | ||
| cmd/server | ||
| internal | ||
| migrations | ||
| pkg/provisionhook | ||
| .ci-force | ||
| .gitignore | ||
| Dockerfile | ||
| Dockerfile.tenant | ||
| entrypoint-tenant.sh | ||
| go.mod | ||
| go.sum | ||