Documentation
¶
Index ¶
- type AcceptRiskRule
- type AcceptRiskRuleResponse
- type AgentResponse
- type AssetChunkDownloadResponse
- type AssetListResponse
- type AssetRequestBody
- type AssetResponse
- type AssetStatusResponse
- type AuditLogResponse
- type Event
- type EventFilter
- type Export
- type ExportRequestResponse
- type ExportStatusResponse
- type Nessus
- func (n Nessus) Delete(endpoint string, params string) (*http.Response, error)
- func (n Nessus) Get(endpoint string, params string) (*http.Response, error)
- func (n *Nessus) GetHealthStats(count int) ScannerSettingsResponse
- func (n *Nessus) GetProperties() PropertiesResponse
- func (n *Nessus) GetStatus() StatusResponse
- func (n Nessus) Patch(endpoint string, body []byte) (*http.Response, error)
- func (n Nessus) Post(endpoint string, body []byte) (*http.Response, error)
- func (n Nessus) Put(endpoint string, body []byte) (*http.Response, error)
- type PropertiesResponse
- type RecastRiskRule
- type RecastRiskRuleResponse
- type RepoDetailResponse
- type RepoList
- type RepoListResponse
- type ScannerSettingsResponse
- type StaticIPAsset
- func (asset StaticIPAsset) Calculating(sc TenableSC) bool
- func (asset *StaticIPAsset) Create(sc TenableSC) StaticIPCreateResponse
- func (asset StaticIPAsset) Delete(sc TenableSC) *http.Response
- func (asset StaticIPAsset) Edit(sc TenableSC) *http.Response
- func (asset *StaticIPAsset) View(sc TenableSC)
- type StaticIPCreateResponse
- type StaticIPViewResponse
- type StatusResponse
- type TenableIO
- func (io TenableIO) Delete(endpoint string, params string) (*http.Response, error)
- func (io TenableIO) Get(endpoint string, params string) (*http.Response, error)
- func (io *TenableIO) ListAgents() []AgentResponse
- func (io *TenableIO) ListEvents(filter EventFilter) ([]Event, error)
- func (io TenableIO) NewExport(exportType string) Export
- func (io TenableIO) Patch(endpoint string, body []byte) (*http.Response, error)
- func (io TenableIO) Post(endpoint string, body []byte) (*http.Response, error)
- func (io TenableIO) Put(endpoint string, body []byte) (*http.Response, error)
- type TenableSC
- func (sc TenableSC) Delete(endpoint string, params string) (*http.Response, error)
- func (sc TenableSC) Get(endpoint string, params string) (*http.Response, error)
- func (sc *TenableSC) ListAssets() AssetListResponse
- func (sc *TenableSC) ListRepositories() RepoListResponse
- func (sc *TenableSC) ListRiskAcceptanceRules() AcceptRiskRuleResponse
- func (sc *TenableSC) ListRiskRecastRules() RecastRiskRuleResponse
- func (sc *TenableSC) Login(scUser string, scPassword string) (*TokenResponse, error)
- func (sc *TenableSC) Logout() error
- func (sc TenableSC) NewStaticIPAsset(Name string, IPAddresses string, Description string, Tag string) StaticIPAsset
- func (sc TenableSC) Patch(endpoint string, body []byte) (*http.Response, error)
- func (sc TenableSC) Post(endpoint string, body []byte) (*http.Response, error)
- func (sc TenableSC) Put(endpoint string, body []byte) (*http.Response, error)
- func (sc *TenableSC) RepositoryDetail(RepoId int) RepoDetailResponse
- type TokenCookie
- type TokenError
- type TokenRequest
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptRiskRule ¶
type AcceptRiskRule struct {
HostValue interface{} `json:"hostValue,omitempty"`
HostType string `json:"hostType"`
Port string `json:"Port,omitempty"`
Protocol string `json:"protocol,omitempty"`
Expires string `json:"expires"`
CreatedTime string `json:"createdTime"`
ModifiedTime string `json:"modifiedTime"`
Status string `json:"status"`
ID string `json:"id"`
Comments string `json:"comments"`
Plugin struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
} `json:"plugin"`
Repository struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
} `json:"repository"`
User struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname,omitempty"`
Lastname string `json:"lastname,omitempty"`
} `json:"User"`
}
type AcceptRiskRuleResponse ¶
type AcceptRiskRuleResponse struct {
Type string `json:"type"`
AcceptRiskRules []AcceptRiskRule `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type AgentResponse ¶
type AgentResponse struct {
Agents []struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
Platform string `json:"platform"`
Distro string `json:"distro"`
IP string `json:"ip"`
LastScanned int `json:"last_scanned"`
PluginFeedID string `json:"plugin_feed_id"`
CoreBuild string `json:"core_build"`
CoreVersion string `json:"core_version"`
LinkedOn int `json:"linked_on"`
LastConnect int `json:"last_connect"`
Status string `json:"status"`
Groups []struct {
Name string `json:"name"`
ID int `json:"id"`
} `json:"groups"`
} `json:"agents"`
Pagination struct {
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Sort []struct {
Name string `json:"name"`
Order string `json:"order"`
} `json:"sort"`
} `json:"pagination"`
}
type AssetChunkDownloadResponse ¶
type AssetChunkDownloadResponse []struct {
ID string `json:"id,omitempty"`
HasAgent bool `json:"has_agent,omitempty"`
HasPluginResults bool `json:"has_plugin_results,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
TerminatedAt time.Time `json:"terminated_at,omitempty"`
TerminatedBy time.Time `json:"terminated_by,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt time.Time `json:"deleted_at,omitempty"`
DeletedBy time.Time `json:"deleted_by,omitempty"`
FirstSeen time.Time `json:"first_seen,omitempty"`
LastSeen time.Time `json:"last_seen,omitempty"`
FirstScanTime time.Time `json:"first_scan_time,omitempty"`
LastScanTime time.Time `json:"last_scan_time,omitempty"`
LastAuthenticatedScanDate time.Time `json:"last_authenticated_scan_date,omitempty"`
LastLicensedScanDate time.Time `json:"last_licensed_scan_date,omitempty"`
AzureVMID string `json:"azure_vm_id,omitempty"`
AzureResourceID string `json:"azure_resource_id,omitempty"`
AwsEc2InstanceAmiID string `json:"aws_ec2_instance_ami_id,omitempty"`
AwsEc2InstanceID string `json:"aws_ec2_instance_id,omitempty"`
AgentUUID string `json:"agent_uuid,omitempty"`
BiosUUID string `json:"bios_uuid,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
AwsOwnerID string `json:"aws_owner_id,omitempty"`
AwsAvailabilityZone string `json:"aws_availability_zone,omitempty"`
AwsRegion string `json:"aws_region,omitempty"`
AwsVpcID string `json:"aws_vpc_id,omitempty"`
AwsEc2InstanceGroupName string `json:"aws_ec2_instance_group_name,omitempty"`
AwsEc2InstanceStateName string `json:"aws_ec2_instance_state_name,omitempty"`
AwsEc2InstanceType string `json:"aws_ec2_instance_type,omitempty"`
AwsSubnetID string `json:"aws_subnet_id,omitempty"`
AwsEc2ProductCode string `json:"aws_ec2_product_code,omitempty"`
AwsEc2Name string `json:"aws_ec2_name,omitempty"`
McafeeEpoGUID string `json:"mcafee_epo_guid,omitempty"`
McafeeEpoAgentGUID string `json:"mcafee_epo_agent_guid,omitempty"`
ServicenowSysid string `json:"servicenow_sysid,omitempty"`
AgentNames []string `json:"agent_names,omitempty"`
Ipv4s []string `json:"ipv4s,omitempty"`
Ipv6s []string `json:"ipv6s,omitempty"`
Fqdns []string `json:"fqdns,omitempty"`
MacAddresses []string `json:"mac_addresses,omitempty"`
NetbiosNames []string `json:"netbios_names,omitempty"`
OperatingSystems []string `json:"operating_systems,omitempty"`
SystemTypes []string `json:"system_types,omitempty"`
Hostnames []string `json:"hostnames,omitempty"`
SSHFingerprints []string `json:"ssh_fingerprints,omitempty"`
QualysAssetIds []string `json:"qualys_asset_ids,omitempty"`
QualysHostIds []string `json:"qualys_host_ids,omitempty"`
ManufacturerTpmIds []string `json:"manufacturer_tpm_ids,omitempty"`
SymantecEpHardwareKeys []string `json:"symantec_ep_hardware_keys,omitempty"`
Sources []struct {
Name string `json:"name,omitempty"`
FirstSeen time.Time `json:"first_seen,omitempty"`
LastSeen time.Time `json:"last_seen,omitempty"`
} `json:"sources,omitempty"`
Tags []string `json:"tags,omitempty"`
NetworkInterfaces []struct {
Name string `json:"name,omitempty"`
Virtual bool `json:"virtual,omitempty"`
Aliased bool `json:"aliased,omitempty"`
Fqdns []string `json:"fqdns,omitempty"`
MacAddresses []string `json:"mac_addresses,omitempty"`
Ipv4S []string `json:"ipv4s,omitempty"`
Ipv6S []string `json:"ipv6s,omitempty"`
} `json:"network_interfaces"`
}
type AssetListResponse ¶
type AssetListResponse struct {
Type string `json:"type"`
Response struct {
Usable []AssetResponse `json:"usable"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type AssetRequestBody ¶
type AssetRequestBody struct {
ChunkSize int `json:"chunk_size"`
CreatedAt float32 `json:"filters.created_at,omitempty"`
UpdatedAt float32 `json:"filters.updated_at,omitempty"`
TerminatedAt float32 `json:"filters.terminated_at,omitempty"`
DeletedAt float32 `json:"filters.deleted_at,omitempty"`
FirstScanTime float32 `json:"filters.first_scan_time,omitempty"`
LastAuthenticatedScanTime float32 `json:"filters.last_authenticated_scan_time,omitempty"`
LastAssessed float32 `json:"filters.last_assessed,omitempty"`
ServiceNowSysID bool `json:"filters.servicenow_sysid,omitempty"`
Sources []string `json:"filters.sources,omitempty"`
HasPluginResults bool `json:"filters.has_plugin_results,omitempty"`
}
func (AssetRequestBody) ToBytes ¶
func (req AssetRequestBody) ToBytes() []byte
type AssetResponse ¶
type AssetResponse struct {
Status string `json:"status"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
CreatedTime string `json:"createdTime"`
ModifiedTime string `json:"modifiedTime"`
Tags string `json:"tags"`
ID string `json:"id"`
Repositories []struct {
IPCount string `json:"ipCount"`
Repository struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"repository"`
} `json:"repositories"`
IPCount int `json:"ipCount"`
Groups []interface{} `json:"groups"`
CanUse string `json:"canUse"`
CanManage string `json:"canManage"`
Owner struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
} `json:"owner"`
OwnerGroup struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"ownerGroup"`
Template struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"template"`
TargetGroup struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"targetGroup"`
Creator struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
} `json:"creator"`
}
type AssetStatusResponse ¶
type AssetStatusResponse struct {
Type string `json:"type"`
Response struct {
ID string `json:"id"`
Name string `json:"name"`
IPCount interface{} `json:"ipCount"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type AuditLogResponse ¶
type Event ¶
type Event struct {
ID string `json:"id"`
Action string `json:"action"`
Crud string `json:"crud"`
IsFailure bool `json:"is_failure"`
Received time.Time `json:"received"`
Description interface{} `json:"description"`
Actor struct {
ID string `json:"id"`
Name string `json:"name"`
} `json:"actor"`
IsAnonymous interface{} `json:"is_anonymous"`
Target struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
} `json:"target"`
Fields []interface{} `json:"fields"`
}
type EventFilter ¶
type Export ¶
type Export struct {
ExportUUID string
ExportType string
ExportStatus string
AvailableChunks []int
ProcessedChunks []int
// contains filtered or unexported fields
}
func (*Export) DownloadChunk ¶
func (export *Export) DownloadChunk(ChunkID int) AssetChunkDownloadResponse
func (*Export) GetUnprocessedChunks ¶
func (*Export) RequestExport ¶
func (*Export) RequestStatus ¶
type ExportRequestResponse ¶
type ExportRequestResponse struct {
ExportUUID string `json:"export_uuid"`
}
type ExportStatusResponse ¶
type Nessus ¶
type Nessus struct {
BaseClient baseClient
Address string
Port int
BaseURL string
// contains filtered or unexported fields
}
func NewNessusClient ¶
func (*Nessus) GetHealthStats ¶
func (n *Nessus) GetHealthStats(count int) ScannerSettingsResponse
func (*Nessus) GetProperties ¶
func (n *Nessus) GetProperties() PropertiesResponse
type PropertiesResponse ¶
type PropertiesResponse struct {
Installers struct {
} `json:"installers"`
LoadedPluginSet string `json:"loaded_plugin_set"`
Features struct {
Report bool `json:"report"`
RemoteLink bool `json:"remote_link"`
Users bool `json:"users"`
PluginRules bool `json:"plugin_rules"`
API bool `json:"api"`
ScanAPI bool `json:"scan_api"`
LocalScanner bool `json:"local_scanner"`
Logs bool `json:"logs"`
SMTP bool `json:"smtp"`
} `json:"features"`
ServerUUID string `json:"server_uuid"`
Update struct {
Href interface{} `json:"href"`
NewVersion int `json:"new_version"`
Restart int `json:"restart"`
} `json:"update"`
RestartPending struct {
Reason interface{} `json:"reason"`
Type interface{} `json:"type"`
} `json:"restart_pending"`
NessusUIVersion string `json:"nessus_ui_version"`
NessusType string `json:"nessus_type"`
Notifications []interface{} `json:"notifications"`
License struct {
Features struct {
Report bool `json:"report"`
RemoteLink bool `json:"remote_link"`
Users bool `json:"users"`
PluginRules bool `json:"plugin_rules"`
API bool `json:"api"`
ScanAPI bool `json:"scan_api"`
LocalScanner bool `json:"local_scanner"`
Logs bool `json:"logs"`
SMTP bool `json:"smtp"`
} `json:"features"`
Type string `json:"type"`
ExpirationDate int `json:"expiration_date"`
Ips int64 `json:"ips"`
Restricted bool `json:"restricted"`
Agents int `json:"agents"`
Mode int `json:"mode"`
Scanners int `json:"scanners"`
ScannersUsed int `json:"scanners_used"`
AgentsUsed int `json:"agents_used"`
Name string `json:"name"`
} `json:"license"`
FeedError int `json:"feed_error"`
RestartNeeded interface{} `json:"restart_needed"`
ServerBuild string `json:"server_build"`
ShowNpv7WhatsNew int `json:"show_npv7_whats_new"`
Npv7DowngradeAvailable int `json:"npv7_downgrade_available"`
Capabilities struct {
ScanVulnerabilityGroups bool `json:"scan_vulnerability_groups"`
ReportEmailConfig bool `json:"report_email_config"`
ScanVulnerabilityGroupsMixed bool `json:"scan_vulnerability_groups_mixed"`
} `json:"capabilities"`
PluginSet string `json:"plugin_set"`
IdleTimeout string `json:"idle_timeout"`
NessusUIBuild string `json:"nessus_ui_build"`
Npv7UpgradeRequired bool `json:"npv7_upgrade_required"`
ScannerBoottime int `json:"scanner_boottime"`
Npv7 int `json:"npv7"`
LoginBanner interface{} `json:"login_banner"`
Npv7UpgradeNotification int `json:"npv7_upgrade_notification"`
Platform string `json:"platform"`
ServerVersion string `json:"server_version"`
}
type RecastRiskRule ¶
type RecastRiskRule struct {
HostValue interface{} `json:"hostValue,omitempty"`
HostType string `json:"hostType"`
Port string `json:"Port,omitempty"`
Protocol string `json:"protocol,omitempty"`
NewSeverity string `json:"newSeverity"`
CreatedTime string `json:"createdTime"`
Order string `json:"order"`
Status string `json:"status"`
ID string `json:"id"`
Comments string `json:"comments"`
Plugin struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
} `json:"plugin"`
Repository struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
} `json:"repository"`
User struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname,omitempty"`
Lastname string `json:"lastname,omitempty"`
} `json:"User"`
}
type RecastRiskRuleResponse ¶
type RecastRiskRuleResponse struct {
Type string `json:"type"`
RecastRules []RecastRiskRule `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type RepoDetailResponse ¶
type RepoDetailResponse struct {
Type string `json:"type"`
Response struct {
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
DataFormat string `json:"dataFormat"`
DownloadFormat string `json:"downloadFormat"`
CreatedTime string `json:"createdTime"`
ModifiedTime string `json:"modifiedTime"`
VulnCount string `json:"vulnCount"`
Running string `json:"running"`
LastSyncTime string `json:"lastSyncTime"`
LastVulnUpdate string `json:"lastVulnUpdate"`
ID string `json:"id"`
Organizations []struct {
ID string `json:"id"`
GroupAssign string `json:"groupAssign"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"organizations"`
TypeFields struct {
NessusSchedule struct {
Type string `json:"type"`
Start string `json:"start"`
RepeatRule string `json:"repeatRule"`
} `json:"nessusSchedule"`
Correlation []interface{} `json:"correlation"`
IPRange string `json:"ipRange"`
IPCount string `json:"ipCount"`
RunningNessus string `json:"runningNessus"`
LastGenerateNessusTime string `json:"lastGenerateNessusTime"`
TrendingDays string `json:"trendingDays"`
TrendWithRaw string `json:"trendWithRaw"`
LastTrendUpdate string `json:"lastTrendUpdate"`
} `json:"typeFields"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type RepoListResponse ¶
type ScannerSettingsResponse ¶
type ScannerSettingsResponse struct {
PerfStatsHistory []struct {
KbytesReceived int `json:"kbytes_received"`
KbytesSent int `json:"kbytes_sent"`
AvgDNSLookupTime int `json:"avg_dns_lookup_time"`
NumDNSLookups int `json:"num_dns_lookups"`
AvgRdnsLookupTime int `json:"avg_rdns_lookup_time"`
NumRdnsLookups int `json:"num_rdns_lookups"`
CPULoadAvg int `json:"cpu_load_avg"`
NessusLogDiskFree int `json:"nessus_log_disk_free"`
NessusLogDiskTotal int `json:"nessus_log_disk_total"`
NessusDataDiskFree int `json:"nessus_data_disk_free"`
NessusDataDiskTotal int `json:"nessus_data_disk_total"`
TempDiskFree int `json:"temp_disk_free"`
TempDiskTotal int `json:"temp_disk_total"`
NumTCPSessions int `json:"num_tcp_sessions"`
NessusVmem int `json:"nessus_vmem"`
NessusMem int `json:"nessus_mem"`
SysRAMUsed interface{} `json:"sys_ram_used"`
SysRAM int `json:"sys_ram"`
SysCores int `json:"sys_cores"`
NumHosts int `json:"num_hosts"`
NumScans int `json:"num_scans"`
Timestamp int `json:"timestamp"`
} `json:"perf_stats_history"`
PerfStatsCurrent struct {
KbytesReceived int `json:"kbytes_received"`
KbytesSent int `json:"kbytes_sent"`
AvgDNSLookupTime int `json:"avg_dns_lookup_time"`
NumDNSLookups int `json:"num_dns_lookups"`
AvgRdnsLookupTime int `json:"avg_rdns_lookup_time"`
NumRdnsLookups int `json:"num_rdns_lookups"`
CPULoadAvg int `json:"cpu_load_avg"`
NessusLogDiskFree int `json:"nessus_log_disk_free"`
NessusLogDiskTotal int `json:"nessus_log_disk_total"`
NessusDataDiskFree int `json:"nessus_data_disk_free"`
NessusDataDiskTotal int `json:"nessus_data_disk_total"`
TempDiskFree int `json:"temp_disk_free"`
TempDiskTotal int `json:"temp_disk_total"`
NumTCPSessions int `json:"num_tcp_sessions"`
NessusVmem int `json:"nessus_vmem"`
NessusMem int `json:"nessus_mem"`
SysRAMUsed interface{} `json:"sys_ram_used"`
SysRAM int `json:"sys_ram"`
SysCores int `json:"sys_cores"`
NumHosts int `json:"num_hosts"`
NumScans int `json:"num_scans"`
Timestamp int `json:"timestamp"`
} `json:"perf_stats_current"`
}
type StaticIPAsset ¶
type StaticIPAsset struct {
ID int
Name string
Type string
DefinedIPs string
Description string
Tag string
}
func (StaticIPAsset) Calculating ¶
func (asset StaticIPAsset) Calculating(sc TenableSC) bool
func (*StaticIPAsset) Create ¶
func (asset *StaticIPAsset) Create(sc TenableSC) StaticIPCreateResponse
func (*StaticIPAsset) View ¶
func (asset *StaticIPAsset) View(sc TenableSC)
type StaticIPCreateResponse ¶
type StaticIPCreateResponse struct {
Type string `json:"type"`
Response struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
Tags string `json:"tags"`
Context string `json:"context"`
Status string `json:"status"`
CreatedTime string `json:"createdTime"`
ModifiedTime string `json:"modifiedTime"`
TypeFields struct {
DefinedIPs string `json:"definedIPs"`
} `json:"typeFields"`
Repositories []struct {
IPCount string `json:"ipCount"`
Repository struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"repository"`
} `json:"repositories"`
IPCount int `json:"ipCount"`
Groups []interface{} `json:"groups"`
AssetDataFields []interface{} `json:"assetDataFields"`
CanUse string `json:"canUse"`
CanManage string `json:"canManage"`
Creator struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
} `json:"creator"`
Owner struct {
ID string `json:"id"`
Username string `json:"username"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
} `json:"owner"`
OwnerGroup struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"ownerGroup"`
TargetGroup struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"targetGroup"`
Template struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
} `json:"template"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type StaticIPViewResponse ¶
type StaticIPViewResponse struct {
Type string `json:"type"`
Response struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags string `json:"tags"`
TypeFields struct {
DefinedIPs string `json:"definedIPs"`
} `json:"typeFields"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
type StatusResponse ¶
type TenableIO ¶
type TenableIO struct {
BaseClient baseClient
BaseURL string
// contains filtered or unexported fields
}
func NewTenableIOClient ¶
Creating a New Clients
func (*TenableIO) ListAgents ¶
func (io *TenableIO) ListAgents() []AgentResponse
func (*TenableIO) ListEvents ¶
func (io *TenableIO) ListEvents(filter EventFilter) ([]Event, error)
type TenableSC ¶
type TenableSC struct {
BaseClient baseClient
User string
BaseURL string
// contains filtered or unexported fields
}
func NewTenableSCClient ¶
func (*TenableSC) ListAssets ¶
func (sc *TenableSC) ListAssets() AssetListResponse
func (*TenableSC) ListRepositories ¶
func (sc *TenableSC) ListRepositories() RepoListResponse
func (*TenableSC) ListRiskAcceptanceRules ¶
func (sc *TenableSC) ListRiskAcceptanceRules() AcceptRiskRuleResponse
func (*TenableSC) ListRiskRecastRules ¶
func (sc *TenableSC) ListRiskRecastRules() RecastRiskRuleResponse
func (*TenableSC) Login ¶
func (sc *TenableSC) Login(scUser string, scPassword string) (*TokenResponse, error)
With the provided user name and password, attempts to create an authenticated session with Tenable.sc using the token endpoint. The function needs to be executed prior to any other SC client request as it sets the token and session cookie for requests.
func (TenableSC) NewStaticIPAsset ¶
func (*TenableSC) RepositoryDetail ¶
func (sc *TenableSC) RepositoryDetail(RepoId int) RepoDetailResponse
type TokenCookie ¶
type TokenError ¶
type TokenRequest ¶
func (TokenRequest) ToBytes ¶
func (req TokenRequest) ToBytes() []byte
type TokenResponse ¶
type TokenResponse struct {
Type string `json:"type"`
Response struct {
LastLogin string `json:"lastLogin"`
LastLoginIP string `json:"lastLoginIP"`
FailedLogins string `json:"failedLogins"`
FailedLoginIP string `json:"failedLoginIP"`
LastFailedLogin string `json:"lastFailedLogin"`
Token int `json:"token"`
UnassociatedCert string `json:"unassociatedCert"`
} `json:"response"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Warnings []interface{} `json:"warnings"`
Timestamp int `json:"timestamp"`
}
Click to show internal directories.
Click to hide internal directories.