Skip to content

[ti_abusech] Add Commercial API support for MalwareBazaar data streams#20199

Open
moxarth-rathod wants to merge 2 commits into
elastic:mainfrom
moxarth-rathod:abusech-malwarebazaar
Open

[ti_abusech] Add Commercial API support for MalwareBazaar data streams#20199
moxarth-rathod wants to merge 2 commits into
elastic:mainfrom
moxarth-rathod:abusech-malwarebazaar

Conversation

@moxarth-rathod

Copy link
Copy Markdown
Contributor

Proposed commit message

ti_abusech: add commercial API support for the MalwareBazaar data stream

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/ti_abusech directory.
  • Run the following command to run tests.

elastic-package test

Related issues

@moxarth-rathod moxarth-rathod self-assigned this Jul 18, 2026
@moxarth-rathod
moxarth-rathod requested review from a team as code owners July 18, 2026 06:14
@moxarth-rathod moxarth-rathod added enhancement New feature or request Integration:ti_abusech abuse.ch Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Jul 18, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 4 suggestions found

💡 Suggestions (4): Optional style improvements. Apply when helpful.
File Line Rule Message
packages/ti_abusech/data_stream/malwarebazaar/fields/fields.yml 211 Elastic.WordChoice Consider using 'run, start' instead of 'execute', unless the term is in the UI.
packages/ti_abusech/data_stream/malwarebazaar/manifest.yml 20 Elastic.WordChoice Consider using 'misuse' instead of 'abuse', unless the term is in the UI.
packages/ti_abusech/data_stream/malwarebazaar/manifest.yml 33 Elastic.WordChoice Consider using 'misuse' instead of 'abuse', unless the term is in the UI.
packages/ti_abusech/data_stream/malwarebazaar/manifest.yml 40 Elastic.WordChoice Consider using 'misuse' instead of 'abuse', unless the term is in the UI.

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.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

@vera-review-bot

Copy link
Copy Markdown

⚠️ @moxarth-rathod I couldn't complete the review for commits f73834a after several attempts. A maintainer can re-run it with @vera-review-bot review.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

cc @moxarth-rathod

},
"want_more": false,
}
: has(state.token) && has(state.token.access_token) && has(state.token.expires) && now() < timestamp(int(state.token.expires) - 60) ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
: 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),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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) + ")"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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) ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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) + ')'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"id": string(resp.Status),
"id": resp.Status,

Comment on lines +7 to +8
event.ingested: ".*"
abusech.malwarebazaar.deleted_at: ".*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need these.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no sample event from the system tests. Can you add this?

{
"code": 200,
"token": "test-commercial-token",
"expires": 4102444800

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:ti_abusech abuse.ch Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants