Implements redaction of Postman API keys in error messages for enhanced security.
Adds a redactSecrets function in lib/util.js to redact API keys (matching the pattern PMAK-*) from error messages.
Utilizes the redactSecrets function within fetchJson to ensure that any error messages generated during the fetching of collections or environments from URLs have the API keys redacted.
Includes unit tests in test/unit/util.test.js to verify that the redactSecrets function correctly redacts API keys from given strings.
Modifies test/unit/run.test.js to test the redaction functionality within the context of Newman runs, ensuring that error messages output during collection runs do not expose sensitive API keys.
Related to #3
Implements redaction of Postman API keys in error messages for enhanced security.
redactSecrets
function inlib/util.js
to redact API keys (matching the patternPMAK-*
) from error messages.redactSecrets
function withinfetchJson
to ensure that any error messages generated during the fetching of collections or environments from URLs have the API keys redacted.test/unit/util.test.js
to verify that theredactSecrets
function correctly redacts API keys from given strings.test/unit/run.test.js
to test the redaction functionality within the context of Newman runs, ensuring that error messages output during collection runs do not expose sensitive API keys.For more details, open the Copilot Workspace session.