Documentation ¶
Index ¶
- Variables
- type ASN
- type Asset
- type AssetComment
- type AssetCommentService
- type AssetDisabledService
- type AssetExternal
- type AssetExternalService
- type AssetFilter
- type AssetInfo
- type AssetInfoASN
- type AssetInfoApplication
- type AssetInfoApplications
- type AssetInfoDiscovery
- type AssetInfoLinks
- type AssetInfoType
- type AssetInfoValidation
- type AssetPatch
- type AssetPost
- type AssetService
- func (srv AssetService) Create(create Asset) (Asset, error)
- func (srv AssetService) Delete(assetID string) error
- func (srv AssetService) Disable(assetID string, patch *DisablePatch) error
- func (srv AssetService) Get(assetID string) (Asset, error)
- func (srv AssetService) GetIssues(assetID string) ([]Issue, error)
- func (srv AssetService) List(filter *AssetFilter) ([]Asset, error)
- func (srv AssetService) Patch(assetID string, patch AssetPatch) (Asset, error)
- type AssetTag
- type AssetTagService
- type Bundle
- type BundleService
- type Client
- type ClientConfig
- type Contact
- type ContactService
- func (srv ContactService) Create(create Contact) (Contact, error)
- func (srv ContactService) Delete(contactID string) error
- func (srv ContactService) Get(contactID string) (Contact, error)
- func (srv ContactService) List() ([]Contact, error)
- func (srv ContactService) Update(contactID string, update Contact) (Contact, error)
- type ContentPolicyDetails
- type CookieDetails
- type CookiePolicyDetails
- type DanglingDNSDetails
- type DisablePatch
- type DisabledAsset
- type DisabledAssetFilter
- type DiscoveryInput
- type Endpoint
- type Error
- type FormDetails
- type IPAS
- type Initiator
- type InputDetails
- type Issue
- type IssueExternal
- type IssueExternalService
- type IssueFilter
- type IssuePatch
- type IssueService
- type IssueStatus
- type IssueType
- type Metadata
- type MetadataFilter
- type MetadataService
- type Redirect
- type Severity
- type StatusCodeDetails
- type Tag
- type TagService
- type TagType
- type TrackerCategory
- type TrackerDetails
- type TrackerPolicyDetails
- type URLValue
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEndpoint = Endpoint{
AuthURL: "https://auth.nimbusec.com/oauth2/token",
ServerURL: "https://compliance.nimbusec.com",
}
Functions ¶
This section is empty.
Types ¶
type AssetComment ¶
type AssetCommentService ¶
type AssetCommentService service
func (AssetCommentService) Create ¶
func (srv AssetCommentService) Create(assetID string, create []AssetComment) ([]AssetComment, error)
func (AssetCommentService) Delete ¶
func (srv AssetCommentService) Delete(assetID, commentID string) error
func (AssetCommentService) List ¶
func (srv AssetCommentService) List(assetID string) ([]AssetComment, error)
type AssetDisabledService ¶
type AssetDisabledService service
func (AssetDisabledService) Enable ¶
func (srv AssetDisabledService) Enable(assetID string) (DisabledAsset, error)
func (AssetDisabledService) List ¶
func (srv AssetDisabledService) List(filter *DisabledAssetFilter) ([]DisabledAsset, error)
type AssetExternal ¶
type AssetExternalService ¶
type AssetExternalService service
func (AssetExternalService) Create ¶
func (srv AssetExternalService) Create(assetID string, create []AssetExternal) ([]AssetExternal, error)
func (AssetExternalService) Delete ¶
func (srv AssetExternalService) Delete(assetID, externalID string) error
func (AssetExternalService) List ¶
func (srv AssetExternalService) List(assetID string) ([]AssetExternal, error)
type AssetFilter ¶
type AssetFilter struct { OnlySecurity bool `json:"onlySecurity"` // only security assets OnlyCompliance bool `json:"onlyCompliance"` // only compliance assets Name []string `json:"name"` // idfy Origin []string `json:"origin"` CreatedAt []string `json:"createdAt"` Contact []string `json:"contact"` // contact mail }
type AssetInfo ¶
type AssetInfo struct { AssetID string `json:"assetID"` Type AssetInfoType `json:"type"` Details interface{} `json:"details"` ChangedAt time.Time `json:"changedAt"` }
type AssetInfoASN ¶
type AssetInfoApplication ¶
type AssetInfoApplication struct { Name string `json:"name"` Version string `json:"version,omitempty"` Path string `json:"path,omitempty"` Category string `json:"category"` Source string `json:"source"` Latest bool `json:"latest"` Vulnerable bool `json:"vulnerable"` Consented bool `json:"consented"` }
type AssetInfoApplications ¶
type AssetInfoApplications []AssetInfoApplication
type AssetInfoDiscovery ¶
type AssetInfoDiscovery struct { Sources []DiscoveryInput `json:"sources"` Redirects []Redirect `json:"redirects"` }
type AssetInfoLinks ¶
type AssetInfoType ¶
type AssetInfoType string
const ( AssetInfoTypeASN AssetInfoType = "asn" AssetInfoTypeValidation AssetInfoType = "validation" AssetInfoTypeDiscovery AssetInfoType = "discovery" AssetInfoTypeApplication AssetInfoType = "application" AssetInfoTypeLinks AssetInfoType = "links" )
type AssetInfoValidation ¶
type AssetInfoValidation struct { Redirects []Redirect `json:"redirects"` HasBadRedirect bool `json:"hasBadRedirect"` Scheme string `json:"scheme"` StatusCode int `json:"statusCode"` HasHTTP bool `json:"hasHTTP"` HasHTTPS bool `json:"hasHTTPS"` HostsDifferent bool `json:"hostsDifferent"` ContentEqual bool `json:"contentEqual"` HTTPDowngrade bool `json:"httpDowngrade"` }
type AssetPatch ¶
type AssetPost ¶
type AssetPost struct { AssetPatch ExternalID *string `json:"externalID"` }
type AssetService ¶
type AssetService service
func (AssetService) Delete ¶
func (srv AssetService) Delete(assetID string) error
func (AssetService) Disable ¶
func (srv AssetService) Disable(assetID string, patch *DisablePatch) error
func (AssetService) List ¶
func (srv AssetService) List(filter *AssetFilter) ([]Asset, error)
func (AssetService) Patch ¶
func (srv AssetService) Patch(assetID string, patch AssetPatch) (Asset, error)
type AssetTagService ¶
type AssetTagService service
func (AssetTagService) Create ¶
func (srv AssetTagService) Create(assetID string, create []Tag) ([]Tag, error)
func (AssetTagService) Link ¶
func (srv AssetTagService) Link(assetID, tagID string) error
func (AssetTagService) Unlink ¶
func (srv AssetTagService) Unlink(assetID, tagID string) error
type BundleService ¶
type BundleService service
func (BundleService) List ¶
func (srv BundleService) List() ([]Bundle, error)
type Client ¶
type Client struct { Tags *TagService Bundles *BundleService Contacts *ContactService Issues *IssueService IssueExternals *IssueExternalService Metadata *MetadataService Assets *AssetService DisabledAssets *AssetDisabledService AssetTags *AssetTagService AssetExternals *AssetExternalService AssetComments *AssetCommentService // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config ClientConfig) *Client
type ClientConfig ¶
type ContactService ¶
type ContactService service
func (ContactService) Delete ¶
func (srv ContactService) Delete(contactID string) error
func (ContactService) List ¶
func (srv ContactService) List() ([]Contact, error)
type ContentPolicyDetails ¶
type CookieDetails ¶
type CookieDetails struct { Name string `json:"name"` URLValues []URLValue `json:"urlValues"` // URLValues[value]{url,url...} Domain string `json:"domain"` HTTPOnly bool `json:"httpOnly"` Lifetime int64 `json:"lifetime"` SameSite string `json:"sameSite"` Secure bool `json:"secure"` ThirdParty bool `json:"thirdParty"` InGlobalWhitelist bool `json:"inGlobalWhitelist"` InCustomWhitelist bool `json:"inCustomWhitelist"` InServerResponse bool `json:"inServerResponse"` Consented bool `json:"consented"` }
type CookiePolicyDetails ¶
type CookiePolicyDetails struct {
CookieDetails
}
type DanglingDNSDetails ¶
type DisablePatch ¶
type DisablePatch struct {
Reason string `json:"reason"`
}
type DisabledAsset ¶
type DisabledAssetFilter ¶
type DiscoveryInput ¶
type Error ¶
type FormDetails ¶
type FormDetails struct { URLs []string `json:"urls"` Name string `json:"name"` FormID string `json:"formID,omitempty"` Action string `json:"action"` Method string `json:"method"` InputFields []InputDetails `json:"inputDetails"` HTTPTransmit bool `json:"httpTransmit"` ExternalTransmit bool `json:"externalTransmit"` // if it contains input fields that violates either art 9 or 10 once Art9 bool `json:"art9"` Art10 bool `json:"art10"` }
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 InputDetails ¶
type InputDetails struct { InputName string `json:"inputName"` InputType string `json:"inputType"` InputID string `json:"inputID,omitempty"` InputAutocomplete string `json:"inputAutocomplete"` InputPlaceholder string `json:"inputPlaceholder"` Category string `json:"category"` Art9 bool `json:"art9"` Art10 bool `json:"art10"` }
type Issue ¶
type Issue struct { ID string `json:"id"` AssetID string `json:"assetID"` Type IssueType `json:"type"` Severity Severity `json:"severity"` Status IssueStatus `json:"status"` StatusChangedAt time.Time `json:"statusChangedAt"` CreatedAt time.Time `json:"createdAt"` LastSeenAt time.Time `json:"lastSeenAt"` Details interface{} `json:"details"` CommentID *string `json:"commentID"` }
type IssueExternal ¶
type IssueExternalService ¶
type IssueExternalService service
func (IssueExternalService) Create ¶
func (srv IssueExternalService) Create(issueID string, create []IssueExternal) ([]IssueExternal, error)
func (IssueExternalService) Delete ¶
func (srv IssueExternalService) Delete(issueID string) error
func (IssueExternalService) List ¶
func (srv IssueExternalService) List(issueID string) ([]IssueExternal, error)
type IssueFilter ¶
type IssueFilter struct { Statuses []IssueStatus `json:"statuses" url:"status"` Externals []string `json:"externals"` }
type IssuePatch ¶
type IssuePatch struct { IssueID string `json:"issueID"` Status IssueStatus `json:"status"` Comment *string `json:"comment"` }
type IssueService ¶
type IssueService service
func (IssueService) List ¶
func (srv IssueService) List(filter *IssueFilter) ([]Issue, error)
func (IssueService) Patch ¶
func (srv IssueService) Patch(issueID string, patch IssuePatch) (Issue, error)
func (IssueService) PatchList ¶
func (srv IssueService) PatchList(patches []IssuePatch) ([]Issue, error)
type IssueStatus ¶
type IssueStatus int
const ( IssueStatusPending IssueStatus = 1 IssueStatusOK IssueStatus = 2 // acknowledged status IssueStatusIgnored IssueStatus = 3 IssueStatusAutoOK IssueStatus = 7 )
type IssueType ¶
type IssueType string
const ( IssueTypeComplianceContentPolicy IssueType = "compliance_content_policy" IssueTypeComplianceCookieOptIn IssueType = "compliance_cookie_opt_in" IssueTypeComplianceCookiePolicy IssueType = "compliance_cookie_policy" IssueTypeComplianceFormHTTP IssueType = "compliance_form_http" IssueTypeComplianceFormExternal IssueType = "compliance_form_external" IssueTypeComplianceFormSensitive IssueType = "compliance_form_sensitive" IssueTypeComplianceStatusCode IssueType = "compliance_status_code" IssueTypeComplianceTrackerOptIn IssueType = "compliance_tracker_opt_in" IssueTypeComplianceTrackerPolicy IssueType = "compliance_tracker_policy" IssueTypeDanglingDNS IssueType = "dangling-dns" )
type Metadata ¶
type Metadata struct { AssetID string `json:"assetID"` Infos map[AssetInfoType]AssetInfo `json:"infos"` }
type MetadataFilter ¶
type MetadataFilter struct {
Types []string `url:"type,omitempty"`
}
type MetadataService ¶
type MetadataService service
func (MetadataService) List ¶
func (srv MetadataService) List(filter *MetadataFilter) ([]Metadata, error)
type StatusCodeDetails ¶
type TagService ¶
type TagService service
func (TagService) Delete ¶
func (srv TagService) Delete(tagID string) error
func (TagService) List ¶
func (srv TagService) List() ([]Tag, error)
type TrackerCategory ¶
type TrackerCategory string
type TrackerDetails ¶
type TrackerPolicyDetails ¶
type TrackerPolicyDetails struct { TrackerDetails Rule string `json:"rule"` }
Click to show internal directories.
Click to hide internal directories.