detectify

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = map[string]*schema.Attribute{
	"base_url": {
		Type: schema.TypeString,
	},
	"token": {
		Type: schema.TypeString,
	},
	"secret": {
		Type: schema.TypeString,
	},
	"token_v3": {
		Type: schema.TypeString,
	},
}

Functions

func ConfigInstance

func ConfigInstance() interface{}

func GetConfig

func GetConfig(connection *plugin.Connection) detectifyConfig

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

Types

type Asset

type Asset struct {
	Token string `json:"token"`
	Name  string `json:"name"`
}

type AssetItem

type AssetItem struct {
	Name       string   `json:"name"`
	Status     string   `json:"status"`
	Created    string   `json:"created"`
	Updated    string   `json:"updated"`
	Discovered string   `json:"discovered"`
	LastSeen   string   `json:"last_seen"`
	Token      string   `json:"token"`
	Monitored  bool     `json:"monitored"`
	AddedBy    []string `json:"added_by"`
}

Custom Structs

type AssetsResponse

type AssetsResponse struct {
	Assets []AssetItem `json:"assets"`
}

type AutonomousSystem

type AutonomousSystem struct {
	Name   string `json:"name"`
	Domain string `json:"domain"`
	Number int    `json:"number"`
}

// Custom Structs AutonomousSystem represents the autonomous system information.

type ConnectorItem

type ConnectorItem struct {
	ID        string  `json:"id"`
	Name      string  `json:"name"`
	TeamToken string  `json:"team_token"`
	LastRun   LastRun `json:"last_run"`
	Provider  string  `json:"provider"`
	CreatedAt string  `json:"created_at"`
	UpdatedAt string  `json:"updated_at"`
}

ConnectorItem represents an individual Connector item.

type ConnectorResponse

type ConnectorResponse struct {
	ConnectorItems []ConnectorItem `json:"items"`
}

ConnectorResponse represents the response structure for ConnectorItem items.

type Cvss

type Cvss struct {
	Score    float64 `json:"score"`
	Vector   string  `json:"vector"`
	Severity string  `json:"severity"`
}

type CvssScores

type CvssScores struct {
	Cvss20 Cvss `json:"cvss_2_0"`
	Cvss30 Cvss `json:"cvss_3_0"`
	Cvss31 Cvss `json:"cvss_3_1"`
}

type Definition

type Definition struct {
	Title          string    `json:"title"`
	Description    string    `json:"description"`
	Risk           string    `json:"risk"`
	ModuleVersion  string    `json:"module_version"`
	ModuleRelease  time.Time `json:"module_release"`
	IsCrowdsourced bool      `json:"is_crowdsourced"`
}

type Details

type Details struct {
	HTML []HTMLDetail `json:"html"`
}

type Finding

type Finding struct {
	Version    string      `json:"version"`
	UUID       string      `json:"uuid"`
	Title      string      `json:"title"`
	Severity   string      `json:"severity"`
	Source     Source      `json:"source"`
	ScanSource string      `json:"scan_source"`
	Status     string      `json:"status"`
	UpdatedAt  time.Time   `json:"updated_at"`
	CreatedAt  time.Time   `json:"created_at"`
	AssetToken string      `json:"asset_token"`
	Asset      Asset       `json:"asset"`
	Location   string      `json:"location"`
	Definition Definition  `json:"definition"`
	Request    Request     `json:"request"`
	Response   Response    `json:"response"`
	Tags       []Tag       `json:"tags"`
	Links      Links       `json:"links"`
	CvssScores CvssScores  `json:"cvss_scores"`
	Details    Details     `json:"details"`
	References []Reference `json:"references"`
	CWE        int         `json:"cwe"`
	Host       string      `json:"host"`
}

Custom Structs

type FindingsResponse

type FindingsResponse struct {
	Findings []Finding `json:"vulnerabilities"`
}

type Geolocation

type Geolocation struct {
	Continent     string `json:"continent"`
	ContinentName string `json:"continent_name"`
	Country       string `json:"country"`
	CountryName   string `json:"country_name"`
}

Geolocation represents the geolocation information.

type HTMLDetail

type HTMLDetail struct {
	Value string `json:"value"`
}
type Header struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type IPItem

type IPItem struct {
	ID               string           `json:"id"`
	IPAddress        string           `json:"ip_address"`
	Active           bool             `json:"active"`
	Enriched         bool             `json:"enriched"`
	DomainName       string           `json:"domain_name"`
	AssetID          string           `json:"asset_id"`
	TeamID           string           `json:"team_id"`
	IPVersion        string           `json:"ip_version"`
	FirstSeenAt      time.Time        `json:"first_seen_at"`
	DisappearedAt    time.Time        `json:"disappeared_at"`
	AutonomousSystem AutonomousSystem `json:"autonomous_system"`
	Geolocation      Geolocation      `json:"geolocation"`
}

