Skip to content

feat: ruleset learns pod name and container image name - #430

Open
biscout42 wants to merge 3 commits into
feat-container-event-scopefrom
feat-rule-learns-podname-and-containerimage
Open

biscout42 wants to merge 3 commits into
feat-container-event-scopefrom
feat-rule-learns-podname-and-containerimage

Conversation

@biscout42

Copy link
Copy Markdown
Contributor

No description provided.

@biscout42
biscout42 added this pull request to stack #384 September 17, 2026 10:30
@biscout42
biscout42 marked this pull request as ready for review September 17, 2026 10:55
@biscout42
biscout42 requested a review from a team as a code owner September 17, 2026 10:55
nicholasberlin
nicholasberlin previously approved these changes Sep 17, 2026

@nicholasberlin nicholasberlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bot had no issues, and neither do I.

christos68k
christos68k previously approved these changes Sep 17, 2026

@christos68k christos68k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

biscout42 and others added 3 commits September 21, 2026 10:32
pod.name matches the Kubernetes pod name of the process container and
accepts the single * wildcard used by process.exe and file.path, as in
pod.name nginx-*. container.image.name matches the image name of the
process container exactly, the image name being the last path component
of the image without registry and tag.

Both fields walk the container link established by link_container_data,
which already runs before the ruleset match. A process without a linked
container, a container without a pod, or missing metadata matches
neither. The nova backend rejects both with ENOTSUP like event.scope.

The wildcard split in quark_rule_match_field is moved into wild_init so
the three wildcard fields and the exact-match field share it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Rename the rule field to container.image. The field matches the image
string that the runtime reports, with registry and tag. The field
accepts one * wildcard, like the other string fields.

Remove the strcmp match and the allow_star flag. Use path_match for
all string fields.

Create the test container through quark_container_create. Do not set
image_name and do not link the process by hand in the test helper.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@biscout42
biscout42 force-pushed the feat-rule-learns-podname-and-containerimage branch from 7feeecb to 0d3ab0d Compare September 21, 2026 08:32

This branch has not been deployed

No deployments
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.

3 participants