
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
openstudio_measure_tester
Advanced tools
The OpenStudio Measure Tester is a rubygem that exposes rake tasks for testing OpenStudio measures.
Add the following code to the Gemfile and Rakefile of a measure repo you desire to test.
Gemfile
source 'https://rubygems.org'
gem 'openstudio_measure_tester'
# or for release on Github
gem 'openstudio_measure_tester', github: 'NREL/openstudio_measure_tester_gem', branch: 'develop'
# or for local development
gem 'openstudio_measure_tester', path: '../<path-to-checkout>'
Rakefile
require 'openstudio_measure_tester/rake_task'
OpenStudioMeasureTester::RakeTask.new
Run bundle update
run bundle exec rake -T
to see the new tests that are available.
In existing measure directory, run bundle exec rake openstudio:all
Minitest, Coverage, Rubocop, and OpenStudio Style will run. The last message that appears to the screen is the location of the dashboard.
Open ./test_results/dashboard/index.html to view measure testing dashboard.
```
Require the OpenStudio-measure-tester gem
require 'openstudio_measure_tester'
measures_dir = 'spec/test_measures/AddOverhangsByProjectionFactor'
# all measures (recursively) from measures_dir will be tested
runner = OpenStudioMeasureTester::Runner.new(measures_dir)
# base_dir is needed for coverage results as they are written to disk on the at_exit calls
base_dir = Dir.pwd
result = runner.run_all(base_dir)
puts result
# result will be 0 or 1, 0=success, 1=failure
runner.run_style(false)
runner.run_test(false, base_dir)
runner.run_rubocop(false)
Results will be saved into the run directory (measures_dir from above).
docker run -it -v $(pwd):/root/test -w '/root' ubuntu:18.04 bash
# within container
apt-get update && apt-get install -y curl
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/docker/deployment/scripts/install_ruby.sh
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/ci/travis/install_openstudio.sh
chmod +x install_ruby.sh
chmod +x install_openstudio.sh
./install_ruby.sh 2.5.5 28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c
./install_openstudio.sh 3.0.0 1c9617fa4e
export RUBYLIB=/usr/Ruby
cd /root/test
bundle update
bundle exec rake
/lib/openstudio_measure_tester/version.rb
rake release
from masterFAQs
Unknown package
We found that openstudio_measure_tester demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.