Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@postman/postman-sdk
Advanced tools
![Postman](https://user-images.githubusercontent.com/117167853/230871188-0b05ff7c-8b61-401b-9d9a-4c1cb79ade88.jpg)
This SDK instruments express app to capture http requests for auto-generating accurate postman live collections.
npm install @postman/postman-sdk
Instrumentation | Supported Version | SDK Version | Tested |
---|---|---|---|
Sails | >=1.5.3 | >=0.1.6 | ✅ |
Express | >=4.18.2 | >=0.1.6 | ✅ |
http(nodejs) | >=14 | >=0.1.6 | ✅ |
Fastify* | >=3.0.0 | >=0.1.8 | ✅ |
Please Note : While other frameworks/variations of these frameworks (express derivatives) might work with our SDK, but they have not been extensively tested and might lead to discrepancies in results. We recommend using the specified framework or version to ensure accurate and consistent outcomes.
Note for Fastify support - Starting the server with
fastify-cli
usingfastify start
is not supported.
At the top of your app.js file, before app is initialized add this.
initialize({
collectionId: 'postman-collection-id'
apiKey: '<your-postman-api-key>'
});
SDK's initialization can be configured with these values
collectionId: Postman collectionId where requests will be added. This is the id for your live collection.
apiKey: Postman api key needed for authentication.
receiverBaseUrl: Where the data should be shipped to receiver's http endpoint.
bufferIntervalInMilliseconds: The interval in milliseconds that the SDK waits before sending data to Postman. The default interval is 5000 milliseconds. This interval can be tweaked for lower or higher throughput systems.
enable: enable or disable the SDK. Disabled SDK does not capture any new traces, nor does it use up system resources.
debug: Enable/Disable debug logs.
truncateData: Truncate the request and response body so that no PII data is sent to Postman. This is enabled by default. Disabling it sends actual request and response payloads.
type: boolean
default: true
Example:
Sample payload or non-truncated payload:
{
"first_name": "John",
"age": 30
}
Truncated payload:
{
"first_name": {
"type": "String"
},
"age": {
"type": "Number"
}
}
redactSensitiveData: Redact sensitive data such as api_keys and auth tokens, before they leave the sdk. When this is enabled, below redaction rules are applied by default (they are not case-sensitive):
{
"pmPostmanAPIKey": "PMAK-[a-f0-9]{24}-[a-f0-9]{34}",
"pmPostmanAccessKey": "PMAT-[0-9a-z]{26}",
"pmBasicAuth": "Basic [a-zA-Z0-9]{3,1000}(?![a-z0-9+({})!@#$%^&|*])[=]{0,2}",
"pmBearerToken": "Bearer [a-z0-9A-Z\-\._~\+\/]{15,1000}"
}
{enable: true/false, rules: {ruleName: '<regexPattern>'}}
initialize(
collectionId: '<postmanCollectionId>'
apiKey: '<apiKey>',
redactSensitiveData: {
enable: true, // default
rules: {
apiToken: 'PMAK-[a-f0-9]' // Sample rule, you can add your own regex
}
}
)
ignoreIncomingRequests: Return true/false to ignore incoming request from Live Collection
initialize({
...otherParams,
ignoreIncomingRequests: (request) => {
return request.url.includes('knockknock');
}
});
ignoreOutgoingingRequests: Return true/false to ignore outgoing request from Live Collection
initialize({
...otherParams,
ignoreOutgoingRequests: (request) => {
return request.headers['User-Agent'].includes('ignoreme');
}
});
FAQs
![Postman](https://user-images.githubusercontent.com/117167853/230871188-0b05ff7c-8b61-401b-9d9a-4c1cb79ade88.jpg)
The npm package @postman/postman-sdk receives a total of 58 weekly downloads. As such, @postman/postman-sdk popularity was classified as not popular.
We found that @postman/postman-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 376 open source maintainers 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.