Skip to content

fix(security): eliminate dynamic property injection - #335

Merged
ty-everett merged 1 commit into
mainfrom
codex/program-wave-8-property-injection
Jul 25, 2026
Merged

fix(security): eliminate dynamic property injection#335
ty-everett merged 1 commit into
mainfrom
codex/program-wave-8-property-injection

Conversation

@ty-everett

@ty-everett ty-everett commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace request- and peer-keyed plain objects in the auth transport with Map storage
  • define decoded and normalized wallet values as own data properties so reserved keys cannot invoke prototype setters
  • cover hostile __proto__ identifiers and payload keys, completed-handle cleanup, certificate success/failure/listener/timeout cleanup, and missing general handles

This is the dynamic-property-injection security wave tracked by #324. It does not alter CORS, CSP, public-service accessibility, authentication semantics, or package versions.

Validation

  • auth-express-middleware: 3 suites, 29 tests passed
  • wallet-toolbox: 141 suites, 1,277 tests passed; 5 suites and 27 tests intentionally skipped
  • focused wallet remoting tests: 2 suites, 42 tests passed
  • both affected packages build successfully
  • both affected packages lint with no errors (pre-existing warnings remain)
  • root audit: 0 vulnerabilities
  • health controls: 37 projects, 0 errors
  • SDK peer contract: 33 package manifests, 0 violations
  • version synchronization and diff checks pass
  • extended CodeQL passed after replacing per-key writes with prototype-safe batched descriptors
  • Sonar new-code issue count returned to zero after decoder complexity refactoring

Release planning

No package versions are changed or published in this PR. Current final-program candidates are:

  • @bsv/auth-express-middleware: 2.2.0 (public transport field types are hardened from records to maps)
  • @bsv/wallet-toolbox: 2.4.5

@ty-everett
ty-everett marked this pull request as ready for review July 25, 2026 22:12
Comment thread packages/wallet/wallet-toolbox/src/storage/remoting/BinaryJson.ts Fixed
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/middleware/auth-express-middleware/src/index.ts 85.29% 1 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@ty-everett
ty-everett force-pushed the codex/program-wave-8-property-injection branch 3 times, most recently from 31164cc to 4ba682c Compare July 25, 2026 22:28
@ty-everett
ty-everett force-pushed the codex/program-wave-8-property-injection branch from 4ba682c to 9881876 Compare July 25, 2026 22:34
@sonarqubecloud

Copy link
Copy Markdown

@ty-everett
ty-everett merged commit d087d44 into main Jul 25, 2026
30 checks passed
@ty-everett
ty-everett deleted the codex/program-wave-8-property-injection branch July 25, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants