Skip to content

Fix host discovery #2344

Fix host discovery

Fix host discovery #2344

Workflow file for this run

name: 🔨 Build Test
on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.24.x
- name: Install libpcap-dev
run: sudo apt install libpcap-dev
- name: Install nmap
run: sudo apt install nmap
- name: Build
run: go build .
working-directory: cmd/naabu/
- name: Test
run: go test -race ./...
- name: Integration Tests
env:
GH_ACTION: true
run: bash run.sh
working-directory: integration_tests/
- name: Race Condition Tests - Standard User
run: |
go run -race . -host scanme.sh
working-directory: cmd/naabu/
- name: Race Condition Tests - Root User
run: |
sudo go run -race . -host scanme.sh
working-directory: cmd/naabu/
build-mac:
runs-on: macos-latest
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.24.x
- name: Check out code
uses: actions/checkout@v5
- name: Install libpcap-dev
run: brew install libpcap
- name: Install nmap
run: brew install nmap
- name: Build
run: go build .
working-directory: cmd/naabu/
- name: Test
run: go test -race ./...
- name: Integration Tests
env:
GH_ACTION: true
run: bash run.sh
working-directory: integration_tests/
- name: Race Condition Tests - Standard User
run: |
go run -race . -host scanme.sh
working-directory: cmd/naabu/
- name: Race Condition Tests - Root User
run: |
sudo go run -race . -host scanme.sh
working-directory: cmd/naabu/
build-windows:
runs-on: windows-latest
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.24.x
- name: Check out code
uses: actions/checkout@v5
- name: Build
run: go build .
working-directory: cmd/naabu/
- name: Test
run: go test -race ./...
- name: Race Condition Tests
# Known issue: https://github.com/golang/go/issues/46099
run: |
# go run -race . -host scanme.sh
# sudo go run -race . -host scanme.sh
working-directory: cmd/naabu/