Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No input-size guard in scanNotes/loadTopics (unlike the TOC reader)

Closed Beginner friendly
#332 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #415 by @Kuldeep2822k — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nodejs, typescript
Domain
cli, performance

Research direction

The unbounded reads are at src/storage/scanner.ts:157 (scanNotes) and loader.ts:229 (loadTopics), both calling readFileSync on the whole file. Start with the size cap in toc.ts, where TOC_MAX_SOURCE_BYTES is defined and checked before reading, and check how that skip is reported. Done means both readers stat the file first, skip anything over the same limit, and emit a diagnostic instead of loading it; a test with an oversized fixture should show the skip.

Written by the indexing model from the issue text.

Description

core priority: medium

Location: src/storage/scanner.ts:157; loader.ts:229

Unbounded readFileSync + whole-buffer parse; toc.ts caps at 512 KiB (TOC_MAX_SOURCE_BYTES, #263) but scanner/loader do not. A multi-MB file (export/pasted log) in the vault is fully loaded and line-scanned on every scan.

Fix: Stat-first size ceiling mirroring TOC_MAX_SOURCE_BYTES; skip-with-diagnostic.

From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
21h 20m
Merged PRs (30d)
176

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.