File tree Expand file tree Collapse file tree 6 files changed +87
-24
lines changed
malwarebazaar/agent/stream Expand file tree Collapse file tree 6 files changed +87
-24
lines changed Original file line number Diff line number Diff line change 11# newer versions go on top
2+ - version : " 2.9.1"
3+ changes :
4+ - description : Properly handle CEL errors.
5+ type : bugfix
6+ link : https://github.com/elastic/integrations/pull/13708
27- version : " 2.9.0"
38 changes :
49 - description : Enable request trace log removal.
Original file line number Diff line number Diff line change @@ -31,13 +31,33 @@ program: |
3131 :
3232 optional.none(),
3333 }
34- }).as(req, req.do_request().as(resp,
35- bytes(resp.Body).decode_json().as(body, {
36- "events": body.payloads.map(payload, {
37- "message": payload.encode_json()
38- }),
34+ }).as(req, req.do_request().as(resp, resp.StatusCode == 200 ?
35+ resp.Body.decode_json().as(body, {
36+ "events": (has(body.payloads) ?
37+ body.payloads.map(payload, {
38+ "message": payload.encode_json()
39+ })
40+ :
41+ []
42+ ),
3943 "url": state.url
4044 })
45+ :
46+ {
47+ "events": {
48+ "error": {
49+ "code": string(resp.StatusCode),
50+ "id": string(resp.Status),
51+ "message": "GET "+ state.url.trim_right("/") + ":" + (
52+ size(resp.Body) != 0 ?
53+ string(resp.Body)
54+ :
55+ string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
56+ ),
57+ },
58+ },
59+ "want_more": false,
60+ }
4161 ))
4262 )
4363
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ program: |
3232 optional.none(),
3333 }
3434 }).do_request().as(resp, resp.StatusCode == 200 ?
35- bytes( resp.Body) .decode_json().as(body, body.?query_status == optional.of("ok") ?
35+ resp.Body.decode_json().as(body, body.?query_status == optional.of("ok") ?
3636 {
3737 "events": body.data.map(ind, {
3838 "message": ind.encode_json()
Original file line number Diff line number Diff line change @@ -33,17 +33,37 @@ program: |
3333 :
3434 optional.none(),
3535 }
36- }).as(req, req.do_request().as(resp,
37- bytes(resp.Body).decode_json().as(body, {
38- "events": body.data.map(ind, {
39- "message": ind.encode_json()
40- }),
36+ }).as(req, req.do_request().as(resp, resp.StatusCode == 200 ?
37+ resp.Body.decode_json().as(body, {
38+ "events": (has(body.data) ?
39+ body.data.map(ind, {
40+ "message": ind.encode_json()
41+ })
42+ :
43+ []
44+ ),
4145 "cursor": {
4246 "days": "1"
4347 },
4448 "initial_interval": state.initial_interval,
4549 "url": state.url
4650 })
51+ :
52+ {
53+ "events": {
54+ "error": {
55+ "code": string(resp.StatusCode),
56+ "id": string(resp.Status),
57+ "message": "POST "+ state.url.trim_right("/") + ":" + (
58+ size(resp.Body) != 0 ?
59+ string(resp.Body)
60+ :
61+ string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
62+ ),
63+ },
64+ },
65+ "want_more": false,
66+ }
4767 ))
4868 )
4969
Original file line number Diff line number Diff line change @@ -33,21 +33,39 @@ program: |
3333 }
3434 })
3535 .do_request()
36- .as(resp, resp.Body.mime("application/zip").File.as(file, file.size() > 0 ?
37- file[0].Data.as(data, bytes(data).decode_json().as(body, {
38- "events": body.map(id, body[id].size() > 0 ?
39- {"message": body[id][0].with({"id": id}).encode_json()}
40- :
41- {"message": ""}
42- ),
43- "url": state.url
44- }))
36+ .as(resp, resp.StatusCode == 200 ?
37+ resp.Body.mime("application/zip").File.as(file, file.size() > 0 ?
38+ file[0].Data.as(data, bytes(data).decode_json().as(body, {
39+ "events": body.map(id, body[id].size() > 0 ?
40+ {"message": body[id][0].with({"id": id}).encode_json()}
41+ :
42+ {"message": ""}
43+ ),
44+ "url": state.url
45+ }))
46+ :
47+ {
48+ "events": [],
49+ "url": state.url
50+ }
51+ )
4552 :
4653 {
47- "events": [],
48- "url": state.url
54+ "events": {
55+ "error": {
56+ "code": string(resp.StatusCode),
57+ "id": string(resp.Status),
58+ "message": "GET "+ state.url.trim_right("/") + ":" + (
59+ size(resp.Body) != 0 ?
60+ string(resp.Body)
61+ :
62+ string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
63+ ),
64+ },
65+ },
66+ "want_more": false,
4967 }
50- ))
68+ )
5169 )
5270
5371fields_under_root: true
Original file line number Diff line number Diff line change 11name : ti_abusech
22title : AbuseCH
3- version : " 2.9.0 "
3+ version : " 2.9.1 "
44description : Ingest threat intelligence indicators from URL Haus, Malware Bazaar, and Threat Fox feeds with Elastic Agent.
55type : integration
66format_version : " 3.2.3"
You can’t perform that action at this time.
0 commit comments