Skip to content

Conversation

@Molter73
Copy link
Collaborator

@Molter73 Molter73 commented Nov 6, 2025

Description

This entire PR was vibe coded, a new LSM hook on bprm_check_security is used to capture process execution and sending that information through the process service that collector usually uses.

I've barely tested this by deploying fact in place of collector, it seems to work since I can see new processes being created in the risk tab.

That said, the change itself is terribly implemented, we can probably clean it up or re-write it entirely.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why you did not do so. (Valid reasons include "CI is sufficient" or "No testable changes")
In addition to reviewing your code, reviewers must also review your testing instructions, and make sure they are sufficient.

For more details, ref the Confluence page about this section.

This change introduces the ability to monitor process executions by
adding a new LSM probe attached to `bprm_check_security`. A new event
type, `PROCESS_ACTIVITY_EXEC`, is used to signal these events from the
kernel.

To support activities beyond file operations, the main `Event` struct
has been refactored. It now contains a generic `Activity` enum that can
represent either a file or a process activity. This makes the event
model more extensible for future additions, such as network events.

Additionally, a defensive null check for the `dentry` pointer has been
added in the `submit_event` function to improve robustness.

This entire commit has been vibe coded, took over an hour to get here
with multiple prompts.
The StackRox sensor API consumes events from different gRPC services
depending on their type. This change introduces support for the
`SignalService` to send process-related signals, separating them from
the existing `FileActivityService`.

This involves:
- Compiling the `signal_iservice.proto` definitions.
- Adding a `SignalServiceClient` in the gRPC output module.
- Implementing the conversion from the internal `Event` struct to the
  `v1.Signal` protobuf message.
- Updating the gRPC client to run two concurrent streams, filtering
  and routing file and process events to their respective services.
- Refactoring protobuf conversions to align with upstream API models.

This entire commit was vibe coded, took about 1 hour.
Process events that do not have an associated container ID are
considered noise.

This change filters them out in the main BPF event loop to avoid sending
them downstream, reducing the overall volume of events.

This change was vibe coded.
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.

1 participant