deploy-2026.11.22-158
18
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d96b2ad4cf |
CI: semgrep in the scan job
CI / Lint (eslint) (push) Successful in 17s
CI / Test (jest) (push) Successful in 17s
CI / Security (npm audit) (push) Successful in 9s
CI / Integration (api) (push) Successful in 2m49s
CI / Lint (eslint) (pull_request) Successful in 16s
CI / Test (jest) (pull_request) Successful in 15s
CI / UI (playwright) (push) Successful in 3m4s
CI / Security (npm audit) (pull_request) Successful in 9s
CI / Integration (api) (pull_request) Successful in 1m59s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m27s
CI / UI (playwright) (pull_request) Successful in 1m54s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / Scan (secrets, workflows, shell) (push) Successful in 1m28s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
JavaScript, Node.js, Express, secrets and security-audit rule packs, with --error so findings fail the check. Dry run on main: no findings from the first four packs; security-audit flagged one false positive (the demo seed script's urlopen of a fixed loopback URL), suppressed on that line with the reason. Part of #45 phase 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
38a6d1158d |
Worker unit tests, coverage floors, and an SBOM per main build
CI / Lint (eslint) (push) Successful in 17s
CI / Test (jest) (push) Successful in 18s
CI / Security (npm audit) (push) Failing after 12s
CI / Scan (secrets, workflows, shell) (push) Successful in 18s
CI / Integration (api) (push) Successful in 2m58s
CI / Lint (eslint) (pull_request) Successful in 24s
CI / Test (jest) (pull_request) Successful in 15s
CI / UI (playwright) (push) Successful in 3m11s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / Security (npm audit) (pull_request) Failing after 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 15s
CI / Integration (api) (pull_request) Successful in 1m18s
CI / UI (playwright) (pull_request) Successful in 1m31s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
- worker/worker.js exports PulseWorker and starts only when run directly (no behaviour change for the service; CT 153 needs no redeploy). - tests/worker.test.js: success, exit code and stderr, timeout kill, capacity rejection, slot release after failure, ping/pong, no sends while disconnected. - jest coverage floors (ratchet at today's levels): lib/ 90% lines and statements, 80% branches and functions; worker/ 40%. - The audit job writes a CycloneDX SBOM of production dependencies and keeps it 90 days for each main build. Part of #45 phases 3 and 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1f75a4a63a |
CI: scan job for secrets (gitleaks), workflows (actionlint) and shell (shellcheck)
CI / Test (jest) (push) Successful in 16s
CI / Lint (eslint) (push) Successful in 17s
CI / Security (npm audit) (push) Successful in 10s
CI / Scan (secrets, workflows, shell) (push) Successful in 13s
CI / Integration (api) (push) Successful in 1m28s
CI / Lint (eslint) (pull_request) Successful in 13s
CI / Test (jest) (pull_request) Successful in 19s
CI / UI (playwright) (push) Successful in 1m43s
CI / Deploy (push) Skipped
CI / Security (npm audit) (pull_request) Successful in 8s
CI / Notify (push) Skipped
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 18s
CI / Integration (api) (pull_request) Successful in 1m30s
CI / UI (playwright) (pull_request) Successful in 1m48s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
All three pass on main today: gitleaks found no leaks in 88 commits, and actionlint's one warning (an unused loop variable in the deploy health check) is fixed here. Tool downloads are pinned to a version and verified by SHA-256. Deploy now also waits for the scan. Part of #45 phase 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
def926d41e |
Integration tests for the Gandalf contract, auth and reliability; fix worker offline status
CI / Lint (eslint) (push) Successful in 46s
CI / Security (npm audit) (push) Successful in 26s
CI / Integration (api) (push) Successful in 1m31s
CI / Test (jest) (pull_request) Successful in 50s
CI / UI (playwright) (push) Successful in 2m31s
CI / Integration (api) (pull_request) Successful in 1m58s
CI / Test (jest) (push) Successful in 13s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 2m16s
CI / Lint (eslint) (pull_request) Successful in 15s
CI / Security (npm audit) (pull_request) Successful in 15s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
New CI job `Integration (api)` (#45 phase 3) runs the real server and three workers on Node 20 against MariaDB and tests them as a black box over HTTP and WebSocket (20 tests, about 12 s): - Gandalf contract: submit and poll, stdout from command_result, failures with exit code and stderr, 401 for wrong or missing key, 400 for missing fields or an unknown worker, 404 for an unknown execution - Auth: SSO identity, 401/403, heartbeat key, /healthz exposes only status; WebSocket upgrade refused without credentials, with a wrong key or a wrong group; live events reach a signed-in browser; a browser socket cannot forge a command result - Reliability: a worker killed mid-command fails the execution at once; a worker at capacity answers with a failure; an aborted execution stays failed when the late result arrives; a disconnected worker shows offline The last test found a bug from #42: the close handler deleted the worker's runtime-id entry before checking whether the socket was still live under its database id, and the two ids are normally the same key. So a disconnected worker was never marked offline and showed 'online' until the stale heartbeat sweep. Gandalf was unaffected (it checks live sockets). MariaDB setup for CI moves to scripts/ci/mariadb.sh, shared by both jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5bca0cd87b |
CI: Playwright UI tests against a real server, workers and MariaDB
CI / Test (jest) (push) Failing after 57s
CI / Lint (eslint) (push) Successful in 59s
CI / Security (npm audit) (push) Successful in 10s
CI / Lint (eslint) (pull_request) Successful in 28s
CI / Test (jest) (pull_request) Successful in 17s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / UI (playwright) (push) Failing after 2m25s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Failing after 1m21s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
New required-to-be job `UI (playwright)` (#45 phase 5): the official Playwright image with a MariaDB service container. scripts/ci/ui-stack.sh starts the real server and three workers (WORKER_AUTH_ENFORCE=1), then tests/ui/ runs 30 tests on desktop and a phone viewport: - every page loads with no page errors, console errors or failed requests (enforced by a shared fixture for every test) - quick commands run on a worker and their output and status show in Executions; multi-worker mode; failing commands show as failed - workflows are created and run from the UI and complete on all workers - Executions updates live over the authenticated browser WebSocket - no SSO identity: 401 page and API; wrong group: 403 - every page fits a phone screen External requests are blocked in tests so SSO headers never leave the machine. Deploy now also waits for the UI job. The API and execution rate limits can be raised with PULSE_API_RATE_MAX / PULSE_EXEC_RATE_MAX for test stacks; production defaults are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cb12fec28c |
Deploys: exact sha, replay protection, health check and automatic rollback
CI / Test (jest) (push) Successful in 47s
CI / Lint (eslint) (push) Successful in 52s
CI / Security (npm audit) (push) Successful in 17s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / Test (jest) (pull_request) Failing after 12s
CI / Lint (eslint) (pull_request) Successful in 14s
CI / Security (npm audit) (pull_request) Successful in 11s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
#45 phase 2. - GET /healthz (unauthenticated): running git sha, version, database reachability, connected workers, uptime. 503 when the database is down. - deploy/pulse_deploy.sh, versioned for the first time (it only existed as a hand-edited file on CT 122). It takes <sha> <ts> from the signed webhook payload and: - refuses requests older than 5 minutes, or not newer than the last accepted one (replays); - refuses commits that aren't on main; - checks out exactly that sha (before, it deployed whatever main was); - runs npm ci --omit=dev (before, npm install --production) and restarts; - waits for /healthz to report the sha with a working database, and otherwise rolls back to the previous commit. - tests/deploy-script.test.js runs the script in a sandbox (temporary git origin, fake systemctl/npm/curl): exact-sha deploy with .env kept, replay, stale request, off-main commit, malformed input, and rollback of an unhealthy build. - CI's deploy job now succeeds only once production reports the tested sha as healthy, before tagging. Before, it only checked that the server answered. - README: CI/CD and deploy documentation, including installing the script and the hooks.json arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
fde2c49eca |
CI: one pipeline, deploy gated on lint, test and audit
The deploy job lived in lint.yml and needed only eslint, while jest and npm audit ran in separate workflows. A merge that failed its tests still deployed to production. (#45 phase 1) - Combine everything into .gitea/workflows/ci.yml with jobs lint, test, audit, deploy and notify. Deploy needs all three checks and runs only on push to main. - Builds are reproducible: npm ci everywhere, eslint from the lockfile (new `npm run lint`), and setup-node pinned to Node 20 (production). - Actions are pinned to full commit SHAs, with the version in a comment, following tinker_tickets. - Workflow permissions default to contents: read; only deploy can write (for its tag). A deploy-production concurrency group queues deploys instead of running two at once. Superseded branch runs are cancelled. - The deploy payload now carries the sha and a timestamp, so signatures differ per deploy (the server verifies them in phase 2). After the webhook, CI waits until Pulse is serving again before tagging. - The Matrix alert now fires for any failed job on main, for the weekly audit, and for every successful deploy. - New lint step: fail on em or en dashes in Pulse-owned files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
66d5240be0 |
Remove em and en dashes from comments, logs, docs and CI
Security / JS Security (npm audit) (push) Failing after 15s
Lint / JS (eslint) (push) Successful in 16s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 13s
Lint / Notify on failure (pull_request) Skipped
Test / JS Tests (jest) (push) Successful in 15s
Lint / Deploy (pull_request) Skipped
Test / JS Tests (jest) (pull_request) Successful in 17s
Security / JS Security (npm audit) (pull_request) Failing after 20s
Replace every em dash and en dash outside user-visible UI text with a colon, comma, hyphen or "to". The UI strings and the vendored web_template are handled separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ac6c6c72c5 |
Authenticate WebSocket connections and bind command results to their worker
Security / JS Security (npm audit) (push) Failing after 16s
Lint / JS (eslint) (push) Successful in 18s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Test / JS Tests (jest) (push) Successful in 15s
Lint / JS (eslint) (pull_request) Successful in 13s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / JS Security (npm audit) (pull_request) Failing after 17s
Test / JS Tests (jest) (pull_request) Successful in 15s
Any client that could reach :8080 got a WebSocket connection. Every connection started as a browser client and received every broadcast. worker_connect accepted a missing api_key, so anyone could register under an existing worker's name and receive its commands. command_result was accepted from any connection, so execution logs could be forged. - Classify each upgrade in verifyClient (lib/wsauth.js). A request is: - browser: a trusted-proxy Authelia identity in an allowed group; - worker: Authorization: Bearer <WORKER_API_KEY>; - pending: neither, allowed only while WORKER_AUTH_ENFORCE is off; - rejected (401): everything else, and always for a wrong key. - Only browser connections receive broadcasts. A pending connection may send only worker_connect and is closed after 30 s if it doesn't identify. - worker_connect requires the key. A keyless worker is allowed with a warning until WORKER_AUTH_ENFORCE=1, so existing workers keep working until they are updated. - Record which worker each command was sent to. command_result is accepted only from that worker (matched by DB id, so a reconnect mid-command still works) and only once. pong no longer trusts a client-supplied id. - Worker, heartbeat and Gandalf keys use a constant-time compare. Log an error at startup if WORKER_API_KEY is unset. - The worker sends its key at the handshake and in worker_connect. Closes #38 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e302234187 |
Only trust Authelia identity headers from TRUSTED_PROXIES
Security / JS Security (npm audit) (push) Failing after 17s
Lint / JS (eslint) (push) Successful in 18s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 18s
Test / JS Tests (jest) (push) Successful in 20s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / JS Security (npm audit) (pull_request) Failing after 17s
Test / JS Tests (jest) (pull_request) Successful in 17s
authenticateSSO and authenticatePage took the user and groups straight from the Remote-* headers, and the server listens on every interface, so any LAN host could connect directly, claim any user and group, and run commands on the workers. It could also write whatever it claimed into the users table. Add TRUSTED_PROXIES (addresses or CIDR ranges) and ignore the identity headers unless the TCP peer is on the list. The peer address is used rather than a forwarding header, which a client could forge. It fails closed: unset means no SSO login succeeds, with a startup warning. Rejected attempts are logged with their source. Worker and Gandalf API-key routes are unchanged. Closes #37 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3572d5ba35 | README: add walkthrough GIF, architecture diagram and gallery; add demo seed and capture scripts | ||
|
|
eca5cb45b1 |
feat(ui): TDS migration stage 3 — integration fixes, legacy removal, docs
Lint / JS (eslint) (pull_request) Successful in 10s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / JS Security (npm audit) (pull_request) Failing after 10s
Test / JS Tests (jest) (pull_request) Successful in 14s
Lint / JS (eslint) (push) Successful in 11s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Security / JS Security (npm audit) (push) Failing after 11s
Test / JS Tests (jest) (push) Successful in 10s
- Fix design-system class names that do not exist in base.css (.lt-alert--error, .lt-form-hint); add shared .lt-modal-lg, .lt-field-error and .is-invalid rules - Remove public/index.html and the public/base.js symlink - package.json: start script, correct main - README: vendored design system, Web UI section, new env vars, read-only dev mode Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HamVMDrA8RqhyxmUHgiqRp |
||
|
|
162ca5f7a7 |
Add CI badges and CI/CD section to README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
3f6e04d1ab |
Apply LotusGuild design system convergence (aesthetic_diff.md)
- §5: Section headers now ╠═══ TITLE ═══╣ (was ═══ TITLE ═══) - §8+§18: Replace inline-style showTerminalNotification() with lt.toast.* delegate wrapper; load base.js from /base.js - §12: Fix --text-muted #008822→#00bb33 (WCAG AA contrast) base.js symlinked from web_template into public/ so lt.* is available. showTerminalNotification() is kept as a thin wrapper so all existing call sites continue to work unchanged. README: Remove completed pending items (toast, text-muted, position) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
58c172e131 |
Security hardening, bug fixes, and performance improvements
Security fixes: - Replace new Function() condition eval with vm.runInNewContext() (RCE fix) - Add admin checks to DELETE executions, all scheduled-commands endpoints - Remove api_key from GET /api/workers response (was exposed to all employees) - Separate browserClients/workerClients sets; broadcast() now sends to browsers only - Add worker WebSocket auth: reject if api_key provided but invalid - Fix XSS: escapeHtml() on step_name, duration, worker_id, user info, execution_id Bug fixes: - Replace DB-polling waitForCommandResult with event-driven _commandResolvers Map - Replace non-atomic addExecutionLog with JSON_ARRAY_APPEND (fixes concurrent write race) - Add stale execution recovery on startup: running→failed with log entry - Fix calculateNextRun returning null for unknown types (now throws) - Fix scheduler overlap: skip if previous execution still running - Fix JSON double-parse on worker_ids column - Fix switchTab() bare event.target reference - Fix selectedExecutions Array→Set (O(1) lookups, fixes performance regression) - Fix param modal event listener leak (delegated handler, removes before re-adding) - Add ws.onerror handler (was silently swallowing WebSocket errors) - Move misplaced routes to before server.listen() Performance/cleanup: - DB connection pool 10→50 - EXECUTION_RETENTION_DAYS default 1→30 (matches docs) - Remove unused packages: bcryptjs, body-parser, cors, js-yaml, jsonwebtoken - Remove generateUUID() wrapper, use crypto.randomUUID() directly - Remove dead example workflow constants - Add ESC key handler to close modals - Fix clearCompletedExecutions limit 1000→9999 - Add security notice to README.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
4baecc54d3 |
Phase 7: Multi-Worker Command Execution
Added ability to execute commands on multiple workers simultaneously: - Added execution mode selector (Single/Multiple Workers) - Multi-worker mode with checkbox list for worker selection - Helper buttons: Select All, Online Only, Clear All - Sequential execution across selected workers - Results summary showing success/fail count per worker - Updated command history to track multi-worker executions - Terminal beep feedback based on overall success/failure - Maintained backward compatibility with single worker mode Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|
|
753a906f25 | README created for wanted tasks | ||
|
|
447d7537ec | first commit |