validate.py: flag MITRE trigger fields that release rejects on the NG-SIEM trigger - #36
Merged
Merged
Conversation
trigger discovery (search_triggers, surfaced by trigger_search.py --fields) advertises Trigger.Detection.MitreAttack.Tactic and .Technique on the Investigatable/NGSIEM trigger, but the release validator rejects them as unknown variables — they are not on the NG-SIEM trigger payload at release time. Import and validate_only both pass, so a model that follows the tool's own field list ships a workflow that fails only at release. A release-gated eval hit exactly this. The structural tier now flags those two fields when the workflow uses the NG-SIEM trigger (scoped to that event, so EPP/base-Investigatable workflows are untouched), and trigger_search.py --fields marks them "NOT release-valid" so the discovery tool stops steering authors toward them. The message points at sourcing MITRE from the hydrated detection instead. Also folds in a bundle-tooling fix: release.sh --bundle's link check now recognizes a markdown link that carries a #section anchor (](ref.md#heading)), stripping the anchor before resolving so a bundled file referenced only through an anchored link is not silently dropped. Verified: catches the real detection-summary-email workflow that failed release on both MITRE refs; 545 tests pass including four new cases (guard fires on NG-SIEM, stays silent on EPP; tool annotates on NG-SIEM, not elsewhere); pylint 10/10 (max-module-lines 1200 to 1300 for the added guard); release.sh shellcheck-clean and the anchored-link resolver proven on a fixture.
prvn
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trigger discovery —
search_triggers, surfaced bytrigger_search.py --fields— advertisesTrigger.Detection.MitreAttack.Tacticand.Techniqueon theInvestigatable/NGSIEMtrigger, but the release validator rejects them as unknown variables. They are not on the NG-SIEM trigger payload at release time. Import andvalidate_onlyboth pass, so a model that follows the tool's own field list produces a workflow that fails only at release.Two coordinated changes:
validate.pynow flagsTrigger.Detection.MitreAttack.Tactic/.Techniquewhen the workflow uses the NG-SIEM trigger. It is scoped to that event (the existing NG-SIEM guard early-returns for other triggers), so EPP and base-Investigatableworkflows — which may legitimately carry these — are untouched. The message points at sourcing MITRE from the hydrated detection instead.trigger_search.py --fieldsmarks those two fields "NOT release-valid" so the discovery tool stops steering authors toward a field that fails at release — fixing the root cause, not just catching it after.This follows the same evidence-based pattern as the other NG-SIEM release-only guards (
Trigger.Detection.Product/Description, theTrigger.Category.Investigatable.*namespace, the list-vs-string CEL guard).Also folds in a small bundle-tooling fix:
release.sh --bundle's link check now recognizes a markdown link that carries a#sectionanchor (](ref.md#heading)), stripping the anchor before resolving so a bundled file referenced only through an anchored link cannot be silently dropped from the archive.Verification: catches the real workflow that failed a release-gated eval on both MITRE references; 545 tests pass including four new cases (guard fires on the NG-SIEM trigger, stays silent on EPP; the tool annotates on NG-SIEM, not on other categories); pylint 10/10 (
max-module-lines1200 → 1300 to fit the guard);release.shis shellcheck-clean and the anchored-link resolver is proven on a fixture (ref.md#headingresolves, a genuinely missing target is still reported).