Skip to content

Move ASSUME_ONLINE earlier in the script to avoid lookup of NMAP_BIN#556

Open
gcoxmoz wants to merge 1 commit intomatteocorti:masterfrom
gcoxmoz:alternatives
Open

Move ASSUME_ONLINE earlier in the script to avoid lookup of NMAP_BIN#556
gcoxmoz wants to merge 1 commit intomatteocorti:masterfrom
gcoxmoz:alternatives

Conversation

@gcoxmoz
Copy link
Copy Markdown

@gcoxmoz gcoxmoz commented Apr 29, 2026

I upgraded from a very old check_ssl_cert to recent. My security people came to me, "why are we now running nmap on this host?" Turns out I missed --assume-online, enabled that. They come back the next day, "ok you're not running nmap but rather /usr/sbin/alternatives --display nmap, can you stop /that/ to remove grep noise?"

Not urgent, obviously, but as I dug into it, it seems like a needless lookup / good cleanup opportunity.

The crux of the problem is, ASSUME_ONLINE is checked later than NMAP_BIN is evaluated / auto-calculated-if-not-specified-by-options. This patch moves ASSUME_ONLINE earlier, causing the NMAP_BIN lookup to be skipped when nmap is not wanted, and setting DISABLE_NMAP so you don't have DISABLE_NMAP and ASSUME_ONLINE that mostly mean the same thing later.

Thanks for looking.

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.

1 participant