We would like to use additional JS capabilities as part of our postman collections.
- How do we import npm modules and 3rd party functions into postman? For example: is-port-reachable module through which we would be able to check all open ports on a remote host, given the IP address (similar to nmap).
- If importing 3rd party libraries is not possible, is there a similar functionality in postman? We want to scan all open ports on a remote host.
You can’t import NPM modules into Postman.
Have a look at the following links to see which external libraries are available within the Sandbox.
Adding External Libraries in Postman | Postman Blog
I don’t know about #2. Postman wasn’t built built for security testing. Your better off looking at proper vulnerability scanning software that will tell you about your ports but do a lot more than that. Tenable is the main one that comes to mind, but its expensive. There are cheaper alternatives.
Or just write this in node yourself. You can import whatever libraries you want including chai for assertions, and Mocha for the test library. You can do whatever you want then. If you are already comfortable with node, this is probably the most flexible option.
Thank you, will look into it.