Skip to content

Control Character Escaping - ccp get-account #163

Open
@strick-j

Description

@strick-j

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:

  1. Retrieve an account via CCP that contains a **
  2. Use jq to extract the account Content
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions