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.
trust-my-travel-legacy
Advanced tools
This is an unofficial node SDK for the Trust My Travel legacy API.
All types correspond to the official docs, with the exception of Booleans which are
given as strings for the most part in the API (i.e. "true"
rather than TRUE
), but have been typecast to Booleans
in this module.
Note: The TMT API has timeout issues, where it can take over 10 seconds to respond. We recommend setting a timeout of +20 seconds for any code that uses this.
Core functionality works as follows:
import TrustMyTravel from 'trust-my-travel-legacy';
async function example() {
// Initialise the client
const client = new TrustMyTravel({
username: 'username',
password: 'password',
live: true,
});
// Test your connection - useful for unit testing (throws an error if it fails)
const testResult = await client.testConnection();
// Take a payment
const paymentInput: PaymentParameters = {
firstname: 'Donald',
//... Full types are fully documented with JS Doc
};
const paymentResult = await client.takePayment(paymentInput);
// Refund
const refundInput: RefundParameters = {
booking_id: 123,
// ...
};
const refundResult = await client.refund(refund);
}
Integration tests are run using pupeteer to get tokens from Spreedly. To run locally you must set the following environmental variables:
export TRUST_MY_TRAVEL_STAGING_USERNAME="your_staging_username"
export TRUST_MY_TRAVEL_STAGING_PASSWORD="your_staging_password"
CD Feature | Provided |
---|---|
✅ | Typescript |
✅ | Linting (AirBnB + Prettier) |
✅ | Unit & Integration tests (Jest) |
❌ | 100% Coverage check (100% not possible given pupeteer limitations) |
✅ | Github Continuous Deployment |
This module is contributed by the team at Skyhook.
FAQs
SDK for the Trust My Travel legacy payments API.
The npm package trust-my-travel-legacy receives a total of 2 weekly downloads. As such, trust-my-travel-legacy popularity was classified as not popular.
We found that trust-my-travel-legacy 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.