Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Percy visual testing for Ruby Selenium.
npm install @percy/cli
:
$ npm install --save-dev @percy/cli
gem install percy-capybara
package:
$ gem install percy-capybara
In your test setup file, require percy/capybara
. For example if you're using
rspec, you would add the following to your spec_helper.rb
file:
require 'percy/capybara'
Now you can use page.percy_snapshot
to capture snapshots.
Note: you may need to add
js: true
to your specs, depending on your driver setup
describe 'my feature, type: :feature do
it 'renders the page' do
visit 'https://example.com'
page.percy_snapshot('Capybara snapshot')
end
end
Running the test above normally will result in the following log:
[percy] Percy is not running, disabling snapshots
When running with percy exec
, and your project's
PERCY_TOKEN
, a new Percy build will be created and snapshots will be uploaded to your project.
$ export PERCY_TOKEN=[your-project-token]
$ percy exec -- [test command]
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Snapshot taken "Capybara example"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!
page.snapshot(name[, options])
name
(required) - The snapshot name; must be unique to each snapshotoptions
- See per-snapshot configuration options@percy/migrate
We built a tool to help automate migrating to the new CLI toolchain! Migrating can be done by running the following commands and following the prompts:
$ npx @percy/migrate
? Are you currently using percy-capybara? Yes
? Install @percy/cli (required to run percy)? Yes
? Migrate Percy config file? Yes
? Upgrade SDK to percy-capybara@^5.0.0? Yes
? The Capybara API has breaking changes, automatically convert to the new API? Yes
This will automatically run the changes described below for you, with the
exception of changing the require
.
The name of the require has changed from require 'percy'
to require 'percy/capybara'
. This is to avoid conflict with our Ruby Selenium SDK's
require statement.
The previous version of this SDK had the following function signature:
Percy.snapshot(driver, name, options)
v5.x of this SDK has a significant change to the API. There no longer is a stand
alone module to call and you no longer need to pass the page/driver. It's
available on the current Capybara session (page
):
page.percy_snapshot(name, options)
If you were using this SDK outside of Capybara, you'll likely find the Ruby Selenium SDK a better fit
@percy/cli
& removing @percy/agent
If you're coming from a 4.x version of this package, make sure to install @percy/cli
after
upgrading to retain any existing scripts that reference the Percy CLI
command. You will also want to uninstall @percy/agent
, as it's been replaced
by @percy/cli
.
$ npm uninstall @percy/agent
$ npm install --save-dev @percy/cli
If you have a previous Percy configuration file, migrate it to the newest version with the
config:migrate
command:
$ percy config:migrate
FAQs
Unknown package
We found that percy-capybara 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.