CI: Pulse's own semgrep rules, with tests
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 26s
CI / Security (npm audit) (push) Successful in 18s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m13s
CI / Integration (api) (push) Successful in 2m24s
CI / Lint (eslint) (pull_request) Successful in 42s
CI / Test (jest) (pull_request) Successful in 23s
CI / Security (npm audit) (pull_request) Successful in 8s
CI / UI (playwright) (push) Successful in 2m30s
CI / Integration (api) (pull_request) Successful in 1m54s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m37s
CI / UI screenshots (before/after) (pull_request) Successful in 6s
CI / Lint (eslint) (push) Successful in 18s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 1m59s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 26s
CI / Security (npm audit) (push) Successful in 18s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m13s
CI / Integration (api) (push) Successful in 2m24s
CI / Lint (eslint) (pull_request) Successful in 42s
CI / Test (jest) (pull_request) Successful in 23s
CI / Security (npm audit) (pull_request) Successful in 8s
CI / UI (playwright) (push) Successful in 2m30s
CI / Integration (api) (pull_request) Successful in 1m54s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m37s
CI / UI screenshots (before/after) (pull_request) Successful in 6s
CI / Lint (eslint) (push) Successful in 18s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 1m59s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
.semgrep/pulse.yml, run in the Scan job next to the registry packs:
- pulse-no-vm: no require('vm'), eval or new Function outside tests (the
workflow-condition bug from #62 can't come back).
- pulse-no-shell-in-server: server.js and lib/ may not use exec/execSync
or spawn with a shell; running commands is the worker's job.
- pulse-innerhtml-unescaped: member values (w.name, r.host) inserted into
innerHTML in public/assets must go through esc()/Pulse.esc(); method
names, comparisons, Set.has() and the fmt formatters are not values.
The rules' test cases (.semgrep/pulse.js) run first with semgrep --test,
so a rule that stops matching fails CI. Pulse has no findings today.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0746c9cf73
commit
bf7e91cc57
4 files changed
+104
-2
No files matched your search
@@ -589,7 +589,7 @@ Everything runs from `.gitea/workflows/ci.yml`:
|
||||
| `Lint (eslint)` | `npm run lint` (errors on bugs-in-waiting such as `==`, shadowed or unused variables and `eval`; no warnings allowed), plus a check that fails on em or en dashes anywhere in the repo, including the vendored design system | Every push and PR |
|
||||
| `Test (jest)` | `npm test`: unit tests for `lib/` and the worker, and the deploy-script sandbox tests. Fails if coverage drops below the floors in `package.json` (`lib/` 90% lines, `worker/` 40%) | Every push and PR |
|
||||
| `Security (npm audit)` | `npm audit --audit-level=high`, plus a CycloneDX SBOM of production dependencies (kept 90 days as the `sbom-cyclonedx` artifact of each `main` build) | Every push and PR, and weekly (Monday 06:00) |
|
||||
| `Scan (secrets, workflows, shell)` | gitleaks over the whole git history, actionlint on the workflow files (with shellcheck on their scripts), shellcheck on every `*.sh`, a check that `public/web_template` is byte-identical to upstream at the commit in its `VERSION`, and semgrep (JavaScript, Node.js, Express, secrets and security-audit rule packs). Suppress a reviewed false positive on its line with `nosemgrep: <rule id>` and a comment saying why | Every push and PR |
|
||||
| `Scan (secrets, workflows, shell)` | gitleaks over the whole git history, actionlint on the workflow files (with shellcheck on their scripts), shellcheck on every `*.sh`, a check that `public/web_template` is byte-identical to upstream at the commit in its `VERSION`, and semgrep (JavaScript, Node.js, Express, secrets and security-audit rule packs, plus Pulse's own rules in `.semgrep/pulse.yml`: no `vm`/`eval`, no shell commands in the server, no unescaped values in `innerHTML`; their test cases in `.semgrep/pulse.js` run first). Suppress a reviewed false positive on its line with `nosemgrep: <rule id>` and a comment saying why | Every push and PR |
|
||||
| `Integration (api)` | Starts the real server and three workers on Node 20 against MariaDB, then runs `tests/integration/` over HTTP and WebSocket: the Gandalf API contract, HTTP and WebSocket auth, and execution reliability (worker crash, capacity, abort) | Every push and PR |
|
||||
| `UI (playwright)` | Starts the real server and three workers against a MariaDB service container, then runs the Playwright tests in `tests/ui/` (desktop and phone) | Every push and PR |
|
||||
| `UI screenshots (before/after)` | On PRs that touch `public/`, `views/` or the render/nav code: runs the base branch and the PR side by side with the same seeded data and uploads a `ui-screenshots` artifact with one before/after image per page (desktop and phone). Pages that came out identical are listed in `unchanged.txt`. Not a required check; attach the relevant images to the PR for review | Pull requests |
|
||||
|
||||
Reference in new issue
Block a user