Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Prints a list of the components that have changed since the last commit and for which tests need to be run. Uses the dependencies within component-based Ruby/Rails applications (#cbra) to also print all transitively affected components.
Add this line to your application's Gemfile:
gem 'cbratest'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cbratest
cbratest [OPTION] [application path]
Test runner employing the structure of Component-based Ruby/Rails apps to optimize what needs to run.
Options are...
-h, -H, --help Display this help message.
-r, --results DEFAULT Display the directories of the components in need of running tests
-v, --verbose Verbose output of all parts of the calculation
There are sample #cbra folder structures in spec/examples
. Here is an example run when changing a file in component C
:
± |master ✗| → bin/cbratest ~/workspace/cbratest/spec/examples/letters/A
/Users/stephan/workspace/cbratest/spec/examples/letters/B/test.sh
/Users/stephan/workspace/cbratest/spec/examples/letters/C/test.sh
/Users/stephan/workspace/cbratest/spec/examples/letters/A/test.sh
This output can be used to run the necessary tests like so:
bin/cbratest ~/workspace/cbratest/spec/examples/letters/A | xargs -n1 /bin/bash
In verbose mode one can check the correctness of cbratest's calculation:
± |master ✗| → bin/cbratest -v ~/workspace/cbra/cbratest/spec/examples/letters/A
All components
B /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/B
C /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/C
D /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/D
E1 /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/E1
E2 /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/E2
F /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/F
A /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/A
Changes since last commit
/Users/stephan/workspace/cbra/cbratest/README.md
/Users/stephan/workspace/cbra/cbratest/spec/examples/letters/C/Gemfile
Directly affected components
C /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/C
Transitively affected components
B /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/B
C /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/C
A /Users/stephan/workspace/cbra/cbratest/spec/examples/letters/A
Test scripts to run
/Users/stephan/workspace/cbra/cbratest/spec/examples/letters/B/test.sh
/Users/stephan/workspace/cbra/cbratest/spec/examples/letters/C/test.sh
/Users/stephan/workspace/cbra/cbratest/spec/examples/letters/A/test.sh
Copyright (c) 2014 Stephan Hagemann, stephan.hagemann@gmail.com, @shageman
Released under the MIT license. See LICENSE file for details.
FAQs
Unknown package
We found that cbratest 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
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.