
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
jackal-postman
Advanced tools
Jackal tools is an utility core library that manipulates Postman collections.
This library has multiple features distinguished by the command parameter (see below).
It combines collection items from Postman collections located in the source folder and appends into the target collection. The application is mainly focused on collection feature aggregations, and maintenance of single collections.
All merge commands are using one output collection from many source collections, and the rest of the commands are one input collection to one output collection.
npm i jackal-postman
const jackal = require("jackal-postman");
//As one function call with a "command" parameter
const executionMessage = await jackal.run("clr", "inputFile.json", "./sourceFolder", "outputFile.json", "./test/file1.json,./test/file2.json");
Alternatively you can use each function separately from version 1.2.0 and up
//Alternative for "ts" command
const executionMessage = jackal.testsSmart("inputFile.json", "outputFile.json");
//Alternative for "t200" command
const executionMessage = jackal.tests200("inputFile.json", "outputFile.json");
//Alternative for "clr" command
const executionMessage = jackal.cleanRequests("inputFile.json", "outputFile.json");
//Alternative for "clv" command
const executionMessage = jackal.cleanVariables("inputFile.json", "outputFile.json");
//Alternative for "mv" command
const executionMessage = await jackal.mergeVariables("inputFile.json", "./sourceFolder", "outputFile.json", "./test/file1.json,./test/file2.json");
//Alternative for "mr" command
const executionMessage = await jackal.mergeRequests("inputFile.json", "./sourceFolder", "outputFile.json", "./test/file1.json,./test/file2.json");
//Alternative for "mc" command
const executionMessage = await jackal.mergeCollections("inputFile.json", "./sourceFolder", "outputFile.json", "./test/file1.json,./test/file2.json");
//Alternative for "mev" command
const executionMessage = await jackal.mergeVarsToEnvironment("inputFile.json", "./sourceFolder", "outputFile.json", "./test/file1.json,./test/file2.json");
//Alternative for "amcv" command
const executionMessage = jackal.appendMissingVariables("inputFile.json", "outputFile.json");
//Alternative for "arph" command
const executionMessage = jackal.appendRequestHash("inputFile.json", "outputFile.json");
//Alternative for "ged" command
const executionMessage = jackal.generateDescriptions("inputFile.json", "outputFile.json");
//Alternative for "emd" command
const executionMessage = jackal.exportMDDescription("inputFile.json", "outputFile.md");
Merge commands take initial file (or start with blank if not provided), take the features from the source folder collections or the set of provided collections and insert the features. The altered content is then saved in the output file.
Altering commands take initial file, perform the command and save the altered content in the output file.
| Command | Meaning | Behavior |
|---|---|---|
mv | Merge collection variables | Merges all variables from all source folder collections in the collection variables of the output collection |
mev | Merge collection variables in an environment file | Merges all collection variables from all source folder collections to an output environment file. If no source environment is specified, a blank one will be used as starting point |
mr | Merge collection requests | Merges all requests from all source folder collections into the output collection, collection variables are not transfered, only requests |
mc | Merge collection in folders | Merges each collection requests from all collections (from the source folder) in a separate folder in the output collection. Collection variables with this command are setup in the PreRequest script of each requests folder |
ts | Append smart test assertions | Adds response validation asserts to all requests of the source collection and saves to the output collection. Smart tests are generated by using the saved responses as examples in the collection. This command analyses the saved responses and creates tests to match those values. Currently this command supports only JSON and XML response testing. With this command, the sourceFolder is not used |
t200 | Append HTTP 200 test assertions | Adds test asserts (to check if response HTTP code is 200) to all requests of the source collection and saves to the output collection. With this command, the sourceFolder is not used |
clr | Remove duplicate requests | All repeating occurrences of absolutely the same requests (including name) will be removed, only one will remain. The remaining instance is the first occurrence that the cleanup algorithm encounters while analyzing. Scope of comparing duplicates is the whole collection with all folders and subfolders. With this command, the sourceFolder is not used |
clv | Remove unused collection variables | Removes all unused collection variables from the collection. It goes through the whole collection and looks for used variables. Then removes all collection variables that are not referenced anywhere in the collection. With this command, the sourceFolder is not used |
arph | Append request payload hash | Appends code in PreRequest code that hashes the request body with hashPassword variable value. This hash is then added to the request as PayloadHash header. |
amcv | Append missing collection variables | Appends missing collection variables that are referenced in any request, but are not present in the collection. With this command, the sourceFolder is not used |
gmd | Generate MD descriptions in collection | Generates MD descriptions on collection and requests, the description is in MD format and is saved in the output collection file. This command saves the MD descriptions in the collection file. To export these descriptions in a separate MD file use emd. With this command, the sourceFolder is not used |
emd | Export MD document from collection | Creates summary Markdown document from all the collection descriptions. This feature does not automatically generate descriptions. It only collects descriptions of all elements of the collection and creates one summary Markdown file. With this command, the sourceFolder is not used |
Commands can be combined by executing them one after the other and using the output collection of the first execution as a source collection of the next execution.
inputFile is considered any existing postman collection or postman environment file. This will will be the starting point to enhance with Jackal commands
sourceFolder is a path on a local drive that will be used as a source of collections whos features will be added to the inputFile, see the commands above for more info.
NOTE: the scanning of files in this folder is not recursive, only the *.json located directly into this folder will be considered for usage.
sourceCollections is a substitute for sourceFolder. It is suppose to be a list of collection files separated with comma (,). If this parameter is present in the function call, the sourceFolder value is ignored.
outputFile is a path where we want the resulting collection/environment to be saved by the Jackal. This location should be accessible by the Jackal. This parameter is required in all use cases.
:question: = Optional :heavy_check_mark: = Required :x: = Not used
| Command | inputFile | sourceFolder or sourceCollections | outputFile |
|---|---|---|---|
mv | :question: Blank collection | :heavy_check_mark: | :heavy_check_mark: |
mev | :question: Blank environment | :heavy_check_mark: | :heavy_check_mark: |
mr | :question: Blank collection | :heavy_check_mark: | :heavy_check_mark: |
mc | :question: Blank collection | :heavy_check_mark: | :heavy_check_mark: |
clr | :heavy_check_mark: | :x: | :heavy_check_mark: |
clv | :heavy_check_mark: | :x: | :heavy_check_mark: |
t200 | :heavy_check_mark: | :x: | :heavy_check_mark: |
ts | :heavy_check_mark: | :x: | :heavy_check_mark: |
arph | :heavy_check_mark: | :x: | :heavy_check_mark: |
amcv | :heavy_check_mark: | :x: | :heavy_check_mark: |
gmd | :heavy_check_mark: | :x: | :heavy_check_mark: |
emd | :heavy_check_mark: | :x: | :heavy_check_mark: |
ts command, the source collection must have saved responses as examples, otherwise the generation does not work, there is nothing go analyzeTest part of requests only. The assertions are added beside existing Test code.mev command works with environment files, both the source and the output files are not collection files, but Postman environment filessourceCollections is a substitute for sourceFolder. The commands that need these values at least one is mandatory (either or). It is useless to specify both, specifying sourceCollections overrides the sourceFolder value.clr and clv are removing features from the inputFile and saves the cleaned up file in the outputFilearph is self contained, it will not cause any problems if added and some values missing in the collection like thehashPasswordFAQs
Postman Collections manipulation tools
We found that jackal-postman 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.