Skip to content

Add busboy library security review and safe wrapper (closes #6)#15

Open
18850196928-max wants to merge 3 commits into
bogeeee:mainfrom
18850196928-max:review-busboy-security
Open

Add busboy library security review and safe wrapper (closes #6)#15
18850196928-max wants to merge 3 commits into
bogeeee:mainfrom
18850196928-max:review-busboy-security

Conversation

@18850196928-max

Copy link
Copy Markdown

What

Security review of the busboy multipart parser library used by restfuncs, per issue #6.

Findings

  • Busboy has zero side effects — no filesystem access, no network calls, no eval, no child_process
  • Dependency tree is minimal: only streamsearch (pure Boyer-Moore-Horspool algorithm)
  • Existing protections: header pair/header size limits (matches Node.js defaults), strict mode, input validation
  • The parsing code is correct but uses low-level character arithmetic making it hard to audit visually

Deliverables

  1. SECURITY_REVIEW.md — Full analysis of busboy architecture, dependencies, security hardening, and recommendations
  2. safe-busboy.js — Drop-in wrapper that adds:
    • File size/type/count limits
    • Field size/count limits
    • Request timeout (30s default)
    • MIME type whitelist
    • All limits configurable

Verdict

Busboy is safe to use as-is for restfuncs. The wrapper provides defense-in-depth for production deployments.

Closes #6

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.

Supply-chain: Review or rewrite the busboy library.

1 participant