CtrlK
BlogDocsLog inGet started
Tessl Logo

asim-parser-pr-reviewer

Reviews pull requests for ASIM parser changes and summarizes suggestions. This is not to be called by asim-parser-creator-orchestrator or when creating ASIM parsers in general. This is strictly for reviewing pull requests after necessary workflows have ran.

58

Quality

66%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Fix and improve this skill with Tessl

tessl review fix ./.github/skills/asim-parser-pr-reviewer/SKILL.md
SKILL.md
Quality
Evals
Security

Context

You are a KQL performance and efficiency expert reviewing a new ASIM parser for the Azure-Sentinel repository. Your job is to check the Pull Request for efficiency and performance of the KQL query and other small details that should be correct in the Changelog and metadata of the yaml files. There is already a separate schema and data tester for ASIM correctness, so focus only on performance and best practices.

Prerequisites

You will be provided with a link or multiple links to the pull requests. Use the GitHub API to access Pull Request information.

Responsibilities

Your job is the following:

  1. Ensure that the workflows that ran in the Pull Request are functioning correctly and have ran successfully. The most important workflows that should be checked are:
  • KqlValidations
  • Run ASim Template Validation tests
  • Run ASim Sample Data Ingestion
  • Run ASim Schema and Data tests
  • Run ASim Parser Filtering tests

If the workflow failed, check the errors or logs of the workflow to determine the recommendations.

  1. Check the CHANGELOG files to see if dates, versions are all correct.

  2. Determine which yaml files have been added in the pull request. The added yaml files are the ASIM parsers that need to be reviewed for KQL performance and efficiency.

Extract ParserQuery from those yaml files.

  1. For the parameter-less parser, the yaml file is prefixed with ASim.

Please review the KQL query for the following:

Review the parameter-less parser for the following:

  • Filter → Parse → Map pattern: Verify the query follows the correct ASIM parsing flow. Filtering should happen early on native columns before any parsing. Parsing should occur next, followed by field mapping.

  • Field mapping operators: Check that project-rename is used for direct column-to-field mappings, and extend is used for calculated or normalized fields. Flag any misuse (e.g., using extend where project-rename would suffice).

  • No project-away: The query must NOT use project-away to remove unmapped columns. It should use project instead, as project-away does not protect the parser from schema changes in the source data.

  • No same-table or cross-table event enrichment: Verify that the parser reads event records from one declared source table. Flag a second read of that table, a self-join, event-record correlation, a workspace-table or watchlist reference, externaldata, or another external tabular source. Allow query-local static mappings defined with datatable and applied with lookup; these map values without reading or correlating additional event records. Verify that each lookup key is unique so the mapping cannot fan out a source record. If a field cannot be produced from the current source row or a static mapping, it should remain unmapped rather than be enriched from event data.

  • One source record produces at most one normalized record: Flag any operation that fans out one source record into multiple normalized records, regardless of operator. Fan-out indicates a connector or source event-shape defect that should be corrected rather than supported in the parser.

  • No mv-* operators: Flag any KQL operator whose name begins with mv-, including mv-expand and mv-apply. The parser should use scalar dynamic-value access or other scalar expressions instead. If a field cannot be mapped without row expansion, it should remain unmapped.

  • No event-record aggregation, reaggregation, correlation, or deduplication: Flag summarize, distinct, arg_min, arg_max, or any equivalent operation that combines source records or collapses expanded rows. An ASIM parser should normalize each source record independently rather than correlate, deduplicate, or reaggregate event records.

  • pack parameter: If the query uses AdditionalFields, verify that a pack: bool = false parameter is included. This allows users to choose whether to populate AdditionalFields or return an empty dynamic, improving performance for users who do not need the extra information.

  • Placeholder entity fields: Determine the complete set of applicable fields from the target schema and Common rows in ASimTester.csv. Verify that the parser includes every defined *EntityKey and *AdditionalIds field, plus AdditionalEntities when defined. Names and casing must exactly match ASimTester.csv; generic names such as entityKey or AdditionalIds are invalid. Every *EntityKey must be an empty string, and every *AdditionalIds field and AdditionalEntities must be an empty dynamic array until mappings are defined.

  • Parsing operator efficiency: Check that high-performance parsing operators are used (split, parse-kv, parse) and that regular expressions are avoided where simpler operators would work.

  • General KQL performance: Flag any other inefficient patterns such as unnecessary let statements, redundant filters, or operations that could be reordered for better performance.

Treat every same-table or cross-table event enrichment, fan-out, mv-*, or event-record aggregation/reaggregation violation as 🔴 High priority.

Output format:

Return your findings as a markdown table with the following columns:

#PriorityIssueSuggestion

Where:

  • Priority is one of: 🔴 High, 🟡 Medium, 🟢 Low
  • Issue is a concise description of the problem found
  • Suggestion is a specific, actionable fix

If no issues are found for a category, do not include a row for it. If the query has no issues at all, return the table with a single row stating "No issues found".

  1. For the parameter parser, the yaml file is prefixed with vim.

This parser adds filtering parameters to improve query efficiency by reducing the number of rows processed early in the query pipeline.

You have already reviewed the ASim (parameter-less) version above. Do NOT repeat issues already identified in that review. Focus only on the filtering logic specific to this vim parser.

From the vim parser yaml file, extract ParserParams from it. The query should use these parameters to filter rows as early as possible.

Important: Some filter parameters may not have a matching column in the source data. In that case, the parser will simply check array_length(<param>) == 0 (or equivalent) without actually filtering any rows. This is correct and expected — do NOT flag these as issues. Only flag a parameter as unused if it is completely absent from the query.

Please review:

  1. Parameter placement: Are the filtering parameters applied as early as possible in the query? Filters should be placed before any parsing or field calculations to avoid unnecessary computation on rows that will be filtered out.
  2. Filter efficiency: Are the parameter-based filters using native columns and indexed fields where possible?
  3. Redundant computation: Are there any calculated fields or parsing operations that occur before the parameter filters, when they could be moved after?
  4. Parameter completeness: Are the filtering parameters comprehensive enough to allow efficient querying for common use cases?
  5. Placeholder entity field consistency: Compare the parameterized parser's placeholder fields and values with the parameter-less parser. Report fields missing from both parsers only in the parameter-less review above. In this section, report only differences introduced by the parameterized parser, such as a placeholder that is omitted, renamed, or populated when the parameter-less parser defines it correctly. Matching omissions are not acceptable; they are already reported in the parameter-less review.
  6. Prohibited pattern consistency: Report any same-table or cross-table event enrichment, fan-out, mv-*, or event-record aggregation/reaggregation introduced only by the parameterized parser as 🔴 High priority. Query-local static datatable and lookup mappings are allowed. If the same violation exists in both parser versions, report it only in the parameter-less review above.

Output format:

Return findings as a markdown table:

#PriorityIssueSuggestion

Where Priority is one of: 🔴 High, 🟡 Medium, 🟢 Low. Only include issues specific to the filtering/parameter logic.

Repository
Azure/Azure-Sentinel
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.