Skip to content

RichardHam-co-uk/SecureClaw

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18,203 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ SecureClaw β€” Hardened AI Assistant Gateway

OpenClaw, security-hardened with HashiCorp Vault, secret-zero elimination, and production-grade secret management.

CI status GitHub release MIT License

SecureClaw is a security-hardened fork of OpenClaw β€” a personal AI assistant gateway you run on your own infrastructure.
This fork extends the upstream project with enterprise-grade secret management, Vault integration, and a hardened deployment architecture designed for security-conscious operators.


What SecureClaw Adds

The upstream OpenClaw project is excellent. SecureClaw layers the following on top:

πŸ” HashiCorp Vault Integration

  • KV v2 secrets backend for all application secrets
  • Transit secrets engine for encryption-as-a-service and auto-unseal
  • VaultClient with auto token renewal, retry backoff, and graceful degradation
  • Vault agent sidecar pattern for secret injection

🚫 Secret-Zero Elimination

  • SecretRef URI pattern: vault://path/to/secret#field and env://VAR_NAME
  • No secrets ever written to disk, environment files, or container logs
  • All secret resolution happens at runtime via the SecretRef resolver

🐳 Hardened Docker Compose

  • Dedicated vault-transit service with Transit auto-unseal wired up
  • qdrant vector store service for semantic memory
  • Immutable container filesystem where possible
  • Non-root service execution throughout

πŸ› οΈ Operator-Grade First-Run Script

  • first-run.sh β€” idempotent 15-step initialisation script
  • Colour output, --rotate-tokens flag
  • Never prints secrets to stdout
  • Full Vault initialisation, unsealing, policy and AppRole setup

Repository Structure

openclaw/               ← Upstream OpenClaw source (synced from openclaw/openclaw)
secureclaw/             ← SecureClaw hardening layer
  β”œβ”€β”€ docker/           ← Hardened compose + Vault config
  β”œβ”€β”€ src/              ← VaultClient, SecretRef resolver, extensions
  β”œβ”€β”€ scripts/          ← first-run.sh and operator tooling
  └── docs/
      β”œβ”€β”€ architecture/ ← System design and ADRs
      β”œβ”€β”€ development/  ← Claude Code prompts and dev guides
      β”œβ”€β”€ runbooks/     ← Operational runbooks
      └── security/     ← Threat model, security controls

Branch Strategy

Branch Purpose
main Fork baseline; periodically synced from upstream
secureclaw Active SecureClaw development β€” all hardening work lives here
release/v* Tagged stable SecureClaw releases

See FORK_NOTES.md for upstream sync guidance.


Getting Started

SecureClaw is under active development. The hardening layer is being built in stages:

  • Stage 1 (In Progress): Vault integration, SecretRef pattern, hardened compose, first-run script
  • Stage 2 (Planned): Prompt injection hardening, agent sandboxing, audit logging
  • Stage 3 (Planned): mTLS between services, secrets rotation automation, compliance controls

For the underlying OpenClaw functionality (channels, agents, voice, canvas), refer to the upstream documentation.

Prerequisites

  • Docker + Docker Compose v2
  • HashiCorp Vault (provided via compose or external)
  • Node β‰₯ 22 (for upstream OpenClaw runtime)

Quick Start (once Stage 1 is complete)

git clone https://github.com/RichardHam-Co-Uk/secureclaw.git
cd secureclaw
git checkout secureclaw

# Initialise Vault and all services
bash secureclaw/scripts/first-run.sh

# Start the hardened stack
docker compose -f secureclaw/docker/docker-compose.yml up -d

Security Model

SecureClaw is built on a defence-in-depth model:

  • All secrets resolved at runtime via SecretRef β€” no plaintext secrets in config files or environment
  • Vault Transit provides encryption-as-a-service; the application never holds raw encryption keys
  • Container images run non-root; filesystems are immutable where the runtime permits
  • Prompt injection risk mitigated via agent sandboxing (Stage 2)
  • Full audit trail via Vault audit log + structured application logging

Development

Active development uses Claude Code with structured prompts. See:


Attribution

SecureClaw is a fork of OpenClaw by Peter Steinberger and the OpenClaw community, licensed under the MIT License.

All upstream functionality and intellectual property remains the work of the OpenClaw contributors. This fork adds security hardening on top of that foundation.


Contributing

This is currently a personal/private hardening project. Contributions welcome once the architecture stabilises post-Stage 1.

About

Your own personal AI assistant. Any OS. Any Platform. The SECURE way. πŸ”’

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 87.2%
  • Swift 8.4%
  • Kotlin 1.9%
  • Shell 1.0%
  • JavaScript 0.6%
  • CSS 0.5%
  • Other 0.4%