Skip to content

fix(compliance): add SCOPED_REQUESTS entries for test_results - #1243

Merged
chris1984 merged 1 commit into
theforeman:developfrom
romanblanco:RHINENG-28489-tag-filtering-show
Sep 16, 2026
Merged

chris1984 merged 1 commit into
theforeman:developfrom
romanblanco:RHINENG-28489-tag-filtering-show

Conversation

@romanblanco

Copy link
Copy Markdown
Contributor

Without explicit entries, test_results endpoints fall through to the catch-all (api/compliance/v2/.*) which has no tag_name. Foreman won't append ?tags= to forwarded requests, so test results are returned unscoped — any workspace can see any test result regardless of RBAC tag assignments.

Add list and show entries with tag_name: :tags before the catch-all, matching the existing pattern for report systems.

@romanblanco
romanblanco force-pushed the RHINENG-28489-tag-filtering-show branch from cf9313c to 182aa54 Compare August 11, 2026 08:08

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ColeHiggins2 ColeHiggins2 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.

Looks good to me

@nofaralfasi nofaralfasi 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.

LGTM.
Non-blocking suggestion: add forward_request tests for the two new compliance test_results endpoints to explicitly assert :tags is present in forwarded params (similar to existing vulnerability forwarding tests).

@romanblanco

Copy link
Copy Markdown
Contributor Author

@ColeHiggins2 can we get this merged?

Without explicit entries, test_results endpoints fall through to the
catch-all (api/compliance/v2/.*) which has no tag_name. Foreman won't
append ?tags= to forwarded requests, so test results are returned
unscoped — any workspace can see any test result regardless of RBAC
tag assignments.

Add list and show entries with tag_name: :tags before the catch-all,
matching the existing pattern for report systems.

Signed-off-by: Roman Blanco <rblanco@redhat.com>
@romanblanco
romanblanco force-pushed the RHINENG-28489-tag-filtering-show branch from 182aa54 to 0555ce5 Compare September 11, 2026 09:35
@chris1984

Copy link
Copy Markdown
Member

@ColeHiggins2 can we get this merged?

Will get this merged today

@chris1984
chris1984 merged commit 6615628 into theforeman:develop Sep 16, 2026
18 checks passed
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.

5 participants