Open winggundamth opened 4 years ago
Hi @winggundamth,
I was able to reproduce this only when using the kubernetes plugin (1.25.7). Verified that behaviour is correct when using Jenkins slaves outside of the kubernetes plugin.
The expected behaviour is: Stdout (no JSON is printed to STDOUT):
16:51:21 info: Logging in...
16:51:21 info: Logged in
16:51:21 info: Creating scan...
16:51:21 info: Scan started.
16:51:26 info: Checking scan status...
16:51:32 info: Checking scan status...
16:51:37 info: Checking scan status...
16:51:37 info: scan finished with status: completed-with-findings
16:51:37 info: Malware found: 1
16:51:37 Status code was: 2
16:51:37 Build root directory: /var/jenkins_home/jobs/Developer/jobs/test/jobs/test/builds/80
16:51:37 Workspace remote: /builds/workspace/Developer/test/test
16:51:37 Archiving artifacts: scan-results.json
Archived file scan-results.json:
{
"id": "5dd061a8-d21e-424c-bb7f-9b9f2a6a98f6",
"href": "/api/scans/5dd061a8-d21e-424c-bb7f-9b9f2a6a98f6",
....
contains only valid JSON
At this time it looks like multiple features are not supported when running with the kubernetes plugin. If you are interested in having this support you could look into creating a PR for the kubernetes plugin to fix these issues.
After scan finished. I go to summary report and found below sceenshot
I dig some code and found that report is read output from docker run deepsecurity/smartcheck-scan-action and write to artifact result file. So this is cause of the problem because stdout from docker run is not json valid format. It show others plain text output too. I'm not sure where to open this issue between this smartcheck Jenkins plugin or https://github.com/deep-security/smartcheck-scan-action
Please find sample result json stdout below