Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
SaveMe is a gem to store your data in an organized way. Let's say you have a script that saves the results in results
file/folder and another run of this script (accidental or not) would overwrite your previous results. This is where SaveMe comes in. You put a one-liner in your code and your data is safe and organized.
Add this line to your application's Gemfile:
gem 'save_me'
And then execute:
$ bundle
Or install it yourself as:
$ gem install save_me
Put this line in your code before you run your script
SaveMe.call("path_to_what_you_want_to_copy", results_path: "./results", ymd: 0b110, params: { whatever: "you need here" })
First argument is a path to the file/folder you want to save.
Argument results_path
(optional, default: "./") is a path to a folder where your results will be copied. If any directory in the path doesn't exist yet, it will be created by the gem.
Argument ymd
(optional, default: 0b111
) is the folder structure. Notice it's in binary format. Each 1 or 0 corresponds to a letter in the ymd
.
y
- yearm
- monthd
- dayA 1
creates a folder for a year/month/day, a 0
will put a year/month/day in the final folder name.
Examples:
0b111
SaveMe.call("results", results_path: "archive", ymd: 0b111, params: { test: "test" })
archive/
└── 2017
└── 4
└── 3
└── 10:16:18
├── params.json
└── results
└── results.json
0b110
SaveMe.call("results", results_path: "archive", ymd: 0b110, params: { test: "test" })
archive/
└── 2017
└── 4
└── 03_10:18:55
├── params.json
└── results
└── results.json
Argument params
(optional, default: nil
) will be saved as json file with your results so you don't need to remember what params were used to get those particular results.
Bug reports and pull requests are welcome on GitHub at https://github.com/michal-januszkiewicz/save_me.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that save_me 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.