Skip to content

Fixes #40026 - Authorize template revision lookups - #11377

Merged
ofedoren merged 1 commit into
theforeman:developfrom
adamruzicka:cve/2026-81658
Nov 12, 2026
Merged

ofedoren merged 1 commit into
theforeman:developfrom
adamruzicka:cve/2026-81658

Conversation

@adamruzicka

Copy link
Copy Markdown
Contributor

ofedoren
ofedoren previously approved these changes Nov 11, 2026

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

Thanks, @adamruzicka ! Automated review found few places for improvement, but those are mostly nits, so I'd leave it as is and won't complicate it even more.

Rubocop is red though and I guess we can squash it so it's mergable.

@adamruzicka

Copy link
Copy Markdown
Contributor Author

Rubocop is red on azure being down :/

E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/libc/libcap2/libcap-dev_2.66-5ubuntu2.4_amd64.deb  Temporary failure resolving 'azure.archive.ubuntu.com'

CVE-2026-81658

Enforce audit visibility on revisions and history

Introduce Audit.visible, which applies taxonomy scoping before
permission filters so taxed_and_untaxed no longer discards audit
search restrictions in the audits controllers.

Use it for template revision lookups (provisioning templates,
ptables, report templates, both UI and API), returning not_found
when the audit is not visible, and hide the template History tab
from users without view_audit_logs permission.

Secure the previous_revision rendering macro: it now reads
revisions through Audit.visible, so safe mode reports need
view_audit_logs access to each audit and cannot read history from
another tenant.

Deduplicate the revision authorization tests into a shared
concern.

Co-authored-by: Oleh Fedorenko <ofedoren@redhat.com>

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

Thanks, @adamruzicka ! I have nothing to add anymore.

It's unfortunate though this PR got that big :/ Hopefully we will be able to CP this cleanly...

@ofedoren
ofedoren merged commit 2e38bc2 into theforeman:develop Nov 12, 2026
36 checks passed
@adamruzicka
adamruzicka deleted the cve/2026-81658 branch November 12, 2026 19:55
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.

2 participants