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.
Test all your web-apps with Ruby and RSpec.
The motivation for this was two-fold. I wanted a) a way to write clear, understandable tests for Golang HTTP APIs, and b) to write capybara tests for Django apps. This provides both in a nice, neat little package.
So far, there are default configurations for the following languages/frameworks:
Add this line to your application's Gemfile:
gem 'polyspec'
And then execute:
$ bundle
Or install it yourself as:
$ gem install polyspec
In it's simplest incarnation, all you need to do is run the binary:
$ polyspec
If you have one of the configured app types, polyspec will just look
in your APP_ROOT/spec directory and run all the files matching the pattern
spec/**/*_spec.rb
.
If you stray from the the default configuration, you need to specify some cli arguments. From the CLI help:
Usage: /Users/ttaylor/.rbenv/versions/2.1.4/bin/polyspec [options]
-e, --start-command COMMAND The command used to start the app
-p, --port PORT The port the app will be running on
Defaults to 3000
-s, --stop-command COMMAND The command used to stop the app
If this is empty, the pid will be used to kill it
-b, --build-command COMMAND The command used to build/setup the app
-c, --check-path COMMAND The command used to check that the app is running
This assumes that it can perform a GET
to 'http://localhost:$PORT/$CHECK_PATH'
-t, --wait-tries NUM The number of times to try hitting the check-url before it gives up
Probably the most interesting one is the check-path. The CLI expects to be able to hit your app on the port you give (or 3000) at this path.
The rest of the options are run verbatim by the runner, with only a few notable things:
The build command is run once, you can use this to specify a build step
(like make
or go build
) or maybe even DB migrations
(rake db:migrate
anyone?)
The start and stop commands are run before and after each test (respectively). This ensures you have clean state in your app.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The full test suite requires both golang and python to be installed. On a Mac, you can just do (presuming you have homebrew installed):
brew install go
brew install python
pip install django # (or whichever installer you choose to use)
FAQs
Unknown package
We found that polyspec 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.
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.