Repository navigation
Description
Automated weekly security sweep for fellwork/kindly-note (default branch main, public bun/TS monorepo — a typed ESM-only fork of highlight.js). GitHub access limited to mcp__github__* tools (no gh CLI, no raw REST) — see "Not checked" below.
CRITICAL
None requiring immediate escalation. 4 critical-severity dependency advisories were found (see §2) but all trace to dev/test tooling (vitest, happy-dom, tinypool), never shipped in the published @kindly-note/* npm packages — not an active production exposure, but flagged because they are RCE/prototype-pollution-class and local dev machines + CI runners are a real target.
1. Alerts & settings — KNOWN GAP (informational)
Dependabot alerts, code-scanning alerts, secret-scanning alerts, security_and_analysis, branch-protection/ruleset detail, and Actions permissions settings were not checked this run — no available mcp__github__* tool covers these REST endpoints, and raw gh/curl was out of scope. Recommend a human spot-check the Security tab.
2. Dependency audit — bun audit
27 advisories (4 critical, 14 high, 9 moderate) — up from last week's 23 (2/13/8). New/notable:
| Package | Severity | Issue | Path |
|---|---|---|---|
tinypool <2.1.2 |
Critical ×2 | Prototype-pollution gadget in worker options → RCE | @kindly-note/*-every-package > vitest > tinypool |
happy-dom <20.0.0 |
Critical | VM Context Escape → RCE | @kindly-note/browser, @kindly-note/auto-detect > vitest |
vitest <3.2.6 |
Critical | Vitest UI server: arbitrary file read and execute | direct devDependency, nearly every workspace package |
happy-dom |
High | fetch-credentials cross-origin cookie leak; unsanitized export names interpolated as executable code | same as above |
js-yaml <3.15.x/<4.3.2 |
High ×4 | quadratic-CPU DoS via merge-key chains / !!omap resolution (incl. CVE-2026-59870 backport gap) |
@changesets/cli > @manypkg/get-packages > read-yaml-file > js-yaml |
braces <=3.0.3 |
High | stack-exhaustion DoS on deeply nested patterns | lint-staged, @changesets/cli chains |
nanoid <3.3.18 |
High | custom/non-secure generators loop indefinitely (DoS) | vitest > vite-node > vite > postcss > nanoid |
postcss/source-map-js/vite |
High | path traversal / arbitrary .map disclosure |
same vitest chain |
@vitest/mocker |
Moderate | path traversal / arbitrary file read via mock redirect | vitest |
esbuild |
Moderate | dev server accepts any-origin requests | vitest chain |
sprintf-js |
Moderate | unbounded-precision DoS | @changesets/cli chain |
All 27 advisories trace through vitest/happy-dom/tinypool/@changesets/cli/lint-staged — confirmed devDependencies in root package.json — never shipped in the published packages. Not fixed (report-only, no version-bump PRs). No Cargo.lock in this repo — Rust audit N/A.
3. Workflows
ci.yml: missing a top-levelpermissions:block. Triggers onpull_request;actions/checkout@v4defaults topersist-credentials: true, not overridden — public repo, no secrets used in this workflow, low practical impact but a real hardening gap. Actions pinned by tag, not SHA (actions/checkout@v4,oven-sh/setup-bun@v2).release.yml: triggers onpushtomainonly — neverpull_request/pull_request_target, so no untrusted-PR-input exposure for theNPM_TOKEN-using step. Already declares its ownpermissions:block (contents: write,pull-requests: write,id-token: write) required bychangesets/action@v1— correctly scoped for its job; left untouched (release/publish logic explicitly out of scope).NPM_TOKENis written to~/.npmrcvia the standard npm-auth pattern (Actions auto-masks secret values in logs) — not a bug, but per the workflow's own comment it's an "Automation"-type token that bypasses 2FA; worth periodic human rotation awareness.changesets/action@v1is the highest supply-chain exposure surface in this repo's workflows: a third-party action pinned by tag (not SHA) running withcontents: write+pull-requests: writeandNPM_TOKENin its environment. A compromised/retaggedv1could exfiltrate the publish token or push arbitrary commits. Reported only — SHA-pinning it would touch the release workflow, out of scope per the "never touch publishing/release-workflow logic" rule even for a pin.- No
pull_request_targetanywhere. No${{ github.event.* }}interpolated into anyrun:step.
4. Repo settings
- No
SECURITY.mdat root or.github/. Fix already proposed, unmerged, in PR chore(security): add permissions block to ci.yml + SECURITY.md #4/Security sweep 2026-W40: harden CI permissions + add SECURITY.md #5. - No
.github/dependabot.yml. - Branch protection/rulesets/Actions permissions: not checkable this run (see §1).
5. Code grep
- No hardcoded secrets, no
eval(/new Function(, nochild_process/Bun.spawncalls (none found anywhere underpackages/), no tracked.env*, nowrangler.toml/fly.toml(not applicable to this repo), no hardcoded non-orgfetch()URLs in build/tooling scripts, no SQL/RLS patterns (pure npm workspace, no database), no real-looking third-party mail/PII in fixtures or test data. innerHTML =sink, re-confirmed:packages/browser/src/highlight-element.ts:254(setMarkup()). Code comments document the assigned value as pre-escaped by@kindly-note/emitters-html("Engine-emitted markup is HTML-escaped... writing it through the DOM is the do-not-break contract from upstream Scout §11"). Confirmed the escape module exists and is imported by the emitter package; did not independently trace every emitter code path for 100% coverage this run. — Low: a single, well-commented, intentional sink; a future escaping regression inemitters-htmlwould turn this into a stored-XSS-class sink with no second gate downstream. Recommend a regression test asserting no raw<script>/event-handler markup ever reaches this call.- New this run — design-level note, not a confirmed in-repo vulnerability:
packages/loader-dynamic-import/src/index.ts(createDynamicImportLoader) resolves a caller-supplied language identifier to a dynamicimport()specifier.defaultResolveSpecifier()passes the identifier verbatim as the specifier whenever it starts with@or contains/, otherwise prefixes it to@kindly-note/lang-${identifier}. No call site within this repo feeds untrusted input to it (only test stubs and the package's own default). But it is a public, documented API (resolveSpecifier/importeroptions) intended for host applications to wire up — if any downstream consumer feeds an untrusted/user-authored value (e.g., a note's code-fence language tag) directly intoloader.load()without an allowlist, it becomes a dynamic-module-load injection surface (importing an arbitrary installed package, or in some bundlers/runtimes an arbitrary path). Medium/informational — worth a one-line callout in this package's README/docs warning integrators to only pass allowlisted language identifiers, never raw user content.
6. Severity ranking
- Critical (dev/test-tooling scope only, not shipped):
tinypoolprototype-pollution RCE ×2,happy-domVM-escape RCE,vitestUI arbitrary file read+execute. - High:
happy-domcookie-confusion + code-injection,js-yaml×4 CPU-DoS,bracesstack-exhaustion DoS,nanoidDoS,postcss/vitepath traversal — all dev-tooling scope. - Medium:
@vitest/mocker/esbuildmoderates; missingpermissions:block inci.yml(fix proposed, unmerged, PR chore(security): add permissions block to ci.yml + SECURITY.md #4/Security sweep 2026-W40: harden CI permissions + add SECURITY.md #5);persist-credentialsdefault-true onci.yml'spull_requestjob;changesets/action@v1tag-pinned withcontents:write+NPM_TOKENaccess (release-path supply-chain exposure, reported only); dynamic-import loader design note (integrator responsibility, not an in-repo bug). - Low: missing
SECURITY.md(fix proposed, unmerged, PR chore(security): add permissions block to ci.yml + SECURITY.md #4/Security sweep 2026-W40: harden CI permissions + add SECURITY.md #5); nodependabot.yml; tag-pinned (not SHA) actions; documented-but-not-fully-tracedinnerHTMLsink in the highlighter;NPM_TOKEN2FA-bypass note (by design, rotation-awareness only). - Informational: KNOWN GAP — alert dashboards/repo security settings not checkable via available tools.
Mechanical PR
No new PR opened this run. PRs #4 (claude/kindly-note-security-2026-W38) and #5 (claude/kindly-note-security-2026-W40) already add the exact needed fixes (top-level permissions: {contents: read} for ci.yml + a root SECURITY.md), and both remain open/unmerged — opening a third would be redundant. Recommend merging #5 (supersedes #4) and closing #4. SHA-pinning changesets/action@v1 remains out of scope for this run (touches the release workflow).
Activity
srmcguirt commentedon Oct 16, 2026
Marked needs-spec: this is a report bundling several independent follow-ups (merge PR #5 and close #4, SHA-pin
changesets/action@v1, add a regression test for theinnerHTMLsink) rather than one scoped, actionable fix.Generated by Claude Code