You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When getting the output of a command via the feature introduced in #113, the full output of the command is returned, even if called with --format json or --format simple-json, making the result not parseable as JSON due to several lines of informational output before the JSON-formatted output is returned.
Describe the solution you'd like to see
If --format json or --format simple-json are set, only return the JSON output if returned in a script.
script {
String result = jf 'audit --format json'
def json = new JsonSlurper().parseText(result)
}
Describe alternatives you've considered
No response
Additional context
Current result of trying to parse result as JSON:
09:31:48 [Info] Performing scans on 1 targets:
[
{
"target": "/var/jenkins/workspace/something",
"technology": "maven"
}
]
09:31:48 [Info] Not entitled for JAS, skipping advance security scans...
09:31:48 [Info] Calculating Maven dependencies...
...........
A JSON payload should start with an openning curly brace '{' or an openning square bracket '['.
Instead, '09' was found on line: 1, column: 1
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When getting the output of a command via the feature introduced in #113, the full output of the command is returned, even if called with
--format json
or--format simple-json
, making the result not parseable as JSON due to several lines of informational output before the JSON-formatted output is returned.Describe the solution you'd like to see
If
--format json
or--format simple-json
are set, only return the JSON output if returned in a script.Describe alternatives you've considered
No response
Additional context
Current result of trying to parse result as JSON:
The text was updated successfully, but these errors were encountered: