Skip to content

Support CSV input format#62

Merged
zakird merged 13 commits intomasterfrom
phillip/bug-53-support-csv-input
Apr 7, 2026
Merged

Support CSV input format#62
zakird merged 13 commits intomasterfrom
phillip/bug-53-support-csv-input

Conversation

@phillip-stephens
Copy link
Copy Markdown
Contributor

@phillip-stephens phillip-stephens commented Apr 4, 2026

Description

This PR adds the ability to parse CSV input files to ZAnnotate as well as integration tests for verifying the tool works end-to-end.

Example:

printf "name,ip_address,date\n cloudflare,1.1.1.1,04-04-26\n google,8.8.8.8,04-04-26" | ./zannotate --rdns --input-file-type=csv --input-ip-field=ip_address
{"name":" google","ip_address":"8.8.8.8","date":"04-04-26","zannotate":{"rdns":{"domain_names":["dns.google"]}}}
{"name":" cloudflare","ip_address":"1.1.1.1","date":"04-04-26","zannotate":{"rdns":{"domain_names":["one.one.one.one"]}}}

Of note, all fields in a CSV file will be copied into the output JSON, in the same way that the JSON input module creates a zannotate field and copies all original JSON keys into the output structure.

Closes #53

@phillip-stephens phillip-stephens marked this pull request as ready for review April 7, 2026 02:47
@phillip-stephens phillip-stephens requested a review from zakird April 7, 2026 02:47
@zakird zakird merged commit e159cd5 into master Apr 7, 2026
3 checks passed
@zakird zakird deleted the phillip/bug-53-support-csv-input branch April 7, 2026 12:23
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.

CSV input file type not supported in practice

2 participants