Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
github.com/dadav/jsonnet-bundler-ng
The jsonnet-bundler-ng is a fork of jsonnet-bundler, a package manager for jsonnet.
go install -a github.com/dadav/jsonnet-bundler-ng/cmd/jb-ng@latest
Initialize your project:
mkdir myproject
cd myproject
jb-ng init
The existence of the jsonnetfile.json
file means your directory is now a
jsonnet-bundler package that can define dependencies.
To depend on another package (another Github repository):
Note that your dependency need not be initialized with a jsonnetfile.json
.
If it is not, it is assumed it has no transitive dependencies.
jb-ng install https://github.com/anguslees/kustomize-libsonnet
Now write myconfig.jsonnet
, which can import a file from that package.
Remember to use -J vendor
when running Jsonnet to include the vendor tree.
local kustomize = import 'kustomize-libsonnet/kustomize.libsonnet';
local my_resource = {
metadata: {
name: 'my-resource',
},
};
kustomize.namePrefix('staging-')(my_resource)
To depend on a package that is in a subtree of a Github repo (this package also happens to bring in a transitive dependency):
jb-ng install https://github.com/prometheus-operator/prometheus-operator/jsonnet/prometheus-operator
Note that if you are copy pasting from the Github website's address bar,
remove the tree/master
from the path.
If pushed to Github, your project can now be referenced from other packages in the same way, with its dependencies fetched automatically.
usage: jb-ng [<flags>] <command> [<args> ...]
A jsonnet package manager
Flags:
-h, --help Show context-sensitive help (also try --help-long and
--help-man).
--version Show application version.
--jsonnetpkg-home="vendor"
The directory used to cache packages in.
-q, --quiet Suppress any output from git command.
Commands:
help [<command>...]
Show help.
init
Initialize a new empty jsonnetfile
registry add [<name>] [<description>] [<url>] [<file>]
Add a new registry
registry rm [<name>]
Remove a registry
registry update
Update registry data
registry list
List registries
registry search [<flags>] [<query>]
Search package in registries
install [<flags>] [<uris>...]
Install new dependencies. Existing ones are silently skipped
update [<uris>...]
Update all or specific dependencies.
rewrite
Automatically rewrite legacy imports to absolute ones
This is an implemention of the design specified in this document: https://docs.google.com/document/d/1czRScSvvOiAJaIjwf3CogOULgQxhY9MkiBKOQI1yR14/edit#heading=h.upn4d5pcxy4c
FAQs
Unknown package
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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.