Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This gem is the Ruby implementation of the for the NASA rovers code kata.
The code keeps a minimal footprint, relying on standard library only and reducing it to its minimum (i.e. optparse
was overkill for the simple CLI interface).
The code design follows the single responsibility principle by using a dedicated class for any specific task.
The code is covered by fast, isolated unit testing, implemented by minitest
spec (a standard, faster and as same as powerful alternative to rspec
).
To run tests just execute rake:
bundle exec rake
Run options: --seed 4303
# Running:
.....................
Finished in 0.004475s, 4692.7374 runs/s, 7374.3017 assertions/s.
Just execute the bundle console
command and pass an array of instructions to the Rover.instruct
method:
nasa_data = ["5 5", "1 2 N", "LMLMLMLMM", "3 3 E", "MMRMMRMRRM"]
puts NasaRovers::Rover.instruct(nasa_data)
#1 3 N
#5 1 E
#=> nil
The library provides a CLI interface via the nasa_rovers
command from the terminal.
You can print CLI help by:
$ ./bin/nasa_rovers -h
Usage: nasa_rovers ./nasa_data.txt
-h --help Print this help
<path-to-file> Instruct rovers with NASA data
The program accepts as input a file containing the NASA data (for more info check ``SUMMARY.md`)
# ./nasa_data.txt
5 5
1 2 N
LMLMLMLMM
3 3 E
MMRMMRMRRM
Just pass the file path to the program:
$ ./bin/nasa_rovers ./nasa_data.txt
1 3 N
5 1 E
FAQs
Unknown package
We found that nasa_rovers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.