Skip to content

Security sweep — 2026-W39 #3

Closed as duplicate
Closed as duplicate

Description

@srmcguirt

Automated weekly security sweep for fellwork/kindly-note. GitHub access limited to mcp__github__* tools (no gh CLI, no raw REST) — see "Not checked" below. Local checkout could not be git fetch/reset this run (sandbox restriction on this agent's git access to sibling checkouts); findings below were cross-verified against the live default branch (main @ d61b743) via the GitHub API, not the possibly-stale local copy.

CRITICAL (dev/test-tooling only, not shipped)

  • bun audit: happy-dom (<20.0.0) — VM Context Escape → Remote Code Execution, via @kindly-note/browser › happy-dom and @kindly-note/auto-detect › vitest.
  • bun audit: vitest (<3.2.6) — when the Vitest UI server is listening, arbitrary file can be read and executed. Direct dependency, pulled into nearly every workspace package's devDependencies.

Both are dev/CI-time-only exposure (not present in the published npm packages), but both are RCE/arbitrary-file-execution class, so calling them out even though they don't meet the bar of a production-facing critical. No fix applied (would be a version bump, out of scope for this sweep's mechanical-PR allowlist).

High

  • happy-dom: fetch-credentials cookie confusion (page-origin vs target-origin cookies sent), and unsanitized export names interpolated as executable code in ECMAScriptModuleCompiler.
  • nanoid (infinite loop DoS), vite/postcss (path traversal / arbitrary .map disclosure), js-yaml (quadratic-complexity DoS via merge-key chains, multiple CVEs — via @changesets/cli › @manypkg/get-packages › read-yaml-file › js-yaml).
  • Total unchanged from last week: 22 vulnerabilities (2 critical, 12 high, 8 moderate). No Cargo.lock in this repo — Rust audit N/A.

Medium

  • @vitest/mocker/vitest path traversal, esbuild dev-server request forgery.
  • Workflows: ci.yml still lacks a top-level permissions: block. Fix already proposed, unmerged, in PR chore(security): add permissions block to ci.yml + SECURITY.md #4 (open since last week).
  • Repo settings: no SECURITY.md at root/.github//docs/. Fix already proposed, unmerged, in PR chore(security): add permissions block to ci.yml + SECURITY.md #4.
  • Workflows, corrected finding: actions/checkout@v4 defaults to persist-credentials: true, and ci.yml's test job triggers on pull_request. Per the sweep's explicit rule this should be flagged (last week's report said "no explicit persist-credentials: true" but missed that the default counts too). Public repo, no secrets used in ci.yml, so practical impact is low, but it's a real hardening gap. Not one of the three allowed mechanical-PR fix types, so reported only.

Low

  • packages/browser/src/highlight-element.ts:254 — target.innerHTML = html with non-literal html. Code comments document this as intentional: the value is 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"). Flagged per the sweep's literal grep pattern; recommend one human confirmation that the escaping contract holds end-to-end (e.g., a regression test asserting no raw <script>/event-handler markup ever reaches this sink), but not treated as an active vulnerability given the documented invariant.
  • Actions by tag, not a pinned 40-char SHA: actions/checkout@v4, oven-sh/setup-bun@v2, changesets/action@v1. Finding only; no verified upstream SHA resolved this run.
  • release.yml already declares explicit permissions: (contents: write, pull-requests: write, id-token: write) — broader than most CI jobs need, but it's a release/publish workflow using NPM_TOKEN, out of scope per the "never touch publishing/release logic" constraint. Flagged for awareness only.
  • No pull_request_target, no ${{ github.event.* }} interpolation in any run: step.

Code grep — no findings

No hardcoded secrets, no eval(/new Function(, no tracked .env*, no dangerouslySetInnerHTML, no suspicious child_process/Bun.spawn string-concat, no hardcoded non-org fetch( URLs in build/tooling scripts, no wrangler.toml/fly.toml (none in this repo), no SECURITY DEFINER/RLS patterns (no SQL migrations in this repo), no real-looking emails in fixture/seed/test-data paths.

Not checked this run

  • Dependabot alerts, code-scanning alerts, secret-scanning alerts, security_and_analysis field — no API access available.
  • Branch protection / rulesets / required status checks — no API access available.
  • GitHub Actions permissions settings (org/repo level) — no API access available.

Mechanical PR

Last week's PR #4 (claude/kindly-note-security-2026-W38, draft, unmerged) already contains this week's needed fixes (permissions block for ci.yml + a generic SECURITY.md) verbatim. No new PR opened this week to avoid a duplicate — recommend merging #4.

Activity

  1. added
    bug
    needs-spec
    on Sep 18, 2026
  2. srmcguirt commented on Sep 18, 2026

    @srmcguirt
    MemberAuthor

    Needs a scoped acceptance criterion before this can be picked up as agent-ready: the report explicitly flags that a human should confirm the innerHTML escaping contract in packages/browser/src/highlight-element.ts:254 actually holds end-to-end, and otherwise bundles multiple critical/high dependency findings left unresolved (report-only) alongside the items already fixed in the linked PR.


    Generated by Claude Code

  3. changed the title [-]Security sweep — 2026-W38[/-] [+]Security sweep — 2026-W39[/+] on Sep 21, 2026
  4. srmcguirt commented on Sep 21, 2026

    @srmcguirt
    MemberAuthor

    Sweep 2026-W39 — changes since W38:

    • bun audit totals unchanged (22 vulnerabilities: 2 critical, 12 high, 8 moderate); no Cargo.lock in this repo.
    • Corrected/added finding this week: ci.yml's test job triggers on pull_request and uses actions/checkout@v4 with default (true) persist-credentials — the sweep's rule covers the default, not just an explicit true, which last week's pass didn't call out. Low practical impact (public repo, no secrets in ci.yml) but noted for completeness.
    • permissions: block and SECURITY.md findings unchanged. Last week's mechanical PR chore(security): add permissions block to ci.yml + SECURITY.md #4 is still open/unmerged and covers exactly this week's needed fixes — no new PR opened to avoid a duplicate. Recommend merging chore(security): add permissions block to ci.yml + SECURITY.md #4.
    • Note: this run could not git fetch/reset the local checkout (agent sandbox restriction); all findings were instead verified directly against the live main branch via the GitHub API.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions