Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostic output is not valid JSON #6

Closed
ITServ-DE opened this issue Aug 12, 2019 · 2 comments
Closed

diagnostic output is not valid JSON #6

ITServ-DE opened this issue Aug 12, 2019 · 2 comments

Comments

@ITServ-DE
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) Win7
Cortex version / git hash 3.0.0-RC4
Package Type DEB

Problem Description

The JSON output generated for debugging purposes when an analyzer could not run is no valid JSON.

This is the output I get from running Google_DNSResolve where I have PAP:AMBER and the analyzer at max-PAP:GREEN:

{
  "input": "{\"data\":\"192.99.215.95\",\"dataType\":\"ip\",\"tlp\":0,\"message\":\"61\",\"parameters\":{},\"config\":{\"proxy_https\":null,\"max_pap\":1,\"service\":\"get\",\"check_tlp\":true,\"proxy_http\":null,\"max_tlp\":1,\"auto_extract_artifacts\":true,\"check_pap\":true},\"pap\":2}",
  "success": false,
  "errorMessage": "PAP is higher than allowed.",
  "artifacts": []
}

This is no valid JSON, because ...
First, almost every quotation sign is escaped:

Quotes

Second, after cleaning up these escape characters, it's invalid JSON because there the object-type value of "input" is placed in quotes

Quotes2

I'm quite sure the qouting of the object introduces the problem with the escaping.

Steps to Reproduce

Run any analyzer where the observables TLP/PAP is higher than allowed by the analyzer and look at the raw report.

@ITServ-DE ITServ-DE changed the title Error output is not valid JSON diagnostic output is not valid JSON Aug 12, 2019
@ITServ-DE
Copy link
Author

I start to wonder if this is a Cortex error, not a cortexutils.

if so, please reopen TheHive-Project/Cortex#213

@ITServ-DE
Copy link
Author

Problem belongs to Cortex. Repopened there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant