Skip to content

test: exercise StackRox AI review on process signals - #4001

Open
robbycochran wants to merge 24 commits into
masterfrom
test/stackrox-ai-review-demo
Open

robbycochran wants to merge 24 commits into
masterfrom
test/stackrox-ai-review-demo

Conversation

@robbycochran

@robbycochran robbycochran commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a demonstration-only Harness PR-review caller using stackrox-ai-review
  • disable CodeRabbit for this temporary review exercise
  • refactor process-signal publication into a shared publisher

This PR is intentionally for review testing and must not be merged. The workflow uses pull_request so the pinned Harness feature revision can be exercised before any production-default-branch rollout.

Validation

@coderabbitai ignore

@robbycochran
robbycochran requested a review from a team as a code owner September 16, 2026 15:52
@robbycochran robbycochran added the stackrox-ai-review Opt in to the StackRox Harness AI review demo label Sep 16, 2026
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c9ff2b2f-5485-4471-8ead-401e3e5b42e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.


std::string ProcessSignalPublisher::ProcessKey(const storage::ProcessSignal& signal) {
std::stringstream key;
key << signal.name() << " " << signal.exec_file_path();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new rate-limiting key is significantly less specific than the one it replaces. It no longer includes the container ID or process arguments. This means that processes with the same name and path but in different containers, or with different arguments, will be treated as identical for rate-limiting purposes. This can lead to the silent dropping of important process signals, causing a loss of security visibility.


namespace collector {

std::string ProcessSignalPublisher::ProcessKey(const storage::ProcessSignal& signal) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new rate-limiting key is less specific than the one it replaces. The old key included the container ID and process arguments. By only using the process name and exec path, the rate limiter may now incorrectly drop signals for distinct processes, such as the same command run with different arguments or in different containers. This could lead to a loss of security visibility.

on:
# Demonstration only. Production should use pull_request_target after the
# trusted caller workflow and review skill are on the default branch.
pull_request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using pull_request is the correct, secure trigger for this workflow. The comment on lines 4-5 suggests using pull_request_target in production, which would create a major security vulnerability. Workflows triggered by pull_request_target can expose secrets to untrusted code from PRs. This pattern should not be adopted, and the comment should be updated to reflect the security implications.

@codecov-commenter

codecov-commenter commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.33333% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.48%. Comparing base (3ebd3cc) to head (dfcfda5).
⚠️ Report is 11 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
collector/lib/ProcessSignalPublisher.cpp 0.00% 17 Missing ⚠️
collector/lib/ProcessSignalHandler.cpp 0.00% 3 Missing ⚠️
collector/lib/ProcessSignalHandler.h 0.00% 0 Missing and 1 partial ⚠️
collector/lib/ProcessSignalPublisher.h 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4001      +/-   ##
==========================================
+ Coverage   27.43%   27.48%   +0.05%     
==========================================
  Files          94       96       +2     
  Lines        5406     5403       -3     
  Branches     2535     2529       -6     
==========================================
+ Hits         1483     1485       +2     
+ Misses       3198     3192       -6     
- Partials      725      726       +1     
Flag Coverage Δ
collector-unit-tests 27.48% <8.33%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.


namespace collector {

std::string ProcessSignalPublisher::ProcessKey(const storage::ProcessSignal& signal) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new rate-limiting key is generated from only the process name and its executable path. The previous implementation also included the container ID and process arguments. This change significantly weakens the uniqueness of the key, causing processes with the same name and path to be incorrectly grouped together for rate-limiting, even if they are in different containers or have different arguments. This could cause legitimate process signals to be dropped, which can mask suspicious activity.


std::string ProcessSignalPublisher::ProcessKey(const storage::ProcessSignal& signal) {
std::stringstream key;
key << signal.name() << " " << signal.exec_file_path();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The rate-limiting key is now generated from only the process name and executable path. The previous implementation also included the container ID and process arguments. This change in the key composition can lead to incorrect rate-limiting behavior. For instance, processes with the same name and path but running in different containers or with different arguments will now be treated as the same by the rate limiter. This could cause important security signals from one process to be dropped because of noise from another, effectively reducing process visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stackrox-ai-review Opt in to the StackRox Harness AI review demo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants