Repository navigation
fix: rules without detection logic never trigger - #359
Merged
Sanjay Singh (san360) merged 1 commit intoNov 3, 2026
Merged
Sanjay Singh (san360) merged 1 commit into
Sanjay Singh (san360) merged 1 commit into
Conversation
A rule with no detect block, or a detect block with neither match: nor check:, ran as match-all and triggered on every request, contradicting the comment in parsePipeline. executePipeline now returns an empty emission for such a pipeline. Part of microsoft#344
github-actions
Bot
requested review from
TamasBoncz,
Aymen (aymenfurter) and
Sanjay Singh (san360)
November 1, 2026 15:20
Sanjay Singh (san360)
approved these changes
Nov 3, 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.
Description
Part of #344 (first bullet). A rule with no
detectblock, an empty one, or one withoutmatch:orcheck:ran as match-all:executePipelinefalls back to() => trueandcheckPipelineTriggerfires on any match, so Test Rule and detection reported TRIGGERED for every request. This contradicts the comment inparsePipeline("default pipeline that never triggers").executePipelinenow returns an empty emission when the pipeline has neithermatchExprnorcheckExpr. Rules with onlymatch:or onlycheck:behave as before, and every built-in rule has one of the two.Not covered here: applying
# Filter/# Trigger/metric:andextends:inheritance of detection logic, which the issue also lists.Related Issues
Part of #344 (first bullet only; the issue stays open for the rest)
Checklist
src/core/rule-pipeline.test.ts(fails on main, passes with the fix)npm run checknot run in full; the rule-pipeline, rule-engine, rule-equivalence, antipatterns-e2e and rule-loader suites pass (120 tests)This change was prepared with Claude (an AI agent) and submitted on Alex's behalf.