Only include published evidence when export scope is published - #99
Open
caitmich wants to merge 7 commits into
Open
Only include published evidence when export scope is published#99caitmich wants to merge 7 commits into
caitmich wants to merge 7 commits into
Conversation
Open
2 tasks
etdsoft
reviewed
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exporter#nodesand the default template'sissue.evidence_by_nodecall both readissue.evidence/an unscoped evidence association directly, bypassing the Published/All export scope thatcontent_service.all_issuesalready respects. A Published-scope export could still leak Draft/Ready-for-review Evidence content into the exported HTML.Exporter#nodesnow derives its node list fromcontent_service.all_evidenceinstead of unscoped evidence reachable fromissues.templates/default_dradis_template_v3.0.html.erb) now callsissue.evidence_by_node(scope)directly.scopeis theDradis::Plugins::Export::Baseaccessor already set from the export's:published/:allscope at initialization — no separate exporter-level helper is needed, since it would just wrapIssue#evidence_by_nodeunder the same name.Issue#evidence_by_nodeto accept ascopeargument — see dradis-ce PR #1684 (and its Pro sync, dradis-pro #2939).dradis-pluginsgem changes (PR #127, branchfeature/evidence-content-service-scope) forall_evidence— needs a realdradis-pluginsrelease + Gemfile bump before this merges.Part of the same review-comment follow-up as
qa/add-evidence-review-state(Evidence now has an independent Draft/Ready for review/Published state).Testing Steps
From the Dradis Pro app directory, with this gem checked out at a sibling path, temporarily point the Gemfile at this branch/path and run:
Assert all examples pass, confirming the
evidence scopecontext: a Published-scope export includes only Published evidence content, an All-scope export includes both Published and Draft evidence content.Check List