Documentation ¶
Index ¶
- Constants
- Variables
- func UnmarshalDetails(event string, details []byte) (interface{}, error)
- type APIToken
- type Agent
- type ApplicationOutdatedDetails
- type ApplicationVulnerableDetails
- type BaselineDetails
- type BlacklistDetails
- type Bundle
- type BundleID
- type BundleService
- type CMSTamperedDetails
- type Client
- type Config
- type ContentViolationDetails
- type DefacementDetails
- type Domain
- type DomainApplication
- type DomainConfig
- type DomainFilter
- type DomainID
- type DomainMetadata
- type DomainMetadataService
- type DomainService
- func (srv *DomainService) Create(ctx context.Context, create Domain) (Domain, error)
- func (srv *DomainService) Delete(ctx context.Context, id DomainID) error
- func (srv *DomainService) Disable(ctx context.Context, id DomainID) error
- func (srv *DomainService) DisableBatch(ctx context.Context, ids []DomainID) error
- func (srv *DomainService) Get(ctx context.Context, id DomainID) (Domain, error)
- func (srv *DomainService) List(ctx context.Context, filter *DomainFilter) ([]Domain, error)
- func (srv *DomainService) Update(ctx context.Context, id DomainID, update Domain) (Domain, error)
- type DomainStats
- type DomainStatsService
- type Endpoint
- type Error
- type ExternalID
- type HijackDetails
- type Image
- type Initiator
- type Issue
- type IssueCount
- type IssueFilter
- type IssueHistory
- type IssueID
- type IssueService
- func (srv *IssueService) Get(ctx context.Context, id IssueID) (Issue, error)
- func (srv *IssueService) List(ctx context.Context, filter *IssueFilter) ([]Issue, error)
- func (srv *IssueService) ListByDomain(ctx context.Context, id DomainID, filter *IssueFilter) ([]Issue, error)
- func (srv *IssueService) Update(ctx context.Context, id IssueID, update IssueUpdate) (Issue, error)
- type IssueStatus
- type IssueUpdate
- type IssuesSummary
- type LastlineDetails
- type MalwareDetails
- type Notification
- type NotificationID
- type NotificationService
- func (srv *NotificationService) Create(ctx context.Context, create Notification) (Notification, error)
- func (srv *NotificationService) Delete(ctx context.Context, id NotificationID) error
- func (srv *NotificationService) Get(ctx context.Context, id NotificationID) (Notification, error)
- func (srv *NotificationService) List(ctx context.Context) ([]Notification, error)
- func (srv *NotificationService) ListByDomain(ctx context.Context, id DomainID) ([]Notification, error)
- func (srv *NotificationService) ListByUser(ctx context.Context, id UserID) ([]Notification, error)
- func (srv *NotificationService) Update(ctx context.Context, id NotificationID, update NotificationUpdate) (Notification, error)
- type NotificationUpdate
- type ParkedDomainDetails
- type Redirect
- type Region
- type Role
- type SRIDetails
- type Screenshot
- type ScreenshotFilter
- type ScreenshotService
- type ScreenshotType
- type SeospamDetails
- type SeospamResult
- type SuspiciousLinkDetails
- type SuspiciousRedirectDetails
- type SuspiciousRequestDetails
- type TLSCertificateDetails
- type TLSConfigurationDetails
- type TakeoverDNSDetails
- type TokenID
- type User
- type UserConfig
- type UserDomains
- type UserID
- type Viewport
- type WebshellDetails
- type ZoneHDetails
Constants ¶
View Source
const ( IssueEventBlacklist = "blacklist" IssueEventDefacement = "defacement" IssueEventMalware = "malware" IssueEventCMSVersion = "cms-version" IssueEventCMSVulnerable = "cms-vulnerable" IssueEventCMSTampered = "cms-tampered" IssueEventSuspiciousLink = "suspicious-link" IssueEventSuspiciousLinkV2 = "suspicious-link-v2" IssueEventSuspiciousRequest = "suspicious-request" IssueEventSuspiciousRedirect = "suspicious-redirect" IssueEventParkedDomain = "parked" IssueEventTLSCipherSuite = "tls-ciphersuite" IssueEventTLSProtocol = "tls-protocol" IssueEventTLSExpires = "tls-expires" IssueEventTLSHostnameMismatch = "tls-hostname" IssueEventTLSNoTrust = "tls-notrust" IssueEventTLSSigAlg = "tls-sigalg" IssueEventTLSLegacy = "tls-legacy" IssueEventTLSMisconfiguredChain = "tls-misconfigured-chain" IssueEventTLSRevokedCertificate = "tls-revoked-cert" IssueEventBaselineEmpty = "baseline-empty" IssueEventContentViolation = "content-violation" IssueEventNoHTTPSRedirect = "no-https-redirect" IssueEventSeospam = "seospam" IssueEventWebshell = "webshell" IssueEventHijackResource = "hijack-resource" IssueEventHijackLink = "hijack-link" IssueEvent404Link = "404-link" IssueEventTakeoverDNS = "takeover-dns" IssueEventSRIMissing = "sri-missing" IssueEventSRIInvalid = "sri-invalid" )
View Source
const ( ScreenshotCurrent ScreenshotType = "current" ScreenshotPrevious ScreenshotType = "previous" RegionEU Region = "EU" RegionUS Region = "US" RegionASIA Region = "ASIA" ViewportDesktop Viewport = "desktop" ViewportMobile Viewport = "mobile" )
Variables ¶
View Source
var DefaultEndpoint = Endpoint{
AuthURL: "https://auth.nimbusec.com/oauth2/token",
ServerURL: "https://api.nimbusec.com",
}
Functions ¶
func UnmarshalDetails ¶
UnmarshalDetails converts the given details value to the correct details type
Types ¶
type ApplicationVulnerableDetails ¶
type ApplicationVulnerableDetails struct { Name string `json:"name"` URL string `json:"url,omitempty"` Path string `json:"path,omitempty"` Version string `json:"version"` Vulnerabilities []struct { CVE string `json:"cve"` Score float64 `json:"score"` Description string `json:"description"` Link string `json:"link"` } `json:"vulnerabilities"` }
type BaselineDetails ¶
type BaselineDetails struct {
ClientID string `json:"clientID"`
}
type BlacklistDetails ¶
type Bundle ¶
type Bundle struct { ID BundleID `json:"id"` Name string `json:"name"` StartDate int64 `json:"startDate"` EndDate int64 `json:"endDate"` Price int `json:"price"` Currency string `json:"currency"` Active int `json:"active"` Capacity int `json:"capacity"` ChargingType string `json:"chargingType"` Features struct { Defacement struct { Available bool `json:"available"` Nimbusec bool `json:"nimbusec"` ZoneH bool `json:"zoneh"` } `json:"defacement"` UnwantedContent struct { Available bool `json:"available"` } `json:"unwantedContent"` Malware struct { Available bool `json:"available"` Nimbusec bool `json:"nimbusec"` Ikarus bool `json:"ikarus"` Avira bool `json:"avira"` // Deprecated. Avira is not used as of 01.03.2022 anymore LastLine bool `json:"lastline"` ClamAV bool `json:"clamav"` } `json:"malware"` Reputation struct { Available bool `json:"available"` } `json:"reputation"` TLS struct { Available bool `json:"available"` } `json:"tls"` Webshell struct { Available bool `json:"available"` } `json:"webshell"` Application struct { Available bool `json:"available"` } `json:"application"` Scanning struct { Available bool `json:"available"` FastScanInterval int `json:"fastScanInterval"` DeepScanInterval int `json:"deepScanInterval"` Quota int `json:"quota"` FromEU bool `json:"fromEU"` FromUS bool `json:"fromUS"` FromASIA bool `json:"fromAsia"` Mobile bool `json:"mobile"` } `json:"scanning"` Notification struct { Available bool `json:"available"` EMail bool `json:"email"` TextMessage bool `json:"textMessage"` } `json:"notification"` } `json:"features"` }
type CMSTamperedDetails ¶
type Client ¶
type Client struct { Bundles *BundleService Domains *DomainService DomainMetadata *DomainMetadataService DomainStats *DomainStatsService Issues *IssueService Notifications *NotificationService Screenshots *ScreenshotService // contains filtered or unexported fields }
type ContentViolationDetails ¶
type ContentViolationDetails struct { NewHostnames map[string][]string `json:"newHostnames"` NewAResources map[string]struct{} `json:"newAResources"` NewImgResources map[string]struct{} `json:"newImgResources"` NewInputResources map[string]struct{} `json:"newInputResources"` NewButtonResources map[string]struct{} `json:"newButtonResources"` NewEventAttributes map[string]struct{} `json:"newEventAttributes"` Profile string `json:"profile"` }
type DefacementDetails ¶
type Domain ¶
type Domain struct { ID DomainID `json:"id"` Bundle BundleID `json:"bundle"` Name string `json:"name"` URL string `json:"url"` ExternalIDs []ExternalID `json:"externalIds,omitempty"` }
type DomainApplication ¶
type DomainConfig ¶
type DomainFilter ¶
type DomainMetadata ¶
type DomainMetadataService ¶
type DomainMetadataService service
func (*DomainMetadataService) Get ¶
func (srv *DomainMetadataService) Get(ctx context.Context, id DomainID) (DomainMetadata, error)
func (*DomainMetadataService) List ¶
func (srv *DomainMetadataService) List(ctx context.Context) ([]DomainMetadata, error)
type DomainService ¶
type DomainService service
func (*DomainService) Delete ¶
func (srv *DomainService) Delete(ctx context.Context, id DomainID) error
func (*DomainService) Disable ¶
func (srv *DomainService) Disable(ctx context.Context, id DomainID) error
func (*DomainService) DisableBatch ¶
func (srv *DomainService) DisableBatch(ctx context.Context, ids []DomainID) error
func (*DomainService) List ¶
func (srv *DomainService) List(ctx context.Context, filter *DomainFilter) ([]Domain, error)
type DomainStats ¶
type DomainStatsService ¶
type DomainStatsService service
func (*DomainStatsService) Get ¶
func (srv *DomainStatsService) Get(ctx context.Context) (DomainStats, error)
type ExternalID ¶
type HijackDetails ¶
type Initiator ¶
type Initiator struct { InitType string `json:"type"` URL string `json:"url"` Line string `json:"line"` Column string `json:"column"` }
Initiator holds all information about the initiator of an request/malware issue
type Issue ¶
type Issue struct { ID IssueID `json:"id"` Domain DomainID `json:"domain"` Status IssueStatus `json:"status"` Event string `json:"event"` Category string `json:"category"` Severity int `json:"severity"` FirstSeen time.Time `json:"firstSeen"` LastSeen time.Time `json:"lastSeen"` Regions []string `json:"regions,omitempty"` Viewports []string `json:"viewports,omitempty"` Details interface{} `json:"details,omitempty"` ExternalIDs []ExternalID `json:"externalIds,omitempty"` }
func (*Issue) UnmarshalJSON ¶
UnmarshalJSON unmarshals Issues and attaches the correct Details type instead of the interface{}
type IssueCount ¶
type IssueFilter ¶
type IssueFilter struct { Status IssueStatus `url:"status,omitempty"` Severity int `url:"severity,omitempty"` Event string `url:"event,omitempty"` Category string `url:"category,omitempty"` Limit int `url:"limit,omitempty"` Sort string `url:"sort,omitempty"` ExternalID string `url:"externalId,omitempty"` }
type IssueHistory ¶
type IssueHistory map[string]IssueCount
type IssueService ¶
type IssueService service
func (*IssueService) List ¶
func (srv *IssueService) List(ctx context.Context, filter *IssueFilter) ([]Issue, error)
func (*IssueService) ListByDomain ¶
func (srv *IssueService) ListByDomain(ctx context.Context, id DomainID, filter *IssueFilter) ([]Issue, error)
func (*IssueService) Update ¶
func (srv *IssueService) Update(ctx context.Context, id IssueID, update IssueUpdate) (Issue, error)
type IssueStatus ¶
type IssueStatus string
const ( IssueStatusPending IssueStatus = "pending" IssueStatusAcknowledged IssueStatus = "acknowledged" IssueStatusIgnored IssueStatus = "ignored" IssueStatusFalsePositive IssueStatus = "falsepositive" )
type IssueUpdate ¶
type IssueUpdate struct { Status IssueStatus `json:"status"` Comment string `json:"comment"` ExternalIDs []ExternalID `json:"externalIds"` }
type IssuesSummary ¶
type IssuesSummary struct { Domain DomainID `json:"domain"` MalwareSeverity int `json:"malwareSeverity"` WebshellSeverity int `json:"webshellSeverity"` ApplicationSeverity int `json:"applicationSeverity"` TLSSeverity int `json:"tlsSeverity"` ReputationSeverity int `json:"reputationSeverity"` DefacementSeverity int `json:"defacementSeverity"` MalwareCount int `json:"malwareCount"` WebShellCount int `json:"webShellCount"` ApplicationCount int `json:"applicationCount"` TLSCount int `json:"tlsCount"` ReputationCount int `json:"reputationCount"` DefacementCount int `json:"defacementCount"` }
type LastlineDetails ¶
type MalwareDetails ¶
type Notification ¶
type NotificationID ¶
type NotificationID int64
type NotificationService ¶
type NotificationService service
func (*NotificationService) Create ¶
func (srv *NotificationService) Create(ctx context.Context, create Notification) (Notification, error)
func (*NotificationService) Delete ¶
func (srv *NotificationService) Delete(ctx context.Context, id NotificationID) error
func (*NotificationService) Get ¶
func (srv *NotificationService) Get(ctx context.Context, id NotificationID) (Notification, error)
func (*NotificationService) List ¶
func (srv *NotificationService) List(ctx context.Context) ([]Notification, error)
func (*NotificationService) ListByDomain ¶
func (srv *NotificationService) ListByDomain(ctx context.Context, id DomainID) ([]Notification, error)
func (*NotificationService) ListByUser ¶
func (srv *NotificationService) ListByUser(ctx context.Context, id UserID) ([]Notification, error)
func (*NotificationService) Update ¶
func (srv *NotificationService) Update(ctx context.Context, id NotificationID, update NotificationUpdate) (Notification, error)
type NotificationUpdate ¶
type ParkedDomainDetails ¶
type SRIDetails ¶
type Screenshot ¶
type ScreenshotFilter ¶
type ScreenshotService ¶
type ScreenshotService service
func (*ScreenshotService) GetImage ¶
func (srv *ScreenshotService) GetImage(ctx context.Context, id DomainID, typez ScreenshotType) ([]byte, error)
func (*ScreenshotService) GetScreenshots ¶
func (srv *ScreenshotService) GetScreenshots(ctx context.Context, id DomainID, filter *ScreenshotFilter) (Screenshot, error)
type ScreenshotType ¶
type ScreenshotType string
type SeospamDetails ¶
type SeospamDetails struct { Profile string `json:"profile"` CrawlerResult SeospamResult `json:"crawlerResult"` GooglebotResult SeospamResult `json:"googlebotResult"` }
type SeospamResult ¶
type SuspiciousLinkDetails ¶
type SuspiciousLinkDetails struct { URL string `json:"url"` Links []struct { Link string `json:"link"` Blacklists []BlacklistDetails `json:"blacklists"` } `json:"links"` }
type SuspiciousRequestDetails ¶
type SuspiciousRequestDetails struct { Entity string `json:"entity"` URLs []string `json:"urls"` Blacklists []BlacklistDetails `json:"blacklists"` }
type TLSCertificateDetails ¶
type TLSConfigurationDetails ¶
type TakeoverDNSDetails ¶
type User ¶
type User struct { ID UserID `json:"id"` Login string `json:"login"` Mail string `json:"mail"` Role string `json:"role"` Company string `json:"company"` Surname string `json:"surname"` Forename string `json:"forename"` Title string `json:"title"` Mobile string `json:"mobile"` Password string `json:"password"` SignatureKey string `json:"signatureKey"` }
type UserConfig ¶
type UserDomains ¶
type UserDomains struct {
Domains []DomainID `json:"domains"`
}
type WebshellDetails ¶
type ZoneHDetails ¶
Click to show internal directories.
Click to hide internal directories.