Summary
Following the CLAWDINATOR guidance to open an issue first before submitting security-related PRs. This proposal bundles 4 complementary security hardening improvements that reduce supply-chain and runtime risks.
Motivation
OpenClaw has 500k+ lines of code across multiple platforms with browser automation, command execution, and WebSocket control plane. While the project already has excellent security foundations (detect-secrets, openclaw security audit, loopback-by-default), there are baseline gaps that could be closed with minimal risk:
- Remote asset dependency (Control UI loads SVG from external CDN)
- Missing HTTP security headers (no baseline CSP/XFO/nosniff on gateway responses)
- Unused security tooling configs (actionlint + zizmor configs exist but aren't enforced in CI)
- No dependency vulnerability scanning (no CodeQL or dependency-review in CI)
Proposed Changes
Phase 1: Supply Chain Hardening (docs + CI)
1. Localize Control UI logo asset (addresses #5170)
- Replace hardcoded
mintcdn.com SVG URL with bundled local asset
- PR reference: #6166 (closed), #6161 (alternative implementation)
- Risk reduced: Removes external CDN dependency that could be compromised
2. Wire up existing CI security configs
- Add
.github/workflows/actionlint.yml (uses existing .github/actionlint.yaml)
- Add
.github/workflows/zizmor.yml (uses existing zizmor.yml)
- PR reference: #6194 (closed, CI was fixed)
- Risk reduced: Catches workflow security footguns and misconfigurations
Phase 2: Runtime + Dependency Hardening
3. Add baseline HTTP security headers
- Add conservative headers to gateway HTTP responses:
X-Content-Type-Options: nosniff, Referrer-Policy, X-Frame-Options: SAMEORIGIN, Permissions-Policy
- Intentionally scoped to be safe for both Control UI and API routes
- PR reference: #6171 (closed, had review feedback incorporated)
- Risk reduced: Reduces clickjacking, content-sniffing, and feature abuse surface
4. Add dependency scanning
- Add
.github/workflows/dependency-review.yml (GitHub official action)
- Add
.github/workflows/codeql.yml (JavaScript/TypeScript analysis)
- PR reference: #6195 (closed, CI was green)
- Risk reduced: Catches vulnerable dependencies and common insecure code patterns
Implementation Notes
- All changes are additive - no breaking changes to existing functionality
- Minimal permissions - CI workflows use
contents: read only (CodeQL needs security-events: write)
- Follows existing patterns - Uses same action versions and config styles as current CI
- Tested - All PRs were validated with
pnpm build, pnpm lint, and targeted tests
Request for Maintainers
@steipete (or active maintainers) - would you be open to these 4 hardening PRs? If yes, I can:
- Re-open each PR individually with reference to this issue
- Or combine into a single "security hardening bundle" PR if preferred
- Or adjust scope based on your feedback
The goal is to reduce "death by a thousand cuts" security risks while keeping the PRs small and reviewable.
References
Summary
Following the CLAWDINATOR guidance to open an issue first before submitting security-related PRs. This proposal bundles 4 complementary security hardening improvements that reduce supply-chain and runtime risks.
Motivation
OpenClaw has 500k+ lines of code across multiple platforms with browser automation, command execution, and WebSocket control plane. While the project already has excellent security foundations (
detect-secrets,openclaw security audit, loopback-by-default), there are baseline gaps that could be closed with minimal risk:Proposed Changes
Phase 1: Supply Chain Hardening (docs + CI)
1. Localize Control UI logo asset (addresses #5170)
mintcdn.comSVG URL with bundled local asset2. Wire up existing CI security configs
.github/workflows/actionlint.yml(uses existing.github/actionlint.yaml).github/workflows/zizmor.yml(uses existingzizmor.yml)Phase 2: Runtime + Dependency Hardening
3. Add baseline HTTP security headers
X-Content-Type-Options: nosniff,Referrer-Policy,X-Frame-Options: SAMEORIGIN,Permissions-Policy4. Add dependency scanning
.github/workflows/dependency-review.yml(GitHub official action).github/workflows/codeql.yml(JavaScript/TypeScript analysis)Implementation Notes
contents: readonly (CodeQL needssecurity-events: write)pnpm build,pnpm lint, and targeted testsRequest for Maintainers
@steipete (or active maintainers) - would you be open to these 4 hardening PRs? If yes, I can:
The goal is to reduce "death by a thousand cuts" security risks while keeping the PRs small and reviewable.
References