feat(primitive): implement filecorrelation module #105

Closed
opened 2026-05-31 17:19:39 +02:00 by michael · 0 comments
Owner

Goal

Implement the filecorrelation primitive as a DAW module.

Primitive ID: daw.fragjan.check.filecorrelation
Module name: fragjan-check-filecorrelation
Repo (planned): DAW/daw-modul-fragjan-check-filecorrelation

Spec

primitive: daw.fragjan.check.filecorrelation
if_match: "pattern"        # trigger: is file relevant?
must_match: "pattern"      # optional: must also be present
must_not_match: "pattern"  # optional: must not be present
skip_comments: true

At least one of must_match / must_not_match required.

Semantics: all patterns are file-level (anywhere in file, not line-level).

Acceptance Criteria

  • Module implemented (init.lua, module.conf)
  • if_match with no match returns skip
  • must_match missing returns finding
  • must_not_match present returns finding
  • skip_comments works consistently
  • At least one rule uses it (e.g. updated no-raw-sha256-popen)
  • Tested against known cases
## Goal Implement the `filecorrelation` primitive as a DAW module. Primitive ID: `daw.fragjan.check.filecorrelation` Module name: `fragjan-check-filecorrelation` Repo (planned): `DAW/daw-modul-fragjan-check-filecorrelation` ## Spec ```yaml primitive: daw.fragjan.check.filecorrelation if_match: "pattern" # trigger: is file relevant? must_match: "pattern" # optional: must also be present must_not_match: "pattern" # optional: must not be present skip_comments: true ``` At least one of `must_match` / `must_not_match` required. Semantics: all patterns are file-level (anywhere in file, not line-level). ## Acceptance Criteria - [ ] Module implemented (`init.lua`, `module.conf`) - [ ] `if_match` with no match returns `skip` - [ ] `must_match` missing returns finding - [ ] `must_not_match` present returns finding - [ ] `skip_comments` works consistently - [ ] At least one rule uses it (e.g. updated `no-raw-sha256-popen`) - [ ] Tested against known cases ## Related - DAW/fragjan#78 -- correlation primitive (spec origin)
michael added this to the Basic Version milestone 2026-06-01 13:37:19 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#105
No description provided.