Skip to content

Security: FirstIntegral/actdebug

Security

docs/SECURITY.md

Security audit — ActDebug v0.4.0

Date: 2026-06-21 (initial) · Updated: 2026-06-21 (full remediation)
Scope: HTTP API, engines, UI, extension, scripts


Executive summary

SeverityFoundFixed / mitigated
Critical22
High44
Medium66
Low55
Informational44 (accepted product behavior, documented)

Total findings: 21 — all addressed.

ActDebug remains intentional code execution for CI debugging. Hardening ensures that capability stays on loopback, behind optional auth, with supply-chain and DoS guardrails.


Critical (fixed)

IDIssueFix
C1Non-loopback bind → unauthenticated RCEassertLoopbackHost(); ACTDEBUG_INSECURE_BIND=1 requires ACTDEBUG_TOKEN
C2Localhost CSRFBlock non-loopback Origin/Referer + per-boot X-ActDebug-CSRF token on mutating requests

High (fixed)

IDIssueFix
H1Full process.env leaked to actlib/host-env.js allowlist
H2Symlink sandbox escaperealpathSync + re-check
H3DOM XSS in data-step-idescapeHtml() on attributes
H4Weak session IDscrypto.randomBytes

Medium (fixed)

IDIssueFix
M1YAML bombJSON_SCHEMA + size cap + depth/anchor limits
M2Matrix DoSMAX_MATRIX_LEGS (256)
M3Step/job DoSMAX_WORKFLOW_STEPS (500), MAX_WORKFLOW_JOBS (50)
M4ACTDEBUG_ALLOWED_ROOTSRequires ACTDEBUG_TRUST_EXTRA_ROOTS=1; extra roots must stay under $HOME unless ACTDEBUG_ALLOW_ANY_ROOT=1; max 8
M5uses: supply chainlib/action-trust.js — block third-party actions unless ACTDEBUG_TRUST_REMOTE_ACTIONS=1 or trustRemoteActions: true
M6Docker socket privilegeStartup warning; operators must trust workflows

Low (fixed)

IDIssueFix
L1Health info disclosureMinimal /api/health by default; full details only with valid token
L2Path leakage in errorssanitizeErrorMessage() on all API errors
L3Weak rate limitsGlobal + expensive-op limiter (lib/rate-limit.js)
L4Sentinel control dir racesPer-session in-container mount path containerControlMount(sessionId)
L5Extension server URLLocalhost-only + http(s) only + actdebug.apiToken

Informational (accepted, documented)

IDItemStance
I1Arbitrary workflow executionCore feature — user chooses YAML to run
I2Shell mode on hostFallback — prefer act+Docker; warning when shell engine active
I3No TLS on localhostNormal for local dev; use token if tunneling
I4In-memory sessionsBy design — no persistence

Authentication

Optional but recommended for tunnels or insecure bind:

export ACTDEBUG_TOKEN="$(openssl rand -hex 24)"
npm start

Clients send header: X-ActDebug-Token: <token>

  • Web UI prompts once and stores in sessionStorage
  • VS Code: actdebug.apiToken setting

When ACTDEBUG_INSECURE_BIND=1, token is mandatory.


Operator checklist

  • Keep bind on 127.0.0.1
  • Set ACTDEBUG_TOKEN if exposing port via tunnel
  • Use Docker/act engine for untrusted workflows
  • Only enable ACTDEBUG_TRUST_REMOTE_ACTIONS=1 when needed
  • Only enable ACTDEBUG_TRUST_EXTRA_ROOTS=1 with care

Tests

npm test# includes test/security-audit.js (12 checks)
npm audit # 0 dependency vulnerabilities

Key security files

FileRole
lib/security.jsSandbox, limits, host bind, errors
lib/auth.jsToken auth
lib/action-trust.jsuses: allowlist
lib/host-env.jsChild process env
lib/rate-limit.jsDoS limits
test/security-audit.jsRegression tests

There aren't any published security advisories