Description
Describe the bug
Credentials retrieved via the cybr-cli ccp capability are not escaped properly for use with common tools such as 'jq'. For example when a credential contains a backslash the response contains a single backslash and when you try to parse the response with jq you receive the following error:
echo $test | jq -r '.Content?' parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 5, column 5
If a response contains other special characters such as > the response is escaped properly and is returned as \u003e in place of the >.
cybr ccp get-account -b https://test.test.us -I ServiceTest -s TEST -o appacct-cybrtest { "Address": "STRLAB.US", "CPMStatus": "success", "Content": ":mh(s4lm*PXYqfM\u003e" }
To Reproduce
Steps to reproduce the behavior:
- Retrieve an account via CCP that contains a **
- Use jq to extract the account Content
- Error will be displayed
Expected behavior
Properly escape control characters when returning response from CCP. Some translation may be necessary from the response received from CyberArk.
Desktop:
- OS: macOS 12.5 (Monterey)