Skip to content

test : added pytest unit tests for csv_sanitizer utility#1907

Open
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1902
Open

test : added pytest unit tests for csv_sanitizer utility#1907
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1902

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1902.

Summary of What Has Been Done:
Added 21 pytest unit tests for app/utils/csv_sanitizer.py covering OWASP CSV Injection (Formula Injection) prevention. Tests cover sanitize_csv_value (all dangerous prefixes: =, +, -, @, whitespace+formula), sanitize_row, and export_to_csv_safe (BOM, empty data, column ordering, extra keys).

Changes Made:

  • tests/test_csv_sanitizer.py (new file)

Impact it Made:

  • Validates OWASP CSV Injection mitigation for all formula prefixes
  • All 21 tests pass locally

Note: Please assign this PR to the tmdeveloper007 account.

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing unit/integration tests. label Jun 25, 2026
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the gopaljilab's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:testing Adding, updating, or fixing unit/integration tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add pytest unit tests for csv_sanitizer utility

1 participant