go client for the nessus
https://developer.tenable.com/reference#read-the-docs
import "github.com/autonubil/go-nessus"
There are a few With... option functions that can be used to customize the API client:
WithBaseURL
custom base urlWithLogin
(username, password)WithContext
(custom Context)WithInsecure
allow insecure certificatesWithUserAgent
to set custom user agentWithTrace
traces all calls
go-nessus supports following environment variables for easy construction of a client:
NESSUS_URL
NESSUS_USER
NESSUS_PASSWORD
NESSUS_INSECURE
Construct a new nessus client, then use the various service on the client to access different parts of the wazuh API. For example, to list all agents:
c, err := NewClientFromEnvironment(WithTrace(true))
if err != nil {
t.Error(err)
return
}
i, err := c.Wellness.GetIssues()
if err != nil {
t.Error(err)
return
}
fmt.Printf("%v", i)
- more test cases
- If you have an issue: report it on the issue tracker
Carsten Zeumer ([email protected])
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0