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

Fix: allow/deny hosts. #1420

Merged
merged 2 commits into from
May 15, 2023
Merged

Fix: allow/deny hosts. #1420

merged 2 commits into from
May 15, 2023

Conversation

jjnicola
Copy link
Member

What:
Fix: allow/deny hosts.
Jira SC-837

Why:
This PR fix an issue which produces the scan to be interrupted, because the denied hosts are not removed from the hosts list, and the final host count doesn't match with the amount of alive hosts. This ends with an interrupted scan produced by a wrong scan progress calculation.

These fix depends on PR greenbone/gvm-libs#771. However, it is not a breaking change, since a pre-processor directive check for a flag. Without an updated gvm-libs behaves as before and uses the feature (the fix) if enabled.

How:
Set a allow/deny hosts for a user and run a scan with a target which includes the allow/deny hosts.
Also, check with the scanner only settings (openvas.conf) sys_hosts_deny and sys_hosts_allow

Checklist:

  • Tests
  • PR merge commit message adjusted

@jjnicola jjnicola requested a review from a team as a code owner May 11, 2023 10:33
@jjnicola jjnicola enabled auto-merge (squash) May 11, 2023 10:33
@jjnicola jjnicola added the minor_release creates a minor release label May 11, 2023
This PR fix an issue which produces the scan to be interrupted, because the denied hosts are not removed from the hosts list, and the final host count doesn't match with the amount of alive hosts. This ends with an interrupted scan produced by a wrong scan progress calculation.

These fix depends on PR greenbone/gvm-libs#771. However, it is not a breaking change, since a pre-processor directive check for a flag. Without an updated gvm-libs behaves as before and uses the feature (the fix) if enabled.

Jira SC-837
@Kraemii
Copy link
Member

Kraemii commented May 12, 2023

With the small change, everything works, as expected

Co-authored-by: Christoph Krämer <c.kraemer.rulle@web.de>
@jjnicola jjnicola merged commit c4ca804 into main May 15, 2023
@jjnicola jjnicola deleted the allowed-hosts branch May 15, 2023 08:43
Kraemii pushed a commit that referenced this pull request May 23, 2023
This PR fix an issue which produces the scan to be interrupted, because the denied hosts are not removed from the hosts list, and the final host count doesn't match with the amount of alive hosts. This ends with an interrupted scan produced by a wrong scan progress calculation.

These fix depends on PR greenbone/gvm-libs#771. However, it is not a breaking change, since a pre-processor directive check for a flag. Without an updated gvm-libs behaves as before and uses the feature (the fix) if enabled.

Jira SC-837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor_release creates a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants