
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
github.com/robertoseba/csv_parser
A simple tool for parsing CSV files in the CLI with options for column and row filtering.
Here's an example of how you can use this tool:
Sometimes you got a big CSV file, with multiple columns and want to only get rows for a single user.
csv_parser user-list.csv --filter "username, email" --rules "email:eq(user1@example.com)"
The command above will print only the columns username
and email
and only the rows that email match user1@example.com
It's based on the header values and takes the orders of the columns as inputed in the cli command. It can also be useful for when you want to create a new CSV file based on the original one but only want certain columns.
Let's say I have a csv file (users.csv) with the following headers: name,email,phone,address
.
If I want to generate a new file with columns email,name
:
csv_parser users.csv --filter "email,name" > newfile.csv
You can apply multiple rules to a column. Rules for each column must be separated by ;
Syntax: <column-name>:<rule-type>(<value>)<optional-logical-operator><rule-type>(<value>);
$ csv_parser --rules "col1:eq(bob)||eq(junior);col2:neq(10)&<e(20)"
If the rule value is a number the parser will try to compare values as being numerical. Otherwise values will be compared lexicographically.
Given the following csv (users.csv):
name,score,test
bob,100,test_1
bob,200,test_2
bob,10,test_3
junior,20,test_2
junior,25,test_1
junior,100,test_3
mike,50,test_1
mike,5,test_2
mike,100,test_3
I want to retrieve only names for rows where test_2 or test_3 score is 100 or more.
csv_parser users.csv --filter "name" --rules "test:eq(test_2)||eq(test_3);score:gte(100)"
Download the binary here: Releases
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.