[ti_abusech] Add Commercial API support for MalwareBazaar data streams#20199
[ti_abusech] Add Commercial API support for MalwareBazaar data streams#20199moxarth-rathod wants to merge 2 commits into
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Elastic Docs Style Checker (Vale)Summary: 4 suggestions found 💡 Suggestions (4): Optional style improvements. Apply when helpful.
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
|
✅ All changelog entries have the correct PR link. |
|
|
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
|
| }, | ||
| "want_more": false, | ||
| } | ||
| : has(state.token) && has(state.token.access_token) && has(state.token.expires) && now() < timestamp(int(state.token.expires) - 60) ? |
There was a problem hiding this comment.
| : has(state.token) && has(state.token.access_token) && has(state.token.expires) && now() < timestamp(int(state.token.expires) - 60) ? | |
| : has(state.?token.access_token) && has(state.?token.expires) && now() < timestamp(int(state.token.expires) - 60) ? |
| "events": { | ||
| "error": { | ||
| "code": string(auth_resp.StatusCode), | ||
| "id": string(auth_resp.Status), |
There was a problem hiding this comment.
| "id": string(auth_resp.Status), | |
| "id": auth_resp.Status, |
| size(auth_resp.Body) != 0 ? | ||
| string(auth_resp.Body) | ||
| : | ||
| string(auth_resp.Status) + " (" + string(auth_resp.StatusCode) + ")" |
There was a problem hiding this comment.
| string(auth_resp.Status) + " (" + string(auth_resp.StatusCode) + ")" | |
| auth_resp.Status + " (" + string(auth_resp.StatusCode) + ")" |
| ) | ||
| ).as(token, !has(token.access_token) ? token : | ||
| ( | ||
| has(state.cursor) && has(state.cursor.after) ? |
There was a problem hiding this comment.
| has(state.cursor) && has(state.cursor.after) ? | |
| has(state.?cursor.after) ? |
but why are we checking for the presence of state.cursor.after and then using state.cursor.since?
| "events": body.items.map(ind, { | ||
| "message": ind.encode_json(), | ||
| }), | ||
| "want_more": has(body.meta) && has(body.meta.next_cursor), |
There was a problem hiding this comment.
| "want_more": has(body.meta) && has(body.meta.next_cursor), | |
| "want_more": has(body.?meta.next_cursor), |
| size(resp.Body) != 0 ? | ||
| string(resp.Body) | ||
| : | ||
| string(resp.Status) + ' (' + string(resp.StatusCode) + ')' |
There was a problem hiding this comment.
| string(resp.Status) + ' (' + string(resp.StatusCode) + ')' | |
| resp.Status + ' (' + string(resp.StatusCode) + ')' |
| ?"id": body.?query_status, | ||
| "message": "POST "+state.url+": "+( | ||
| "code": string(resp.StatusCode), | ||
| "id": string(resp.Status), |
There was a problem hiding this comment.
| "id": string(resp.Status), | |
| "id": resp.Status, |
| event.ingested: ".*" | ||
| abusech.malwarebazaar.deleted_at: ".*" |
There was a problem hiding this comment.
There is no sample event from the system tests. Can you add this?
| { | ||
| "code": 200, | ||
| "token": "test-commercial-token", | ||
| "expires": 4102444800 |
There was a problem hiding this comment.
January 1, 2100 for never expires? Has this been tested against a real endpoint so that we know the token requests work?
Alternatively, add a script test for this.
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Related issues