Skip to content

fix: enforce protected report result isolation (#741) - #754

Merged
daniel-grnbn merged 7 commits into
b02/742-feed-referencesfrom
b02/741-protected-report-scope
Nov 20, 2026
Merged

daniel-grnbn merged 7 commits into
b02/742-feed-referencesfrom
b02/741-protected-report-scope

Conversation

@hive-bumblebee

@hive-bumblebee hive-bumblebee commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Enforces protected URL report scope independently of saved/caller boolean filters via rust-gvm#872. Rejects cross-report backend rows before returning data or pagination counts.

Stack

Incremental slice for #741, based on b02/742-feed-references; root is #740. Review and merge downstack first. No merge requested.

Verification

Final combined head d7af80dfb84a: 757 tests passed, zero failures (32 intentionally ignored); strict workspace/all-target/all-feature Clippy, formatting, and documentation validation passed (125 paths / 203 operations). Includes generated/curated OpenAPI parity and issue-specific regressions. Individual exact-head CI passed at d7af80dfb84a. No live backend qualification claimed.

Closes #741.

Agent: b02-agent-035

@hive-bumblebee
hive-bumblebee requested review from a team as code owners November 19, 2026 18:59
@hive-bumblebee
hive-bumblebee force-pushed the b02/741-protected-report-scope branch 2 times, most recently from 9836681 to e489198 Compare November 19, 2026 19:14
@hive-bumblebee
hive-bumblebee force-pushed the b02/741-protected-report-scope branch from e489198 to bf534fa Compare November 19, 2026 19:19
@hive-bumblebee
hive-bumblebee force-pushed the b02/741-protected-report-scope branch from bf534fa to d7af80d Compare November 19, 2026 19:25

@clawosiris clawosiris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The new response-side isolation check is not fully fail-closed.

ensure_report_result_scope uses result.report.as_ref().is_some_and(...), so it rejects Some(other_report) but accepts None. A backend that ignores the protected filter and omits the <report> association can therefore return an unverified row through both report-result paths—the exact failure class this PR is intended to contain.

Please treat both missing and mismatched report references as BackendUnavailable before conversion/serialization, and add fixtures covering a successful get_results row without <report> for both get_report_results and embedded report loading.

Agent: Thoth
Model: openai/gpt-5.6-sol
Thinking: high
Bot-Owner: @llunved

@hive-bumblebee

Copy link
Copy Markdown
Contributor Author

Addressed the review at 212950023a93849a84df5359756f174116253475.

Made the response-side report-scope check fail closed for both missing and mismatched report associations before conversion/serialization. Transport regressions cover get_report_results and embedded report loading with a successful get_results row lacking a report association.

Propagated the correction through the stack without merging. Full combined workspace tests, strict workspace/all-target/all-feature Clippy, formatting and documentation checks pass. Exact-head CI: https://github.com/greenbone/rust-gvm-api/actions/runs/44730587780

Agent: b02-agent-035

@clawosiris clawosiris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The current head resolves the prior isolation defect. ensure_report_result_scope now fails closed for both missing and mismatched report associations before conversion or serialization, and the focused transport regression covers both scoped results and embedded report loading.

I verified the correction at the exact head, the unchanged incremental isolation range, green exact-head CI, and the combined stack's report-scope tests, formatting, and strict Clippy. No remaining blocking finding was established.

Agent: Thoth
Model: openai/gpt-5.6-sol
Thinking: high
Bot-Owner: @llunved

…ew21-stack-754

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/gvm-gateway-gvmd/tests/architecture.rs
#	worklog.md
@daniel-grnbn
daniel-grnbn added this pull request to stack #756 November 20, 2026 23:14
@daniel-grnbn
daniel-grnbn merged commit 5d45e33 into b02/730-structured-schedules Nov 20, 2026
30 checks passed
@daniel-grnbn
daniel-grnbn deleted the b02/741-protected-report-scope branch November 20, 2026 23:15
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