Skip to content

Support active directory searches - #1405

Merged
greenbonebot merged 3 commits into
mainfrom
support-active-directory-searches
Nov 19, 2026
Merged

greenbonebot merged 3 commits into
mainfrom
support-active-directory-searches

Conversation

@a-h-abdelsalam

Copy link
Copy Markdown
Contributor

What

Added support for searching Active Directory objects.
Support TLS mode enums when creating, modifying or verifying AD credentials .

Why

Required for Active Directory integration.

References

GEA-2105

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 18, 2026 10:37
@github-actions

github-actions Bot commented Nov 18, 2026 •

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 1de5403.
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

@greenbonebot
greenbonebot enabled auto-merge (rebase) November 18, 2026 10:38
@github-actions

Copy link
Copy Markdown

Conventional Commits Report

Type Number
Changed 1
Added 1

🚀 Conventional commits found.

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.52%. Comparing base (c9df336) to head (1de5403).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1405      +/-   ##
==========================================
+ Coverage   98.51%   98.52%   +0.01%     
==========================================
  Files         106      107       +1     
  Lines        6993     7072      +79     
  Branches     1288     1306      +18     
==========================================
+ Hits         6889     6968      +79     
  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.

🟡 Changes recommended

Invalid TLS strings lose InvalidArgument metadata in three credential methods, breaking callers that rely on it for field-specific error handling.

1 open issue
What changed in this PR

Adds Active Directory object searches to GMPNext and TLS-mode enum support to existing credential operations, extending the client’s Active Directory integration.

Changes:

  • Adds configurable searches using saved credentials, with filtering, result limits, and optional target/task details.
  • Supports TLS-mode enums when creating, modifying, and verifying credentials; rejects boolean port values.
  • Adds API documentation and tests for serialization, validation, and enum conversion.
File Description
tests/​protocols/​gmpnext/​enums/​test_active_directory_tls_mode.py Tests TLS-mode enum conversion.
tests/​protocols/​gmpnext/​enums/​test_active_directory_search_scope.py Tests search-scope enum conversion.
tests/​protocols/​gmpnext/​enums/​test_active_directory_object_type.py Tests object-type enum conversion.
tests/​protocols/​gmpnext/​entities/​test_active_directory.py Registers the directory-search test case.
tests/​protocols/​gmpnext/​entities/​credentials/​test_verify_active_directory_credential.py Tests TLS enums and boolean port rejection during verification.
tests/​protocols/​gmpnext/​entities/​credentials/​test_modify_active_directory_credential.py Tests TLS enums and boolean port rejection during modification.
tests/​protocols/​gmpnext/​entities/​credentials/​test_create_active_directory_credential.py Tests TLS enums and boolean port rejection during creation.
tests/​protocols/​gmpnext/​entities/​active_directory/​test_get_active_directory_objects.py Tests search request serialization and validation.
tests/​protocols/​gmpnext/​entities/​active_directory/​__init__.py Exports the search test mixin.
gvm/​protocols/​gmp/​requests/​next/​_credentials.py Adds TLS-mode enum support and stricter port validation.
gvm/​protocols/​gmp/​requests/​next/​_active_directory.py Defines search enums, validation, and XML request construction.
gvm/​protocols/​gmp/​requests/​next/​__init__.py Exports the new request builder and enums.
gvm/​protocols/​gmp/​_gmpnext.py Exposes directory searches and updated credential signatures.
docs/​api/​gmpnext.md Documents the new Active Directory enums.

Review effort: Balanced

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

The Active Directory search and TLS-mode support changes have no active review issues.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@greenbonebot
greenbonebot merged commit 3723672 into main Nov 19, 2026
27 checks passed
@greenbonebot
greenbonebot deleted the support-active-directory-searches branch November 19, 2026 10:32
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