Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
I am trying to understand what this flag is actually doing and preventing when using postman/newman. I found it in the UI and see that there is a flag that can be passed when calling newman via my pipeline.
.option(‘–no-insecure-file-read’, ‘Prevents reading the files situated outside of the working directory’)
If it is possible to read files from the file system, how is this done? From everything I have seen up to this point, the general consensus is that you cannot read files outside of the sandbox that is Postman other than making API calls in a request. It also sounded like reading files is only possible for using as “data” within a request. Is that “data” available in the pre-request or test scripts of a test?
I (somewhat) have worked around this by stuffing various JS files as variables into my globals file, then doing the IIFE approach to work with it.
I guess my big question is, if the file is local to the postman/newman collection/run, is it possible to read in a file into postman? If not then, what is the point of the --no-insecure-file-read as it seems you already cannot ready files outside of the current working directory? And how would I even set this flag to something else within newman? Would it be --no-insecure-file-read $false or is that still just turning no-insecure-file-read “on”?