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

Reporter API status model gives integer while string is required #195

Closed
RabbITCybErSeC opened this issue Jul 31, 2024 · 0 comments · Fixed by #196
Closed

Reporter API status model gives integer while string is required #195

RabbITCybErSeC opened this issue Jul 31, 2024 · 0 comments · Fixed by #196
Assignees
Labels
bug Something isn't working

Comments

@RabbITCybErSeC
Copy link
Collaborator

RabbITCybErSeC commented Jul 31, 2024

when GET http://localhost:8080/reporter:

[
	{
		"ExecutionId": "d7f11c29-4f10-11ef-a2ee-0e2bb4f430d7",
		"PlaybookId": "playbook--300270f9-0e64-42c8-93cc-0927edbe3ae7",
		"Started": "2024-07-31T09:45:23.274934956+02:00",
		"Ended": "2024-07-31T09:45:23.546501056+02:00",
		"StepResults": {
			"action--eb9372d4-d524-49fc-bf24-be26ea084779": {
				"ExecutionId": "d7f11c29-4f10-11ef-a2ee-0e2bb4f430d7",
				"StepId": "action--eb9372d4-d524-49fc-bf24-be26ea084779",
				"Started": "2024-07-31T09:45:23.274938101+02:00",
				"Ended": "2024-07-31T09:45:23.546498631+02:00",
				"CommandsB64": [
					"R0VUIGdldCBIVFRQMS4x"
				],
				"Variables": {
					"__soarca_http_api_result__": {
						"type": "string",
						"name": "__soarca_http_api_result__",
						"value": "{\n  \"args\": {}, \n  \"headers\": {\n    \"Accept-Encoding\": \"gzip\", \n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"Go-http-client/1.1\", \n    \"X-Amzn-Trace-Id\": \"Root=1-66a9eb93-6c7663f51e3f69aa12035ff5\"\n  }, \n  \"origin\": \"139.63.198.159\", \n  \"url\": \"http://httpbin.org/get\"\n}\n"
					}
				},
				"Status": 0,
				"Error": null,
				"IsAutomated": true
			}
		},
		"Error": null,
		"Status": 0
	}
]
type PlaybookExecutionReport struct {
	Type            string                         `bson:"type" json:"type"`
	ExecutionId     string                         `bson:"execution_id" json:"execution_id"`
	PlaybookId      string                         `bson:"playbook_id" json:"playbook_id"`
	Started         time.Time                      `bson:"started" json:"started"`
	Ended           time.Time                      `bson:"ended" json:"ended"`
	Status          string                         `bson:"status" json:"status"`
	StatusText      string                         `bson:"status_text" json:"status_text"`
	StepResults     map[string]StepExecutionReport `bson:"step_results" json:"step_results"`
	RequestInterval int                            `bson:"request_interval" json:"request_interval"`
}

Status return value of type integer, while according to the PlaybookExecutionReport this should be of type string. This breaks parsing on the front end side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants