feat(security): harden Command Center RBAC, auth, webhooks, and CI#3
Draft
mdtazizulislam wants to merge 1 commit into
Draft
feat(security): harden Command Center RBAC, auth, webhooks, and CI#3mdtazizulislam wants to merge 1 commit into
mdtazizulislam wants to merge 1 commit into
Conversation
…peline - Add strict RBAC on every Command Center API endpoint with founder-only restrictions on tasks, agent actions, logs, and commands - Hash tokens with scrypt, support expiry/rotation, and audit failed logins - Redact sensitive data in logs and audit output - Apply tiered rate limits for auth verify and mutation endpoints - Add security headers middleware (CSP, HSTS, X-Frame-Options, etc.) - Gate agent/script/task execution behind founder approval workflow - Add Meta WhatsApp Cloud API webhook signature verification - Add GitHub Actions security pipeline and production hardening docs - Add comprehensive security unit tests Co-authored-by: MD TAZIZUL ISLAM <vitorgarh@gmail.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive security hardening for the OpenClaw platform, focused on the Command Center API and control-layer webhooks. All changes are additive — existing features and endpoints remain available.
Command Center API
/api/*route viarequireApiPermission()middlewareGET/POST /api/tasksPOST /api/agents/:id/actionGET /api/logsGET /api/commands:exp:), rotation grace viaOPENCLAW_COMMAND_CENTER_TOKEN_PREVIOUSlogs/auth-audit.jsonlX-Frame-Options,HSTS(production),Cache-Controlon API routes202withapprovalId; founder approves viaPOST /api/executions/:id/approveControl Layer
/webhooks/whatsapp/metawithX-Hub-Signature-256verification (additive to Twilio)CI & Documentation
SECURITY.md, root.env.example,docs/PRODUCTION-HARDENING.mdTests
command-center: auth, RBAC, tokens, redaction, rate limits, API security, task permissions (29 tests)control: Meta webhook validation, WhatsApp channel integration (42 tests)Configuration
OPENCLAW_COMMAND_CENTER_TOKEN_PREVIOUSOPENCLAW_REQUIRE_EXECUTION_APPROVALfalseto disable approval gate (not recommended in prod)WHATSAPP_META_APP_SECRETWHATSAPP_META_VERIFY_TOKENBreaking behavior notes
approvalIdfounder:scrypt:...)