Unofficial Go SDK for Nessus self-hosted scanner REST API.
Self-hosted only. This SDK targets Nessus Professional/Expert/Essentials running on your own infrastructure. It does not support Tenable.io (cloud), which has a different API.
go get danny.vn/nessusRequires Go 1.24+.
package main
import (
"context"
"fmt"
"log"
"danny.vn/nessus"
)
func main() {
client, err := nessus.NewClient("https://nessus.example.com:8834",
nessus.WithAPIKeys("access-key", "secret-key"),
nessus.WithInsecureTLS(), // self-signed certs
)
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
scans, err := client.ListScans(ctx)
if err != nil {
log.Fatal(err)
}
for _, s := range scans {
fmt.Printf("%s (status: %s)\n", s.Name, s.Status)
}
}Read-only. See FEATURES.md for details.
| Category | Resources | Count |
|---|---|---|
| Scans | List scans, scan details, history | 3 |
| Hosts | Host details per scan | 1 |
| Findings | Plugin output per host | 1 |
| Export | Export, poll, download, parse | 4 |
| Agents | List agents, paginated listing | 2 |
| Agent Groups | List agent groups | 1 |
| Policies | List scan policies | 1 |
| Scanners | List scanners | 1 |
| Server | Server properties | 1 |
go test ./...Smoke test against a live Nessus scanner:
NESSUS_ADDRESS=https://nessus.example.com:8834 \
NESSUS_ACCESS_KEY=your-access-key \
NESSUS_SECRET_KEY=your-secret-key \
go run smoke.goBasic read-only mapping check with raw and SDK output:
go run ./examples/basicThe example reads .nessus.json by default and writes local output under
examples/basic/output/.
| Document | Description |
|---|---|
| ARCHITECTURE | API protocol, package layout, design decisions |
| FEATURES | Resource coverage |
| PLAN | Development roadmap |
MIT — see LICENSE.