Repository navigation
Security scan: resolve findings (2026-07-29) - #7
Conversation
Independently re-verified all three findings in docs/securityscan.md against the code and the live dependency tree. Finding 1 (dev-only azurite advisories) is valid and now partially remediated: `uuid` is pinned to ^11.1.1 through a root `overrides` entry, clearing GHSA-w5hq-g745-h8pq, with a lockfile regression test. The `brace-expansion` and `@opentelemetry/core` advisories are documented as accepted because each one's only patched release is API-incompatible with the tree azurite pins: brace-expansion@5.0.8 exports a named `expand` rather than a callable module, so minimatch@3 throws `expand is not a function`; and @opentelemetry/core@2.x removes `TracesSamplerValues.AlwaysOn`, which applicationinsights' pinned sdk-trace-base@1.30.1 reads, so tracer construction throws. The latter fails latently — the package still loads and `setup().start()` still succeeds — so it is recorded explicitly to stop a future reviewer from re-attempting it. Findings 2 and 3 are disputed and no code changed. The "hardcoded key" is Microsoft's published Azurite well-known emulator key against 127.0.0.1, so there is no secret to rotate. The "unvalidated recipient" reaches normalizePreparedMail only from the host-owned preparation port, which is the trusted side of the boundary SECURITY.md defines; CRLF and header injection are already blocked, and hard-coding an address grammar would violate this package's provider-neutral mandate. Also restores `npm run format:check`, which main was failing on docs/securityscan.md, and adds the 0.1.1 release notes RELEASING.md requires. `npm audit` drops from 12 advisories (5 high, 7 moderate) to 9 (5 high, 4 moderate); `npm audit --omit=dev` stays at 0 and no public API changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
There was a problem hiding this comment.
Pull request overview
This PR records the 2026-07-29 security scan triage outcomes and applies the agreed remediation for the dev-only uuid advisory (via a root overrides pin), along with a patch version bump for @pegma/mail and supporting documentation.
Changes:
- Pin transitive
uuidto^11.1.1via rootpackage.jsonoverrides, and updatepackage-lock.jsonaccordingly. - Add a release regression test to ensure no resolved
uuidin the lockfile falls below11.1.1. - Update security scan documentation + add
0.1.1release notes, and bump@pegma/mailto0.1.1.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/release-packages.test.ts | Adds a lockfile regression test that asserts all resolved uuid versions are >= 11.1.1. |
| packages/mail/package.json | Bumps @pegma/mail version from 0.1.0 to 0.1.1. |
| package.json | Adds root overrides to force uuid to ^11.1.1. |
| package-lock.json | Updates lockfile to reflect uuid@11.1.1 resolution and @pegma/mail@0.1.1. |
| docs/securityscan.md | Records the triage disposition details and updates the summary table. |
| docs/RELEASE_NOTES.md | Adds 0.1.1 release notes describing the security scan triage and uuid pin. |
Comments suppressed due to low confidence (1)
docs/securityscan.md:203
- This wrapped reference line is missing indentation, which breaks the surrounding list formatting (and will likely cause
prettier --checkto fail).
984-1017`)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reflow the two `securityscan.md` list items whose inline code spans straddled a line break. Prettier requires the continuation line at column 0 in that shape — it normalizes an indented continuation back to column 0, because indenting would inject the leading spaces into the code span and change the rendered text — so the fix is to reword so the span fits on one line rather than to re-indent. Addresses the Copilot review comment on lines 31 and 203. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Triage of every open finding in
docs/securityscan.md. Each one was independently re-verified against the actual code and the live dependency tree before a disposition was recorded — including empirically testing the recommended remediations, two of which turn out to be broken.Findings and dispositions
Finding 1 — Vulnerable transitive dev dependencies via
azurite— ✅ fixed (partially; remainder documented as accepted)Valid. Confirmed 12 advisories (5 high, 7 moderate), all reachable only through the
azuritedevDependency, withnpm audit --omit=devat 0.I tested an
overridespin for all three affected packages. Only one is safely fixable:uuid11.1.1require("uuid").v4insequelize,v4in@azure/ms-rest-js), whichuuid@11still provides. Verifiedsequelize,@azure/ms-rest-js, and the Azurite conformance suite against it.brace-expansion5.0.8(only){ EXPANSION_MAX, EXPANSION_MAX_LENGTH, expand }rather than a callable module.minimatch@3.1.5callsexpand(pattern)on the bare require, so the override makes every glob throwTypeError: expand is not a function, breakingglob@7→rimraf@3.@opentelemetry/core2.8.0+ (only)applicationinsights@2.9.8pins@opentelemetry/sdk-trace-base@1.30.1, which readsTracesSamplerValues.AlwaysOn— removed in core 2.x. Forcing2.10.0makes tracer construction throwTypeError: Cannot read properties of undefined (reading 'AlwaysOn').The OpenTelemetry breakage is latent:
applicationinsightsstill loads andsetup().start()still succeeds, so the test suite does not catch it. That is recorded explicitly indocs/securityscan.mdso a future reviewer does not re-attempt the override and ship a silently broken telemetry path.Reaching a compatible
minimatchwould mean overridingglobandrimraftoo — effectively the azurite downgrade this finding already rejects as breaking.Residual: 5 high + 4 moderate, dev-only, reachable only from azurite's own fixed-string internals on 127.0.0.1.
npm audit --omit=devremains 0, so the release packer's audit gate and the published tarball are unaffected.Added a lockfile regression test (
keeps every resolved uuid past the buffer-bounds advisory) so the pin cannot silently regress.Finding 2 — Hardcoded storage account key in test file —⚠️ disputed
Not a valid finding. The string is Microsoft's published Azurite/Azure Storage Emulator well-known development key, not a credential: documented verbatim in Microsoft's public docs, identical in every Azurite installation, and the connection string it sits in targets
http://127.0.0.1:${TABLE_PORT}only (packages/mail/src/azurite.test.ts:18-26). It authenticates to nothing but a local emulator and grants zero access to any real Azure resource. Rotation is meaningless (Azurite rejects any other key) and removal would only obscure it behind indirection. No code changed.Finding 3 — Recipient address is not format-validated —⚠️ disputed
Not a valid finding.
normalizePreparedMailis reached only fromawait options.preparation.prepare(...)(packages/mail/src/index.ts:1622-1630) — the host-owned preparation port, which is the trusted side of the boundarySECURITY.md:7-10defines. There is no untrusted input path to the value, so the premise is a trust-boundary misread rather than a missing check.The injection this would notionally prevent is already blocked:
CONTROLrejects CR/LF inrecipient, and header names/values are separately constrained (/^[A-Za-z0-9-]{1,64}$/, ≤64 headers, ≤8 KiB, no controls). Adding an email-format check would also be actively wrong here — this package is provider-neutral by mandate (AGENTS.md, "no deliverability abstraction"), and hard-coding one address grammar would reject legitimate provider-specific forms hosts are entitled to pass. No code changed.Release
Bumped
@pegma/mailto 0.1.1 (patch; no public API, runtime dependency, or behavior change) and syncedpackage-lock.json. Added the 0.1.1 entry todocs/RELEASE_NOTES.md, whichdocs/RELEASING.mdrequires for a reviewed release PR.Incidental
mainis currently red:npm run format:checkfails ondocs/securityscan.md(run 30494779517). This PR restores it — CI on main never reachednpm testas a result.Verification
npm ci,npm run format:check,npm run checkall clean.npm testis 77 passed / 2 failed locally; both failures are pre-existing on unmodifiedmainand environment-specific to this Windows machine ('tsc' is not recognizedinside the isolated temp repository copy the release tests build). They pass on CI's Linux runners — see the greennpm testin run 30388907525 on the prior main commit.🤖 Generated with Claude Code