Skip to content

[ASIM] Add AWS CloudTrail parser validation exceptions - #15887

Merged
hunngu-ms merged 2 commits into
Azure:masterfrom
hunngu-ms:hunngu-microsoft-asim-aws-wrapper-classification
Dec 4, 2026
Merged

hunngu-ms merged 2 commits into
Azure:masterfrom
hunngu-ms:hunngu-microsoft-asim-aws-wrapper-classification

Conversation

@hunngu-ms

@hunngu-ms hunngu-ms commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 2da1a3a466654e3c4e2aa928613bd92ecfe4320f

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Two exact filename/schema exceptions; all 81 offline routing and filtering tests pass.
↑ Coverage preserves the AuditEvent EC2 source children, schema roots, four ProcessEvent entries, other source parsers, and both vim counterparts.
↓ UserManagement intentionally bypasses shared parser checks; no live workflow rerun establishes its schema/data validity.
Diagnosis confidence 9.5/10 ↑ The inspected AuditEvent traceback matches the missing nested-unifier classification and its failing-then-passing regression.
↑ Inspected UserManagement source reads AWSCloudTrail and unions two local functions; its requested skip is explicit, not an assertion that it is an external nested unifier.
Evidence fit 8.5/10 ↑ Inspected run 47409996494 at ba5faf7 identifies ASimAuditEventAWSCloudTrail.yaml immediately before the traceback.
↓ The UserManagement exception bypasses rather than repairs fixture resolution; parser validity and the complete workflow outcome remain unverified.

Required items, please complete

Change(s):

  • Add exactly ASimAuditEventAWSCloudTrail.yaml under AuditEvent and ASimUserManagementAWSCloudTrail.yaml under UserManagement in ADDITIONAL_UNION_PARSERS in .script/tests/asimParsersTest/asim_parser_file_utils.py.
  • Add four focused regression tests in .script/tests/asimParsersTest/tests/test_asim_parser_template_routing.py: exact AuditEvent wrapper matching, the exact UserManagement classification exception, EC2 source children remaining source parsers, and existing classification behavior including the four ProcessEvent entries. Neither vim counterpart nor similarly named source parsers receives an exception.
  • Leave source-fixture resolution, parser YAML/ARM, fixtures, workflows, exclusions, agents, and skills unchanged.

Reason for Change(s):

  • Run 47409996494 attempts source-specific sample selection for the genuine nested AuditEvent AWS CloudTrail unifier and fails with ValueError: Cannot resolve union source tables safely for source-specific sample selection.
  • ASimUserManagementAWSCloudTrail is different: it is a genuine source parser that reads AWSCloudTrail and unions its two local functions, ParseIAMEvents and ParseCognitoEvents. At the user's explicit request, classify this exact filename as an additional exception. This does not make it an external nested-unifier wrapper.
  • The shared classification helper is used by template validation, sample ingestion, and filtering. Both entries intentionally skip their exact ASim files in all three loops; AuditEvent EC2 source children and both vim counterparts keep their previous classifications. The UserManagement exception avoids the resolver path without repairing its handling of internal function-call unions. It does not prove that this source parser passes schema/data validation, and this PR does not claim that the entire workflow is green.
  • This is a separate tooling PR against master, not stacked on #15874, which is unchanged. This tooling PR must land in master, then the parser PR's trusted base must be refreshed before its workflow can consume these entries.

Version Updated:

  • N/A: shared Python validation tooling and tests only; no detection or solution content changes.

Testing Completed:

  • Before the original AuditEvent production change: python -B -m unittest discover -s .script\tests\asimParsersTest\tests -p test_asim_parser_template_routing.py -k QueryTimeUnionParserClassificationTests -v — expected failure: 1 AuditEvent wrapper-classification failure, 2 tests passed.
  • After adding the UserManagement regression but before its mapping entry: python -B -m unittest discover -s .script\tests\asimParsersTest\tests -p test_asim_parser_template_routing.py -k QueryTimeUnionParserClassificationTests -v — expected failure: 1 UserManagement classification failure, 3 tests passed.
  • $env:ASIM_CANARY_WORKSPACE_ID = 'unit-test-workspace'; python -B -m unittest discover -s .script\tests\asimParsersTest\tests -p test_asim_parser_template_routing.py — passed, 63 tests including all four classification regressions. The dummy value is process-local; workspace connections are mocked.
  • python -B -m unittest discover -s .script\tests\asimParsersTest -p test_asim_filtering_validator.py — passed, 18 tests.
  • git --no-pager diff --check — passed.
  • Historical initial routing command without the mocked-workspace prerequisite, python -B -m unittest discover -s .script\tests\asimParsersTest\tests -p test_asim_parser_template_routing.py -v, failed with 3 subtest errors because the existing mocked routing test requires ASIM_CANARY_WORKSPACE_ID. No unrelated test implementation was changed.

Checked that the validations are passing and have addressed any issues that are present:

  • The two relevant offline regression suites pass with the existing routing suite's mocked-workspace prerequisite. The UserManagement change is a deliberate classification/validation-skip exception, not a fixture-discovery fix.
  • No Azure operations were performed. Full live workflow, KQL validation, and YAML validation were not run for this Python-only change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hunngu-ms
hunngu-ms requested review from a team as code owners December 4, 2026 21:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hunngu-ms hunngu-ms changed the title [ASIM] Classify AWS CloudTrail AuditEvent wrapper as a unifier [ASIM] Add AWS CloudTrail parser validation exceptions Dec 4, 2026
@hunngu-ms
hunngu-ms merged commit 66b2716 into Azure:master Dec 4, 2026
24 checks passed
hunngu-ms added a commit that referenced this pull request Dec 4, 2026
Include the merged #15887 tooling changes without changing parser feature content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants