Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This gem is created to help with a known issue, processing large csv files using ruby, without breaking our RAM. I used lazy enumeration to achieve this, that allows the methods to execute actions on one line at a time instead of loading millions of lines in memory at once.
I consider this gem in Beta state, proper testing suite is still missing and there are some improvements or extensions that could be useful to have in a full version of it.
gem install large_csv_reader
require 'large_csv_reader'
Function | Description |
---|---|
reader = LargeCsvReader.new | creates a new instance of the reader |
reader.generate_csv(fileName, columnNames) | creates a new csv file with the name and header names passed as parameters |
reader.append_to_csv(filename, rows=1000000,rowStructure) | Add lines to the csv, this lines are generated with the rowStructure array parameter. If rows parameters is not present by default it will load 1 million lines to the file. |
reader.massive_read_in_csv_data (file_name) | lazy load of each csv row into a list |
reader.massive_csv_builder(filename, column_names,rowMult="1") | create a csv with millions of lines, the value of rowMult represents how many millions lines the file will have |
reader.row_generator(structure) | generate rows on demand using enumeration |
The rest of the methods are considerations to solve a test problem with book data "Date", "ISBN", "Price"
massive_total_value_in_stock(csv_file_name)
massive_number_of_each_isbn(csv_file_name)
append_book_to_csv(filename,rows=1000000)
book_generator
FAQs
Unknown package
We found that large_csv_reader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.