Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more nmap options to network discovery #64

Merged
merged 13 commits into from
Mar 13, 2025

Conversation

leoparente
Copy link
Contributor

@leoparente leoparente commented Mar 11, 2025

This pull request introduces several enhancements and new features to the network discovery functionality. The changes include updates to configuration parameters, improvements to the policy runner, and new tests to ensure the functionality works as expected.

Configuration Enhancements:

  • Added new configuration parameters such as Ports, ExcludePorts, Timing, FastMode, PingScan, TopPorts, ScanTypes, and MaxRetries to the Scope struct in network-discovery/config/config.go.

Policy Runner Improvements:

  • Updated the run method in network-discovery/policy/runner.go to handle the new configuration parameters and apply them to the nmap scanner options. This includes logic for handling different scan types, timing templates, and other scanning options.

Testing Enhancements:

  • Added a new test function TestRunnerWithOptions in network-discovery/policy/runner_test.go to cover various combinations of the new configuration parameters and ensure they are correctly applied in the policy runner.

Documentation Updates:

  • Updated the network-discovery/README.md file to document the new configuration parameters and their usage.

Workflow Improvements:

  • Modified the .github/workflows/network-discovery-tests.yaml file to include a command that sets the necessary capabilities for nmap to run with elevated privileges.

@leoparente leoparente self-assigned this Mar 11, 2025
Copy link

github-actions bot commented Mar 11, 2025

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 1.01s github.com/netboxlabs/orb-discovery/network-discovery/config 100.0% 8 0 0
🟢 PASS 8.47s github.com/netboxlabs/orb-discovery/network-discovery/policy 89.0% 15 0 0
🟢 PASS 1.03s github.com/netboxlabs/orb-discovery/network-discovery/server 83.6% 8 0 0
🟢 PASS 1.01s github.com/netboxlabs/orb-discovery/network-discovery/version 100.0% 1 0 0

Total coverage: 88.3%

@leoparente leoparente marked this pull request as ready for review March 12, 2025 20:00
@leoparente leoparente merged commit b36e04c into develop Mar 13, 2025
6 checks passed
@leoparente leoparente deleted the feat/OBS-820-network-discovery-enhancements branch March 13, 2025 16:18
Copy link

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants