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.
Bolt node.js library
var boltClient = require('boltpay')({
apiKey: 'API_KEY',
environment: 'sandbox'
});
boltClient.createOrder({
"cart": {
"order_reference": "12345",
"currency": "USD",
"total_amount": 3998,
"items": [
{
"name": "Bolt shirt",
"unit_price": 2999,
"quantity": 2,
"total_amount": 5998,
"sku": "shirt123",
"color": "Black",
"size": "M",
"image_url": "https://example.com/image"
}
],
"discounts": [{
"amount": 2000,
"description: "Code: 20OFF"
}]
}
}).then(function(response) {
// handle response
}).catch(function(err) {
// handle error
});
var boltClient = require('boltpay')({
signingSecret: 'SIGNING_SECRET',
});
var verified = boltClient.verifySignature(body, hmac);
Clone the repo, npm i
and then run two tasks:
npm run dev
to compile the project while developing.npm run test:dev
to test on the fly while developping.You can ndb npm run test:dev
to get a better debugger
To run the dev mode, you will need a secrets.js
file at the root of your folder:
/**
* Credentials to test the application in dev mode
*
* /!\ Must not be commited /!\
*/
module.exports = {
apiKey: 'xxx',
ngrokToken: 'xxx',
ngrokURL: 'xxx',
publicKey:'xxx',
signingSecret:'xxx',
};
Get the value for the credentials in you sandbox Bolt account: https://merchant-sandbox.bolt.com/settings
For your ngrok url and token:
your-bolt-local-test-server.ngrok.io
) for the ngrokURL.https://your-bolt-local-test-server.ngrok.io
)You can share it with other developpers. Once started, you can inspect the network on http://127.0.0.1:4040/inspect/http
You will need 3 processes :
npm run ngrok
will launch the tunnel to expose your localhost to the web.Card details for dev :
FAQs
Library to interact with Bolt checkout APIs
The npm package boltpay receives a total of 2 weekly downloads. As such, boltpay popularity was classified as not popular.
We found that boltpay 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.