Skip to content

abnormal_security: add support for Not Analyzed Messages data stream #13483

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

Merged

Conversation

chemamartinez
Copy link
Contributor

Proposed commit message

Add support for AI Security Mailbox Not Analyzed data stream. API reference can be found here.

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

Related issues

Screenshots

abnormal_security-mailbox_not_analyzed_overview

Screenshot 2025-04-09 at 09 16 38 Screenshot 2025-04-09 at 09 17 08

@chemamartinez chemamartinez added enhancement New feature or request dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:abnormal_security Abnormal AI labels Apr 9, 2025
@chemamartinez chemamartinez self-assigned this Apr 9, 2025
@chemamartinez chemamartinez marked this pull request as ready for review April 9, 2025 07:38
@chemamartinez chemamartinez requested a review from a team as a code owner April 9, 2025 07:38
@elasticmachine
Copy link

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

@chemamartinez chemamartinez force-pushed the 13000-abnormal_security-not_analyzed branch from 10a4cb8 to fccdd38 Compare April 9, 2025 07:54
@chemamartinez
Copy link
Contributor Author

/test

@chemamartinez chemamartinez enabled auto-merge (squash) April 9, 2025 13:10
Content-Type:
- 'application/json'
body: |-
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{
{{ minify_json `
{

"not_analyzed_reason": "PHISHING_SIMULATION"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}
`}}

@@ -0,0 +1,3 @@
{"abx_message_id":-7361381340273523750,"recipient":{"email":"phishing@test.com","name":"Phishing Test"},"reported_datetime":"2025-03-06T17:27:15Z","reporter":{"email":"reporter@test.com","name":"Reporter Test"},"subject":"Re: Subject","not_analyzed_reason":"ROUTED_SUBMISSION"}
{"abx_message_id":240750237502375023,"recipient":{"email":"phishing@test.com","name":"Phishing Test"},"reported_datetime":"2025-03-04T18:50:27Z","reporter":{"email":"test@example.com","name":"Test Example"},"subject":"Fw: Forwarded email","not_analyzed_reason":"INVALID_SUBMISSION"}
{"abx_message_id":-1234567891234567891,"recipient":{"email":"phishing@test.com","name":"Phishing Test"},"reported_datetime":"2025-03-04T17:03:55Z","reporter":{"email":"info@test.com","name":"Info Test"},"subject":"Fwd: Forwarded email","not_analyzed_reason":"PHISHING_SIMULATION"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add final new line.

@@ -101,6 +101,63 @@ rules:
"attackType": "Attack Type: Spam"
}
`}}
- path: /v1/abuse_mailbox/not_analyzed
Copy link
Contributor

Choose a reason for hiding this comment

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

Can I confirm that the API is non-paginating?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it can take start and end datetimes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, no pagination parameters are accepted for this endpoint. Here's the reference.

"Authorization": ["Bearer " + string(state.access_token)],
}
}).do_request().as(resp, resp.StatusCode == 200 ?
bytes(resp.Body).decode_json().as(body, has(body.results) && size(body.results) > 0 ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bytes(resp.Body).decode_json().as(body, has(body.results) && size(body.results) > 0 ?
resp.Body.decode_json().as(body, has(body.results) && size(body.results) > 0 ?

"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "GET:"+(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"message": "GET:"+(
"message": "GET "+state.url.trim_right("/") + "/v1/abuse_mailbox/not_analyzed:"+(

Comment on lines 34 to 35
"start": [string(state.start_time)],
"end": [string(state.end_time)],
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"start": [string(state.start_time)],
"end": [string(state.end_time)],
"start": [state.start_time],
"end": [state.end_time],

These have just been formatted to strings, in the preamble block, so the conversion is not necessary.

@@ -116,7 +116,7 @@
"id": "",
"params": {
"fontSize": 12,
"markdown": "**Navigation**\n\n**Abnormal Security**\n\n- [AI Security Mailbox Overview](#/dashboard/abnormal_security-a4364503-ada3-4fe6-a054-d152accf207c)\n- [**Audit Overview (This Page)**](#/dashboard/abnormal_security-37ed5d19-c753-43a0-b0a2-f8e6437ddfe5)\n- [Case Overview](#/dashboard/abnormal_security-f6562262-e429-470d-af45-4c80afdcf664)\n- [Threat Overview](#/dashboard/abnormal_security-6a8e53ac-7759-4564-bcd6-03c6a9792eac)\n- [Vendor Case Overview](#/dashboard/abnormal_security-7997c0a4-da55-4090-b24f-586dbd19aff4)\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations based on Audit logs from the Abnormal Security integration. It includes the top 10 users and source IPs, a breakdown of events by category, action and tenant name, as well as essential details about the Audit data.\n\n[**Integrations Page**](/app/integrations/detail/abnormal_security/overview)",
"markdown": "**Navigation**\n\n**Abnormal Security**\n\n- [AI Security Mailbox Overview](#/dashboard/abnormal_security-a4364503-ada3-4fe6-a054-d152accf207c)\n- [AI Security Mailbox Not Analyzed Overview](#/dashboard/abnormal_security-a0e8aab9-b870-4903-a966-7195fd6cee9c)\n- [**Audit Overview (This Page)**](#/dashboard/abnormal_security-37ed5d19-c753-43a0-b0a2-f8e6437ddfe5)\n- [Case Overview](#/dashboard/abnormal_security-f6562262-e429-470d-af45-4c80afdcf664)\n- [Threat Overview](#/dashboard/abnormal_security-6a8e53ac-7759-4564-bcd6-03c6a9792eac)\n- [Vendor Case Overview](#/dashboard/abnormal_security-7997c0a4-da55-4090-b24f-586dbd19aff4)\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations based on Audit logs from the Abnormal Security integration. It includes the top 10 users and source IPs, a breakdown of events by category, action and tenant name, as well as essential details about the Audit data.\n\n[**Integrations Page**](/app/integrations/detail/abnormal_security/overview)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"markdown": "**Navigation**\n\n**Abnormal Security**\n\n- [AI Security Mailbox Overview](#/dashboard/abnormal_security-a4364503-ada3-4fe6-a054-d152accf207c)\n- [AI Security Mailbox Not Analyzed Overview](#/dashboard/abnormal_security-a0e8aab9-b870-4903-a966-7195fd6cee9c)\n- [**Audit Overview (This Page)**](#/dashboard/abnormal_security-37ed5d19-c753-43a0-b0a2-f8e6437ddfe5)\n- [Case Overview](#/dashboard/abnormal_security-f6562262-e429-470d-af45-4c80afdcf664)\n- [Threat Overview](#/dashboard/abnormal_security-6a8e53ac-7759-4564-bcd6-03c6a9792eac)\n- [Vendor Case Overview](#/dashboard/abnormal_security-7997c0a4-da55-4090-b24f-586dbd19aff4)\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations based on Audit logs from the Abnormal Security integration. It includes the top 10 users and source IPs, a breakdown of events by category, action and tenant name, as well as essential details about the Audit data.\n\n[**Integrations Page**](/app/integrations/detail/abnormal_security/overview)",
"markdown": "**Navigation**\n\n**Abnormal Security**\n\n- [AI Security Mailbox Overview](#/dashboard/abnormal_security-a4364503-ada3-4fe6-a054-d152accf207c)\n- [AI Security Mailbox Not Analyzed Overview](#/dashboard/abnormal_security-a0e8aab9-b870-4903-a966-7195fd6cee9c)\n- **Audit Overview**\n- [Case Overview](#/dashboard/abnormal_security-f6562262-e429-470d-af45-4c80afdcf664)\n- [Threat Overview](#/dashboard/abnormal_security-6a8e53ac-7759-4564-bcd6-03c6a9792eac)\n- [Vendor Case Overview](#/dashboard/abnormal_security-7997c0a4-da55-4090-b24f-586dbd19aff4)\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations based on Audit logs from the Abnormal Security integration. It includes the top 10 users and source IPs, a breakdown of events by category, action and tenant name, as well as essential details about the Audit data.\n\n[**Integrations Page**](/app/integrations/detail/abnormal_security/overview)",

(similar below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the motivation for this? To remove the (This page) message next to the dashboard title for everyone?

Would you agree to change it in a separate PR? as it is something that was added with the initial release of the integration.

Copy link
Contributor

@efd6 efd6 Apr 16, 2025

Choose a reason for hiding this comment

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

This can be another PR (though I would rather it not be since we are changing all the lines that need to be fixed in this change anyway, and it is a UI design bug); there is no need to have an active link to the page you are on and the text should tell the user where they are without having to read additional text. This is something that we discussed internally a few months back (2024-10-30). example comparison.

@chemamartinez chemamartinez requested a review from efd6 April 16, 2025 17:49
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @chemamartinez

Copy link

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Approving, but please reconsider the UI fix.

@chemamartinez chemamartinez merged commit 3e63dee into elastic:main Apr 16, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package abnormal_security - 1.6.0 containing this change is available at https://epr.elastic.co/package/abnormal_security/1.6.0/

@chemamartinez
Copy link
Contributor Author

Approving, but please reconsider the UI fix.

Auto-merge was enabled but I will open a new PR with your suggestion.

@chemamartinez chemamartinez deleted the 13000-abnormal_security-not_analyzed branch April 22, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Relates to a Kibana dashboard bug, enhancement, or modification. enhancement New feature or request Integration:abnormal_security Abnormal AI 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.

[abnormal_security] Add Support for Not Analyzed Messages in Abuse Mailbox
4 participants