IPItem represents an individual IP item.

type IPResponse

type IPResponse struct {
	IPItems []IPItem `json:"items"`
}

IPResponse represents the response structure for IP items.

type LastRun

type LastRun struct {
	Status      string `json:"status"`
	Error       string `json:"error"`
	CompletedAt string `json:"completed_at"`
}

LastRun represents the last run details of the connector.

type LatestScan

type LatestScan struct {
	Started string `json:"started"`
	Ended   string `json:"ended"`
	Status  string `json:"status"`
}

LatestScan represents the structure for LatestScan items.

type Links struct {
	DetailsPage string `json:"details_page"`
}

type MemberItem

type MemberItem struct {
	UserToken      string `json:"user_token"`
	FirstName      string `json:"first_name"`
	LastName       string `json:"last_name"`
	Email          string `json:"email"`
	Authentication string `json:"authentication"`
	Role           string `json:"role"`
	Created        string `json:"created"`
	LastLogin      string `json:"last_login"`
}

MemberItem represents an individual member item.

type PolicyItem

type PolicyItem struct {
	ID              string  `json:"id"`
	PolicyID        string  `json:"policy_id"`
	PolicyName      string  `json:"policy_name"`
	AssetID         string  `json:"asset_id"`
	AssetName       string  `json:"asset_name"`
	Severity        string  `json:"severity"`
	Active          bool    `json:"active"`
	Status          string  `json:"status"`
	StatusUpdatedAt string  `json:"status_updated_at"`
	FirstSeenAt     string  `json:"first_seen_at"`
	DisappearedAt   *string `json:"disappeared_at"`
}

PolicyItem represents an individual Policy item.

type PolicyResponse

type PolicyResponse struct {
	PolicyItems []PolicyItem `json:"items"`
}

PolicyResponse represents the response structure for Policy items.

type PortItem

type PortItem struct {
	ID            string  `json:"id"`
	TeamID        string  `json:"team_id"`
	AssetID       string  `json:"asset_id"`
	DomainName    string  `json:"domain_name"`
	IPAddress     string  `json:"ip_address"`
	Port          int     `json:"port"`
	Status        string  `json:"status"`
	FirstSeenAt   string  `json:"first_seen_at"`
	DisappearedAt *string `json:"disappeared_at"`
}

PortItem represents an individual port item.

type PortResponse

type PortResponse struct {
	PortItems []PortItem `json:"items"`
}

PortResponse represents the response structure for PortItem items.

type ProfileItem

type ProfileItem struct {
	Name       string     `json:"name"`
	Endpoint   string     `json:"endpoint"`
	Created    string     `json:"created"`
	Token      string     `json:"token"`
	LatestScan LatestScan `json:"latest_scan"`
	Status     string     `json:"status"`
}

ProfileItem represents an individual profile item.

type Reference

type Reference struct {
	UUID   string `json:"uuid"`
	Link   string `json:"link"`
	Name   string `json:"name"`
	Source string `json:"source"`
}

type Request

type Request struct {
	Method  string   `json:"method"`
	URL     string   `json:"url"`
	Headers []Header `json:"headers"`
	Body    string   `json:"body"`
}

type Response

type Response struct {
	StatusCode int      `json:"status_code"`
	Headers    []Header `json:"headers"`
	Body       string   `json:"body"`
}

type Source

type Source struct {
	Value string `json:"value"`
}

type Tag

type Tag struct {
	UUID string `json:"uuid"`
	Name string `json:"name"`
}

type TechItem

type TechItem struct {
	ID              string   `json:"id"`
	AssetID         string   `json:"asset_id"`
	TeamID          string   `json:"team_id"`
	DomainName      string   `json:"domain_name"`
	ServiceProtocol string   `json:"service_protocol"`
	Port            int      `json:"port"`
	Name            string   `json:"name"`
	Version         *string  `json:"version"`
	Categories      []string `json:"categories"`
	Active          bool     `json:"active"`
	FirstSeenAt     string   `json:"first_seen_at"`
	DisappearedAt   *string  `json:"disappeared_at"`
}

TechItem represents an individual technology item.

type TechResponse

type TechResponse struct {
	TechItems []TechItem `json:"items"`
}

TechResponse represents the response structure for IP items.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL