Skip to content

feat(defect_dojo): make apply_tags_to_findings a configurable import-…#7

Open
slManuel wants to merge 2 commits into
trunkfrom
feature/apply-tags-to-findings-configurable
Open

feat(defect_dojo): make apply_tags_to_findings a configurable import-…#7
slManuel wants to merge 2 commits into
trunkfrom
feature/apply-tags-to-findings-configurable

Conversation

@slManuel

@slManuel slManuel commented Jul 6, 2026

Copy link
Copy Markdown
Owner

…scan parameter

apply_tags_to_findings was hardcoded to "true" in the import scan driver adapter, forcing the behavior on every consumer. Following the existing configuration pattern (REIMPORT_SCAN, GET_EXACT_PRODUCT), it is now a proper parameter of the import-scan request:

  • add apply_tags_to_findings to ImportScanRequest (default False)
  • expose it in ImportScanSerializer (Bool, load_default=False)
  • read it from the remote config (DEFECT_DOJO.APPLY_TAGS_TO_FINDINGS) with a safe default so consumers without the key are unaffected
  • the driver adapter serializes request.apply_tags_to_findings instead of the literal "true"

Defaults to false to preserve behavior for consumers that do not opt in; set APPLY_TAGS_TO_FINDINGS: true in the remote config to enable it.

Description

Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.

Fix

How does someone fix the issue in code and/or in runtime?

Checklist:

  • The pull request is complete according to the guide of contributing of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

…scan parameter

apply_tags_to_findings was hardcoded to "true" in the import scan driver
adapter, forcing the behavior on every consumer. Following the existing
configuration pattern (REIMPORT_SCAN, GET_EXACT_PRODUCT), it is now a proper
parameter of the import-scan request:

- add apply_tags_to_findings to ImportScanRequest (default False)
- expose it in ImportScanSerializer (Bool, load_default=False)
- read it from the remote config (DEFECT_DOJO.APPLY_TAGS_TO_FINDINGS) with a
  safe default so consumers without the key are unaffected
- the driver adapter serializes request.apply_tags_to_findings instead of the
  literal "true"

Defaults to false to preserve behavior for consumers that do not opt in; set
APPLY_TAGS_TO_FINDINGS: true in the remote config to enable it.
Add the new DEFECT_DOJO.APPLY_TAGS_TO_FINDINGS flag to the example remote
config (example_remote_config_local) and the engine_core module docs (JSON
examples + parameter reference), alongside REIMPORT_SCAN. Defaults to false.
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.

1 participant