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.
stripe-mock-webhooks
Advanced tools
Quickly test Stripe Webhooks against your application without hitting Stripe or requiring internet connectivity.
$ npm install stripe-mock-webhooks --save-dev
// Require
var StripeMockWebhooks = require('stripe-mock-webhooks')
// Tell the server where it should send events
var webhooks = new StripeMockWebhooks({
version: '2015-10-01', // Default is latest Stripe API version
url: 'http://localhost:3001/stripe/events'
})
Send a webhook:
webhooks.trigger('invoice.created').then(function (response) {
// success
}).catch(function (err) {
// error
})
Or overwrite values in the response:
webhooks.trigger('invoice.created', {
data: {
object: {
plan: {
id: 'PLAN_IDENTIFIER'
}
}
}
})
Additional options can be turned on / off:
webhooks.trigger('invoice.created', undefined, {
now: false
})
Build JSON
response without triggering an event:
var response = webhooks.build('invoice.created', {
data: {
object: {
plan: {
id: 'PLAN_IDENTIFIER'
}
}
}
})
Supports the same arguments as webhooks.trigger
now
- Updates event created
timestamp to Date.now()
, defaults to true
Look in tests to see example usage.
MIT © Nijiko Yonskai
FAQs
Test Stripe Webhooks, no internet required
The npm package stripe-mock-webhooks receives a total of 41 weekly downloads. As such, stripe-mock-webhooks popularity was classified as not popular.
We found that stripe-mock-webhooks 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.