[trend_micro_vision_one] Improve ingest pipeline structure, error handling, and ECS field mappings - #17710
Conversation
…ings across all data streams
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Vale Linting ResultsSummary: 17 warnings, 2 suggestions found
|
| File | Line | Rule | Message |
|---|---|---|---|
| packages/trend_micro_vision_one/docs/README.md | 267 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/trend_micro_vision_one/docs/README.md | 269 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/trend_micro_vision_one/docs/README.md | 270 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 271 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 439 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/trend_micro_vision_one/docs/README.md | 441 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/trend_micro_vision_one/docs/README.md | 442 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 443 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 784 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/trend_micro_vision_one/docs/README.md | 786 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/trend_micro_vision_one/docs/README.md | 787 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 788 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 804 | Elastic.BritishSpellings | Use American English spelling 'gray' instead of British English 'Grey'. |
| packages/trend_micro_vision_one/docs/README.md | 1771 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/trend_micro_vision_one/docs/README.md | 1773 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/trend_micro_vision_one/docs/README.md | 1774 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/trend_micro_vision_one/docs/README.md | 1775 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
💡 Suggestions (2)
| File | Line | Rule | Message |
|---|---|---|---|
| packages/trend_micro_vision_one/docs/README.md | 881 | Elastic.WordChoice | Consider using 'run, start' instead of 'execute', unless the term is in the UI. |
| packages/trend_micro_vision_one/docs/README.md | 906 | Elastic.WordChoice | Consider using 'open' instead of 'launch', 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.
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
alert |
6289.31 | 3216.47 | -3072.84 (-48.86%) | 💔 |
detection |
3875.97 | 2534.85 | -1341.12 (-34.6%) | 💔 |
endpoint_activity |
4719.21 | 3822.63 | -896.58 (-19%) | 💔 |
To see the full report comment with /test benchmark fullreport
…y first format from the UNIX and UNIX_MS, returns wrong result on other)
| tag: set_event_id_from_event_id | ||
| copy_from: trend_micro_vision_one.detection.event_id | ||
| ignore_empty_value: true | ||
| - set: |
There was a problem hiding this comment.
We can't normalize event.severity according to the issue because the API returns integer values rather than the expected numeric format.
The logs contain two severity-related fields: cat (documented) and severity (not documented but present in the pipeline test logs). We are using cat to populate the ECS field event.severity. In the pipeline we map cat to severity_level so existing ingest pipelines are not broken.
There was a problem hiding this comment.
Can you provide a link for the documentation of the cat field? I cannot find any docs for it except as part of CEF.
There was a problem hiding this comment.
If the cat contains values between 0-100, then we can derive them as per this, which is the basis for arriving at our current event.severity values.
There was a problem hiding this comment.
Can you provide a link for the documentation of the cat field?
It isn’t publicly available; you need to log in to access it. Attaching a screenshot.

