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.
This library contains the most root objects I found myself re-implementing over and over. It is meant to serve as an abstract base for object modeling a domain.
To install through Rubygems:
gem install primitive
You can also add this to your Gemfile using:
bundle add primitive
Base class for objects identified by a string value (ID). Extension examples:
class Team < Primitive::Entity
attr_reader :name
def initialize(id:, name:)
super(id)
@name = name
end
end
# Not allowing direct manipulation of ID in the case it is controlled by the repository.
class Player < Primitive::Entity
attr_reader :name
def initialize(name:)
super()
@name = name
end
end
Several features are now provided by its base-class via the ID attribute:
#eql?
and #==
#hash
#<=>
#to_s
An interface that describes how a repository should function for loading/saving entities. A concrete example (albeit simple) is the Primitive::CompactFile
class which leverages YAML for serialization. Note that ID, in this case, is representative of the file path.
Basic steps to take to get this repository compiling:
To execute the test suite run:
bin/rspec spec --format documentation
Alternatively, you can have Guard watch for changes:
bin/guard
Also, do not forget to run Rubocop:
bin/rubocop
And auditing the dependencies:
bin/bundler-audit check --update
And Sorbet:
bin/srb
Note: ensure you have proper authorization before trying to publish new versions.
After code changes have successfully gone through the Pull Request review process then the following steps should be followed for publishing new versions:
version.rb
using semantic versioningbundle
CHANGELOG.md
with release notesbin/rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.Everyone interacting in this codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
This project is MIT Licensed.
FAQs
Unknown package
We found that primitive demonstrated a healthy version release cadence and project activity because the last version was released less than 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.