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.
importmap-package-manager
Advanced tools
importmap-package-manager
adds package version management to importmap-rails via version ranges, similar to how version ranges can be specified in Gemfile
(eg ~> 4.0
).
This is for managing third-party libraries. For your own first-party code, that will still be managed in the normal ways via importmap-rails
.
First, you'll need to have importmap-rails set up and configured properly for your application.
Once that's done, add this line to your application's Gemfile:
gem "importmap-package-manager"
And then execute:
$ bundle install
Finally, run this gem's installer:
$ bundle exec rails importmap_package_manager:install
config/importmap_packages.yml
under the imports
key. See [#package-options] for more details. You'll also want to delete these from config/importmap.rb
.bundle exec rails importmap_package_manager:update
to update config/importmap-packages-lock.rb
Each import should be specified as a key/value pair. In the most simple case, the key is the package name and the value is the version constraint. For example:
imports:
lodash: "~> 4.0"
In this case, importmap-package-manager
will install the latest 4.0 version of lodash.
Packages can also be broken out into more detail, to provide more options:
imports:
lodash/merge:
package: "lodash"
version: "~> 4.0.0"
subpath: "./merge"
This would produce something like the following in your importmap: { "lodash/merge": "https://ga.jspm.io/npm:lodash@4.17.21/merge.js" }
In this case, the key is just a unique identifier. It isn't used at all.
The options that can be passed for each import are:
|| Option || Description || | package | Package name, as listed in npmjs.com | | version | Version number constraint, using ruby syntax | | subpath | A subpath within the package to pin. This will be used in both the import name, and the path. |
After checking out the repo, run bundle install
to install dependencies. Then, run rake spec
to run the tests.
To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/quimbee/importmap-package-manager. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
importmap-package-manager is released under the MIT License.
Everyone interacting in the Importmap::Version::Manager project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that importmap-package-manager 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.
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.