Skip to content

fix: neutralize spreadsheet formulas in CSV exports - #22

Open
jdotc1 wants to merge 1 commit into
HyperDevTools:mainfrom
jdotc1:fix/csv-formula-injection-17
Open

jdotc1 wants to merge 1 commit into
HyperDevTools:mainfrom
jdotc1:fix/csv-formula-injection-17

Conversation

@jdotc1

@jdotc1 jdotc1 commented Nov 7, 2026

Copy link
Copy Markdown

Closes #17

Changes

  • Neutralize string cells that begin with spreadsheet formula markers (=, +, -, @), including leading whitespace and ASCII control characters, by prefixing a literal apostrophe.
  • Quote control-character cells as CSV fields and retain proper delimiter/quote escaping.
  • Apply the policy to both standard CSV and tax exports without changing numeric values or JSON semantics.
  • Add regression tests for formula prefixes, whitespace/control characters, ordinary text, multiline quoting, and numerical values.

Validation

  • npm test -- --runInBand: 14 tests passed across 7 suites.
  • npm run type-check: passed.
  • npm run lint: passed, no ESLint warnings.

CSV remains an interchange format; this does not imply exported CSV is a trusted archival or tax source.

This branch has not been deployed

No deployments
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.

Neutralize spreadsheet formulas in CSV and tax exports

1 participant