If the cat contains values between 0-100, then we can derive them as per elastic/detection-rules#1 (comment), which is the basis for arriving at our current event.severity values.
We aren’t sure whether the value will always fall in the 0–100 range. In live logs we’re only seeing it as 100 so far.
There was a problem hiding this comment.
I found a conflicting page which refers different values 100-200 : https://github.com/trendmicro/tm-v1-schema/blob/main/doc/Detections.yaml#L2121-L2129
There was a problem hiding this comment.
I found a conflicting page which refers different values 100-200 : https://github.com/trendmicro/tm-v1-schema/blob/main/doc/Detections.yaml#L2121-L2129
Aren't they example values?
There was a problem hiding this comment.
I think "The weighted priority of the incident" means that we should not be using this to populate the event.severity field at all. It should stay as a vendor-namespaced field with that description.
There was a problem hiding this comment.
Removed event.severity ECS mapping, 45363b5.
efd6
left a comment
There was a problem hiding this comment.
Suggest the following commit message:
trend_micro_vision_one: restructure ingest pipelines and improve ECS mappings
Restructure ingest pipelines across all six data streams (alert,
audit, detection, endpoint_activity, network_activity, telemetry)
for better organization, error handling, and maintainability.
Add processor tags throughout all pipelines for error tracing.
Improve on_failure handlers to include processor type, tag,
pipeline, and failure message. Bump ECS version from 8.11.0 to
9.3.0.
Alert: normalize event.severity from string labels
(low/medium/high/critical) to numeric values (21/47/73/99),
populate event.created from createdDateTime, extract
threat.technique.id from matched MITRE rules, and collect
related.ip from impact scope entities.
Audit and detection: replace individual field renames with a
camelCase-to-snake_case conversion script. Detection also adds
mappings for fields present in pipeline test logs but not
previously parsed (risk_level_value, sender_ip, tactic_id, and
others).
Endpoint activity: add human-readable *_value fields that
resolve numeric codes to descriptive names for event.id,
event.sub_id, object.integrity_level, object.true_type,
object.sub_true_type, and win_event_id.
Network activity: normalize eventTime to UNIX_MS before the
date processor (which only honours the first listed format), and
add an act_value field resolving numeric action codes to text.
I think it would be helpful in future to break large changes like this into a number of targeted and well explained commits so that it is easier to review.
| ignore_missing: true | ||
| if: ctx.trend_micro_vision_one?.detection?.request == null | ||
|
|
||
| # convert aptRelated ('0'/'1') to related_apt (boolean) |
There was a problem hiding this comment.
| # convert aptRelated ('0'/'1') to related_apt (boolean) | |
| # convert apt_related ('0'/'1') to related_apt (boolean) |
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | ||
| - script: | ||
| lang: painless | ||
| description: Resolved numeric risk level to text value. |
There was a problem hiding this comment.
| description: Resolved numeric risk level to text value. | |
| description: Resolve numeric risk level to text value. |
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | ||
| - script: | ||
| lang: painless | ||
| description: Resolved numeric action id to text value. |
There was a problem hiding this comment.
| description: Resolved numeric action id to text value. | |
| description: Resolve numeric action id to text value. |
| - set: | ||
| field: process.entity_id | ||
| tag: set_process_entity_id | ||
| value: '{{{process.pid}}}' |
There was a problem hiding this comment.
I'm not sure we can do this; process.entity_id is a "Unique identifier for the process." Process IDs are reused and so not globally unique.
There was a problem hiding this comment.
Right, I'll remove it.
| tag: set_event_id_from_event_id | ||
| copy_from: trend_micro_vision_one.detection.event_id | ||
| ignore_empty_value: true | ||
| - set: |
There was a problem hiding this comment.
Can you provide a link for the documentation of the cat field? I cannot find any docs for it except as part of CEF.
| if (!entry.getKey().contains("@")) { | ||
| String newKey = camelToSnake(entry.getKey()); | ||
| newObj[newKey] = convertToSnakeCase(entry.getValue()); | ||
| } |
There was a problem hiding this comment.
Why do we drop fields containing @. This is surprising enough to warrant a comment.
Also, prefer
| if (!entry.getKey().contains("@")) { | |
| String newKey = camelToSnake(entry.getKey()); | |
| newObj[newKey] = convertToSnakeCase(entry.getValue()); | |
| } | |
| if (entry.getKey().contains("@")) { | |
| continue; | |
| } | |
| newObj[camelToSnake(entry.getKey())] = convertToSnakeCase(entry.getValue()); |
There was a problem hiding this comment.
I took the script from other references. I don't think we need to skip this.
…pty values in the earlier stage
This comment has been minimized.
This comment has been minimized.
|
Buildkite failure is caused by policy golden files not being updated after renaming tracer config keys in the HTTPJSON stream templates. Build: https://buildkite.com/elastic/integrations/builds/39416 What failed: Job Error: Key failing excerptRoot cause: Changed templates in PR:
Current expected snapshots still use old key:
Recommended fix: Practical approach:
Verification: What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
The policy tests need to be updated. |
💚 Build Succeeded
History
|
| @@ -1,4 +1,4 @@ | |||
| {"endpointHostName": "workstation-pc01", "customerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "osName": "Windows 10", "dst": "81.2.69.142", "endpointGuid": "72436165-b5a5-471a-9389-0bdc3647bc33", "principalName": "john.doe@example.com", "request": "https://portal.example.com/dashboard", "act": 1, "src": "1.128.0.0", "serverTls": "TLS 1.3", "eventTime": 1699876543, "serverProtocol": "HTTP/2", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "rt": 1699876545, "tenantGuid": "b2c3d4e5-f678-9012-bcde-f23456789012", "eventName": "SWG_ACTIVITY_LOG", "application": "Microsoft 365", "ruleName": "Corporate_Access_Policy", "clientIp": "175.16.199.0", "requestBase": "portal.example.com", "score": 95, "userDomain": "example.com", "suid": "John Doe", "duration": 45, "eventSubName": "SharePoint file download", "fileHash": "a1b2c3d4e5f6789012345678901234567890abcd", "fileHashSha256": "ba9edecdd09de1307714564c24409bd25508e22fe11c768053a08f173f263e93", "fileName": "quarterly_report.xlsx", "fileSize": 245678, "fileType": "Microsoft Excel", "malName": "", "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "sender": "Corporate Gateway", "detectionType": 10, "profile": "standard", "userDepartment": "Finance", "requestMethod": "GET", "pname": "2200", "pver": "2.1", "deviceGUID": "c3d4e5f6-7890-1234-cdef-345678901234", "requestMimeType": "application/json", "ruleType": "access", "ruleUuid": "d4e5f678-9012-3456-def0-456789012345", "objectId": "e5f67890-1234-5678-ef01-567890123456", "spt": 49152, "policyUuid": "f6789012-3456-7890-f012-678901234567", "dpt": 443, "companyName": "Acme Corporation", "start": 1699876500} | |||
| {"endpointHostName": "workstation-pc01", "customerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "osName": "Windows 10", "dst": "81.2.69.142", "endpointGuid": "72436165-b5a5-471a-9389-0bdc3647bc33", "principalName": "john.doe@example.com", "request": "https://portal.example.com/dashboard", "act": 1, "src": "1.128.0.0", "serverTls": "TLS 1.3", "eventTime": 1699876543123, "serverProtocol": "HTTP/2", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "rt": 1699876545, "tenantGuid": "b2c3d4e5-f678-9012-bcde-f23456789012", "eventName": "SWG_ACTIVITY_LOG", "application": "Microsoft 365", "ruleName": "Corporate_Access_Policy", "clientIp": "175.16.199.0", "requestBase": "portal.example.com", "score": 95, "userDomain": "example.com", "suid": "John Doe", "duration": 45, "eventSubName": "SharePoint file download", "fileHash": "a1b2c3d4e5f6789012345678901234567890abcd", "fileHashSha256": "ba9edecdd09de1307714564c24409bd25508e22fe11c768053a08f173f263e93", "fileName": "quarterly_report.xlsx", "fileSize": 245678, "fileType": "Microsoft Excel", "malName": "", "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "sender": "Corporate Gateway", "detectionType": 10, "profile": "standard", "userDepartment": "Finance", "requestMethod": "GET", "pname": "2200", "pver": "2.1", "deviceGUID": "c3d4e5f6-7890-1234-cdef-345678901234", "requestMimeType": "application/json", "ruleType": "access", "ruleUuid": "d4e5f678-9012-3456-def0-456789012345", "objectId": "e5f67890-1234-5678-ef01-567890123456", "spt": 49152, "policyUuid": "f6789012-3456-7890-f012-678901234567", "dpt": 443, "companyName": "Acme Corporation", "start": 1699876500} | |||
There was a problem hiding this comment.
We should be able to handle both the original and the new timestamp, but I guess we're handling the old form in the next event so I suppose a replacement is OK.
|
Package trend_micro_vision_one - 2.9.0 containing this change is available at https://epr.elastic.co/package/trend_micro_vision_one/2.9.0/ |
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Related issues