Skip to content

Add: Add target source support. - #1406

Merged
greenbonebot merged 1 commit into
mainfrom
support-source-for-targets
Nov 20, 2026
Merged

greenbonebot merged 1 commit into
mainfrom
support-source-for-targets

Conversation

@a-h-abdelsalam

Copy link
Copy Markdown
Contributor

What

Support optional source on target creation and modification

Why

Required for matching discovered computer objects against existing targets.

References

GEA-2214

Checklist

  • I have added tests for the changes
  • I have used the following LLMs/AI tools in this pull request: Codex/GPT-6.1 Sol

@a-h-abdelsalam
a-h-abdelsalam requested a review from a team as a code owner November 19, 2026 14:53
@greenbonebot
greenbonebot enabled auto-merge (rebase) November 19, 2026 14:53
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA a1cd64f.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@github-actions

Copy link
Copy Markdown

Conventional Commits Report

Type Number
Added 1

🚀 Conventional commits found.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (3723672) to head (a1cd64f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1406   +/-   ##
=======================================
  Coverage   98.52%   98.53%           
=======================================
  Files         107      107           
  Lines        7072     7091   +19     
  Branches     1306     1310    +4     
=======================================
+ Hits         6968     6987   +19     
  Misses         74       74           
  Partials       30       30           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the optional target-source changes.

No open issues 🎉

What changed in this PR

Adds optional target-source support to GMP Next target creation and modification, enabling discovered computer objects to be matched against existing targets.

Changes:

  • Introduces TargetSource with manual and active_directory values and exposes the optional source parameter.
  • Adds tests for source serialization, omission, validation, and mixed-case input.
  • Documents the new enum in the GMP Next API reference.
File Description
tests/​protocols/​gmpnext/​entities/​targets/​test_modify_target.py Adds source-handling tests for target modification.
tests/​protocols/​gmpnext/​entities/​targets/​test_create_target.py Adds source-handling tests for target creation.
gvm/​protocols/​gmp/​requests/​next/​_targets.py Defines TargetSource and adds source handling to XML requests.
gvm/​protocols/​gmp/​requests/​next/​__init__.py Exports TargetSource.
gvm/​protocols/​gmp/​_gmpnext.py Exposes and forwards the optional source parameter.
docs/​api/​gmpnext.md Adds API documentation for TargetSource.

Review effort: Balanced

@greenbonebot
greenbonebot merged commit 759d348 into main Nov 20, 2026
27 checks passed
@greenbonebot
greenbonebot deleted the support-source-for-targets branch November 20, 2026 10:03
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.

4 participants