fix(security): eliminate file-system races - #337
Merged
Conversation
ty-everett
requested review from
BraydenLangley,
sirdeggen and
tonesnotes
as code owners
July 25, 2026 23:23
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
Final verification is complete at
GitHub reports only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Program linkage
Advances the security-extended follow-up in #324.
Summary
js/file-system-racefindings ([codex] Implement BRC-136 BASM overlay sync #170–build(deps): bump pnpm/action-setup from 6.0.5 to 6.0.8 #176)Direntinspection instead of separate directory-entry stat checkscreate-bsv-appscripts/*.test.mjscontrol test so these guarantees persistAffected paths
create-bsv-appfile generation and package dependency mergingSecurity and compatibility
Atomic writers use unpredictable exclusive temporary files,
fsync, close, and rename, with descriptor and temporary-file cleanup on failure. Missing-file handling is based onENOENT; unrelated read/write errors remain visible.This PR does not change runtime APIs, routing, service access, CORS, CSP, origin or credential behavior, rate limits, or edge-policy contents. The public arbitrary-origin compatibility invariant remains unchanged. Generated docs manifest and synchronized service-policy outputs are byte-for-byte unchanged.
Verification
pnpm health:check— 12/12 repository-control tests; 37 projects; 30 public packages; 242 findings; 6 active exceptions; 0 control errorspnpm --filter create-bsv-app lintpnpm --filter create-bsv-app buildpnpm --filter create-bsv-app test:coverage— 35 suites / 243 tests; new file helper 100% statement/branch/function/line coveragepnpm --filter @bsv/wallet-toolbox buildnode --check packages/wallet/wallet-toolbox/syncVersions.jsnode scripts/sync-versions.mjs --dry-run— 35 packages, 0 workspace or infra changespnpm check-versionsnode scripts/check-sdk-peer.mjs— 33 manifests, 0 violationspnpm --filter docs-site validate— 93 frontmatter files and links validpnpm audit --audit-level=low— no known vulnerabilitiesgit diff --checkRelease impact
No package is published by this PR. Proposed accumulated candidates remain
@bsv/wallet-toolbox@2.4.5; this wave addscreate-bsv-app@1.0.3. Root/docs tooling has no npm release. Final package versions will be reconciled before the publication wave.