Skip to content

Keep OpenVAS port ranges compact#2232

Open
BharatDeva wants to merge 1 commit into
greenbone:mainfrom
BharatDeva:fix/openvas-port-range-compaction
Open

Keep OpenVAS port ranges compact#2232
BharatDeva wants to merge 1 commit into
greenbone:mainfrom
BharatDeva:fix/openvas-port-range-compaction

Conversation

@BharatDeva

Copy link
Copy Markdown

Summary

This fixes port list generation so OpenVAS keeps explicit ranges compact instead of expanding them into every individual port.

For example, a full TCP range now serializes as T:1-65535, instead of a very large comma-separated list. This avoids producing oversized scan arguments for broad port ranges.

Fixes #2223

Testing

$ cargo test -p greenbone-scanner-framework port
running 2 tests
test models::port::tests::test_port_conversion_to_string ... ok
test models::port::tests::test_port_conversion_keeps_large_ranges_compact ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 59 filtered out
$ cargo fmt --check -p greenbone-scanner-framework
$ git diff --check HEAD~1..HEAD

@BharatDeva BharatDeva requested a review from a team as a code owner June 4, 2026 15:26
@Tehforsch

Copy link
Copy Markdown
Contributor

Hi @BharatDeva thank you for your contribution(s).

Before we merge this, could you please add yourself to the RELICENSE agreement? See https://github.com/greenbone/openvas-scanner/blob/main/README.md#contributing

You can do it in this PR

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.

openvasd expands port ranges into per-port list → nmap E2BIG ("Argument list too long") on full 1-65535 scans

2 participants