Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIErrorMedia = MediaType("error", func() {
Description("Error")
Attributes(func() {
Attribute("code", Integer, "Code")
Attribute("error", String, "Error")
Attribute("type", String, "Type")
Required("code", "error", "type")
})
View("default", func() {
Attribute("code")
Attribute("error")
Attribute("type")
})
})
View Source
var APIKey = APIKeySecurity("Bearer", func() {
Header("authorization")
})
View Source
var AssetAnnotationDeleteRequest = Type("AssetAnnotationDeleteRequest", func() { Attribute("annotations", ArrayOf(String), func() { Example([]string{ "annotation/1", "annotation/2", }) }) })
View Source
var AssetAnnotationRequest = Type("AssetAnnotationRequest", func() { Attribute("annotations", HashOf(String, String), func() { Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) })
View Source
var AssetAnnotationsResponse = MediaType("assetannotations_response", func() { Description("Asset Annotations") Attributes(func() { Attribute("annotations", HashOf(String, String), func() { Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) }) View("default", func() { Attribute("annotations") }) })
View Source
var AssetErrorMedia = MediaType("asseterror", func() {
Description("Create Assets Errors")
Attributes(func() {
Attribute("id", Integer, "ID", func() { Example(0) })
Attribute("error", String, "Error", func() { Example("Invalid asset type: FooBar") })
})
View("default", func() {
Attribute("id")
Attribute("error")
})
})
View Source
var AssetGroupMedia = MediaType("assetGroup", func() { Description("Asset group") Attributes(func() { Attribute("asset", AssetMedia, "Asset") Attribute("group", GroupMedia, "Group") }) View("default", func() { Attribute("asset") Attribute("group") }) })
View Source
var AssetGroupPayload = Type("AssetGroupPayload", func() {
Attribute("asset_id", String, "Asset ID", func() { Example("0fc67150-5cd9-486a-aca5-9c9167478e4d") })
Required("asset_id")
})
View Source
var AssetMedia = MediaType("asset", func() { Description("Asset") Attributes(func() { Attribute("id", String, "Asset ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") }) Attribute("type", AssetTypeMedia, "Type") Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("classified_at", String, "Classified At", func() { Example("2020-09-03T15:00:42.112975Z") }) Attribute("alias", String, "Alias", func() { Example("AnAlias") }) Attribute("annotations", HashOf(String, String), func() { Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) }) View("default", func() { Attribute("id") Attribute("type") Attribute("identifier") Attribute("options") Attribute("environmental_cvss") Attribute("rolfp") Attribute("alias") Attribute("scannable") Attribute("classified_at") Attribute("annotations") }) })
View Source
var AssetPayload = Type("AssetPayload", func() { Attribute("type", String, "Type", func() { Example("Hostname") }) Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("alias", String, "The alias of the asset in Vulcan", func() { Example("AnAlias") }) Required("identifier") })
View Source
var AssetResponseMedia = MediaType("assetResponse", func() { Description("Asset") Attributes(func() { Attribute("id", String, "Asset ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") }) Attribute("type", AssetTypeMedia, "Type") Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("classified_at", String, "Classified At", func() { Example("2020-09-03T15:00:42.112975Z") }) Attribute("alias", String, "Alias", func() { Example("AnAlias") }) Attribute("status", APIErrorMedia, "Status") }) View("default", func() { Attribute("id") Attribute("type") Attribute("identifier") Attribute("options") Attribute("environmental_cvss") Attribute("rolfp") Attribute("scannable") Attribute("classified_at") Attribute("alias") Attribute("status") }) })
View Source
var AssetTypeMedia = MediaType("assetType", func() {
Description("Asset Type")
Attributes(func() {
Attribute("id", String, "Asset Type ID", func() { Example("29f83d16-09c4-4be5-8cae-e232d41f388a") })
Attribute("name", String, "Name", func() { Example("Hostname") })
})
View("default", func() {
Attribute("id")
Attribute("name")
})
})
View Source
var AssetUpdatePayload = Type("AssetUpdatePayload", func() { Attribute("type", String, "Type", func() { Example("Hostname") }) Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("alias", String, "Alias", func() { Example("AnAlias") }) })
View Source
var AssetWithAnnotationsPayload = Type("AssetWithAnnotationsPayload", func() { Attribute("type", String, "Type", func() { Example("Hostname") }) Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("alias", String, "The alias of the asset in Vulcan", func() { Example("AnAlias") }) Attribute("annotations", HashOf(String, String), func() { Description(`The provided annotations may differ from the ones that will be stored, because they will include a prefix to not mess with any other annotations already present in the asset.`) Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) Required("identifier") Required("type") })
View Source
var AttachmentMedia = MediaType("attachment", func() { Description("attachment") Attributes(func() { Attribute("name", String, "Attachment name", func() { Example("JSON string") }) Attribute("content_type", String, "Content Type of the attachment", func() { Example("application/json") }) Attribute("data", Any, "attachment data", func() { Example([]byte{123, 125}) }) }) View("default", func() { Attribute("name") Attribute("content_type") Attribute("data") }) })
Attachment
View Source
var CreateAssetPayload = Type("CreateAssetPayload", func() { Attribute("assets", ArrayOf(AssetPayload)) Attribute("groups", ArrayOf(String), func() { Example([]string{ "a14c7c65-66ab-4676-bcf6-0dea9719f5c6", "9f7a0c78-b752-4126-aa6d-0f286ada7b8f", }) }) Attribute("annotations", HashOf(String, String), func() { Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) Required("assets") })
View Source
var CreateAssetsMedia = MediaType("create_assets", func() { Description("Create Assets") Attributes(func() { Attribute("assets", CollectionOf(AssetMedia), "Assets") Attribute("errors", CollectionOf(AssetErrorMedia), "Errors") }) View("default", func() { Attribute("assets") Attribute("errors") }) })
View Source
var DigestPayload = Type("DigestPayload", func() {
Attribute("start_date", String, "Start Date", func() { Example("2020-08-11") })
Attribute("end_date", String, "End Date", func() { Example("2020-09-10") })
})
View Source
var DiscoveredAssetsPayload = Type("DiscoveredAssetsPayload", func() { Attribute("assets", ArrayOf(AssetWithAnnotationsPayload)) Attribute("group_name", String, func() { Description(`The discovery group name where assets will be added. It must end with '-discovered-assets'. The first part of the name should identify the discovery service using the endpoint`) Example("discoveryserviceX-discovered-assets") }) Required("group_name") })
View Source
var FindingMedia = MediaType("finding", func() { Description("Finding") Attributes(func() { Attribute("id", String, "Finding ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") }) Attribute("issue", IssueMedia, "Issue") Attribute("target", TargetMedia, "Target") Attribute("affected_resource", String, "Affected Resource", func() { Example("") }) Attribute("source", SourceMedia, "Source") Attribute("details", String, "Details", func() { Example("") }) Attribute("impact_details", String, "Impact details", func() { Example("") }) Attribute("status", String, "Status", func() { Example("OPEN") }) Attribute("score", Number, "Score", func() { Example(6.9) }) Attribute("current_exposure", Number, "Current exposure (hours). Only for OPEN findings", func() { Example(4631) }) Attribute("total_exposure", Number, "Total exposure (hours)", func() { Example(4631) }) Attribute("resources", ArrayOf(ResourceMedia), "Resources") Attribute("attachments", ArrayOf(AttachmentMedia), "Attachments") }) View("default", func() { Attribute("id") Attribute("issue") Attribute("target") Attribute("affected_resource") Attribute("source") Attribute("details") Attribute("impact_details") Attribute("status") Attribute("score") Attribute("current_exposure") Attribute("total_exposure") Attribute("resources") Attribute("attachments") }) })
Findings
View Source
var FindingOverwriteMedia = MediaType("finding_overwrite", func() {
Description("Finding Overwrite")
Attributes(func() {
Attribute("id", String, "Finding Overwrite ID", func() { Example("b0720503-0a84-43fd-9cf4-5bb6c500226f") })
Attribute("user", String, "User who requested the finding overwrite", func() { Example("user@adevinta.com") })
Attribute("finding_id", String, "Finding ID", func() { Example("3c7d7003-c53d-4ccc-80e7-f21da241b2d4") })
Attribute("status", String, "The status requested for the finding referenced by the finding_id field", func() { Example("FALSE_POSITIVE") })
Attribute("status_previous", String, "The previous status for the finding referenced by the finding_id field", func() { Example("OPEN") })
Attribute("notes", String, "Complementary information", func() { Example("This finding is a false positive because...") })
Attribute("team_id", String, "The ID associated to the team who requested this overwrite", func() { Example("a9d33628-ddb0-467c-b482-474887097820") })
Attribute("created_at", DateTime, "Creation time", func() { Example("2021-03-27T00:26:43.211506Z") })
})
View("default", func() {
Attribute("id")
Attribute("user")
Attribute("finding_id")
Attribute("status")
Attribute("status_previous")
Attribute("notes")
Attribute("team_id")
Attribute("created_at")
})
})
FindingOverwrite
View Source
var FindingOverwritePayload = Type("FindingOverwritePayload", func() {
Attribute("status", String, "Status", func() { Example("FALSE_POSITIVE") })
Attribute("notes", String, "Notes", func() { Example("This is a false positive because...") })
Required("status")
Required("notes")
})
View Source
var FindingsIssueMedia = MediaType("findings_issue", func() {
Description("Findings by Issue")
Attributes(func() {
Attribute("issue_id", String, "Issue ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") })
Attribute("summary", String, "Issue summary", func() { Example("Site Without HTTPS") })
Attribute("targets_count", Number, "Number of targets affected by the issue", func() { Example(14) })
Attribute("resources_count", Number, "Number of affected resources by the issue", func() { Example(28) })
Attribute("max_score", Number, "Max score for the issue among the affected assets", func() { Example(6.9) })
})
View("default", func() {
Attribute("issue_id")
Attribute("summary")
Attribute("targets_count")
Attribute("resources_count")
Attribute("max_score")
})
})
FindingsIssue
View Source
var FindingsIssuesListMedia = MediaType("findings_issues_list", func() { Description("Findings by Issue list") Attributes(func() { Attribute("issues", CollectionOf(FindingsIssueMedia), "List of affected assets by issue") Attribute("pagination", PaginationMedia, "Pagination info") }) View("default", func() { Attribute("issues") Attribute("pagination") }) })
View Source
var FindingsLabelsMedia = MediaType("findings_labels", func() { Description("Findings Labels") Attributes(func() { Attribute("labels", ArrayOf(String), "associated labels", func() { Example([]string{"Web", "HTTP"}) }) }) View("default", func() { Attribute("labels") }) })
FindingsLabels
View Source
var FindingsListMedia = MediaType("findings_list", func() { Description("Findings list") Attributes(func() { Attribute("findings", CollectionOf(FindingMedia), "List of findings") Attribute("pagination", PaginationMedia, "Pagination info") }) View("default", func() { Attribute("findings") Attribute("pagination") }) })
View Source
var FindingsTargetMedia = MediaType("findings_target", func() {
Description("Findings by Target")
Attributes(func() {
Attribute("target_id", String, "Target ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") })
Attribute("identifier", String, "Target Identifier", func() { Example("vulcan.example.com") })
Attribute("findings_count", Number, "Number of findings for the target", func() { Example(5) })
Attribute("issues_count", Number, "Number of issues for the target", func() { Example(2) })
Attribute("max_score", Number, "Max score for the issue among the affected assets", func() { Example(6.9) })
})
View("default", func() {
Attribute("target_id")
Attribute("identifier")
Attribute("findings_count")
Attribute("issues_count")
Attribute("max_score")
})
})
FindingsTarget
View Source
var FindingsTargetsListMedia = MediaType("findings_targets_list", func() { Description("Findings by Target list") Attributes(func() { Attribute("targets", CollectionOf(FindingsTargetMedia), "List of findings per asset") Attribute("pagination", PaginationMedia, "Pagination info") }) View("default", func() { Attribute("targets") Attribute("pagination") }) })
View Source
var GroupMedia = MediaType("group", func() {
Description("Group")
Attributes(func() {
Attribute("id", String, "Group ID", func() { Example("f6360346-77a5-4f97-b919-331363b3af26") })
Attribute("name", String, "Name", func() { Example("Default group") })
Attribute("description", String, "Description", func() { Example("All newly created assets are added to the Default group") })
Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") })
Attribute("assets_count", Integer, "Assets Count", func() { Example(1) })
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("description")
Attribute("options")
Attribute("assets_count")
})
View("WithoutAssetsCount", func() {
Attribute("id")
Attribute("name")
Attribute("description")
Attribute("options")
})
})
View Source
var GroupPayload = Type("GroupPayload", func() {
Attribute("name", String, "name", func() { Example("Default group") })
Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") })
Required("name")
})
View Source
var HealthcheckMedia = MediaType("healthcheck", func() {
Description("Healthcheck")
Attributes(func() {
Attribute("status", String, "Status", func() { Example("OK") })
})
View("default", func() {
Attribute("status")
})
})
View Source
var IssueMedia = MediaType("issue", func() { Description("Issue") Attributes(func() { Attribute("id", String, "Issue ID", func() { Example("b0720503-0a84-43fd-9cf4-5bb6c500226f") }) Attribute("summary", String, "Issue summary", func() { Example("MX presence") }) Attribute("cwe_id", Number, "Common Weakness Enumeration ID", func() { Example(358) }) Attribute("description", String, "Issue description", func() { Example("This domain has at least one MX record") }) Attribute("recommendations", ArrayOf(String), "Recommendations to fix the issue", func() { Example([]string{"It is recommended to run DMARC"}) }) Attribute("reference_links", ArrayOf(String), "Documentation reference for the issue", func() { Example([]string{}) }) Attribute("labels", ArrayOf(String), "Associated labels", func() { Example([]string{"Web", "HTTP"}) }) }) View("default", func() { Attribute("id") Attribute("summary") Attribute("cwe_id") Attribute("description") Attribute("recommendations") Attribute("reference_links") Attribute("labels") }) })
Issue
View Source
var JobMedia = MediaType("job", func() {
Description("Job")
Attributes(func() {
Attribute("id", String, "Job ID", func() { Example("967d9966-b561-4233-bd6f-cac603fd8320") })
Attribute("team_id", String, "Team ID", func() { Example("9cb0bb2b-ca36-4877-acad-9dde23880595") })
Attribute("operation", String, "Operation that triggered the job", func() { Example("OnboardDiscoveredAssets") })
Attribute("status", String, func() {
Description(`Indicates the status of the operation. The possible values are:
- 'PENDING': The job has been noted and is pending to be processed
- 'RUNNING': The job is on execution
- 'DONE': The job has finished, either successfully or unsuccesfully. Result.error needs to be processed to determine it`)
Example("PROCESSING")
})
Attribute("result", func() {
Description("Result of the job operation")
Attribute("data", Any, func() {
Description("Optionally populated field when the job finishes correctly, that returns execution related data. The format of the data is defined per operation type")
Example(`{"assets : ["abb77c5e-2442-4673-9d0a-957fb43e416c", "2e016860-f772-416d-b551-bf384351dd5f"}`)
})
Attribute("error", String, func() {
Description("When not empty indicates that the job failed")
Example("Invalid asset type")
})
})
})
View("default", func() {
Attribute("id")
Attribute("team_id")
Attribute("operation")
Attribute("status")
Attribute("result")
})
})
View Source
var ListAssetGroupMedia = MediaType("listAssetGroup", func() { Description("List asset group") Attributes(func() { Attribute("assets", CollectionOf(AssetMedia), "Asset") Attribute("group", GroupMedia, "Group") }) View("default", func() { Attribute("assets") Attribute("group") }) })
View Source
var ListAssetMedia = MediaType("ListAssetEntry", func() { Description("List Asset Entry") Attributes(func() { Attribute("id", String, "Asset ID", func() { Example("a8720503-0284-45fd-9cf4-5bb6c500966f") }) Attribute("type", AssetTypeMedia, "Type") Attribute("identifier", String, "Identifier", func() { Example("vulcan.example.com") }) Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") }) Attribute("environmental_cvss", String, "Environmental CVSS", func() { Example("AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H") }) Attribute("rolfp", String, "Rolfp plus scope vector", func() { Example("R:1/O:1/L:0/F:0/P:0+S:1") }) Attribute("scannable", Boolean, "Scannable", func() { Example(true) }) Attribute("classified_at", String, "Classified At", func() { Example("2020-09-03T15:00:42.112975Z") }) Attribute("alias", String, "Alias", func() { Example("AnAlias") }) Attribute("groups", CollectionOf(GroupMedia), "Groups") Attribute("annotations", HashOf(String, String), func() { Example(map[string]string{ "annotation/1": "value/1", "annotation/2": "value/2", }) }) }) View("default", func() { Attribute("id") Attribute("type") Attribute("identifier") Attribute("options") Attribute("environmental_cvss") Attribute("rolfp") Attribute("alias") Attribute("scannable") Attribute("classified_at") Attribute("groups", func() { View("WithoutAssetsCount") }) Attribute("annotations") }) })
View Source
var PaginationMedia = MediaType("pagination", func() {
Description("Pagination info")
Attributes(func() {
Attribute("limit", Number, "Limit of results for the list")
Attribute("offset", Number, "Results list offset")
Attribute("total", Number, "Total number of results for the list")
Attribute("more", Boolean, "Indicates if there are more results to query for the list")
})
View("default", func() {
Attribute("limit")
Attribute("offset")
Attribute("total")
Attribute("more")
})
})
Pagination
View Source
var PolicyMedia = MediaType("policy", func() {
Description("Policy")
Attributes(func() {
Attribute("id", String, "Policy ID", func() {
Example("af36818a-0f30-412c-9692-d37716075861")
})
Attribute("name", String, "Name", func() { Example("Sample Policy") })
Attribute("settings_count", Integer, "Policy settings count", func() { Example(12) })
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("settings_count")
})
})
View Source
var PolicyPayload = Type("PolicyPayload", func() {
Attribute("name", String, "name", func() { Example("Sample Policy") })
Required("name")
})
View Source
var PolicySettingPayload = Type("PolicySettingPayload", func() {
Attribute("checktype_name", String, "Check Type Name", func() { Example("vulcan-tls") })
Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") })
Required("checktype_name")
})
View Source
var PolicySettingUploadPayload = Type("PolicySettingUploadPayload", func() {
Attribute("checktype_name", String, "Check Type Name", func() { Example("vulcan-tls") })
Attribute("options", String, "Options", func() { Example("{\"timeout\":60}") })
})
View Source
var PolicySettingsMedia = MediaType("PolicySetting", func() {
Description("Policy Setting")
Attributes(func() {
Attribute("id", String, "Policy ID", func() { Example("5e51174d-3755-48b2-98bf-37e37cb07f6e") })
Attribute("checktype_name", String, "Check Type Name", func() { Example("vulcan-tls") })
Attribute("options", String, "options", func() { Example("{\"timeout\":60}") })
})
View("default", func() {
Attribute("id")
Attribute("checktype_name")
Attribute("options")
})
})
View Source
var PolicyUpdatePayload = Type("PolicyUpdatePayload", func() {
Attribute("name", String, "name", func() { Example("Sample Policy") })
})
View Source
var ProgramMedia = MediaType("program", func() { Description("Program") Attributes(func() { Attribute("id", String, "Program ID", func() { Example("9a100645-e51a-4e71-8a4f-1e462ce9a40d") }) Attribute("policy_groups", ArrayOf(ProgramPolicyGroupMedia), "PolicyGroup") Attribute("name", String, "Name", func() { Example("Every midnight") }) Attribute("global", Boolean, "Global") Attribute("schedule", ScheduleMedia, "Schedule") Attribute("autosend", Boolean, "Autosend") Attribute("disabled", Boolean, "Disabled") }) View("default", func() { Attribute("id") Attribute("policy_groups") Attribute("name") Attribute("global") Attribute("schedule") Attribute("autosend") Attribute("disabled") }) })
View Source
var ProgramPayload = Type("ProgramPayload", func() { Attribute("policy_groups", ArrayOf(ProgramPolicyGroupPayload), "PolicyGroups") Attribute("name", String, "name", func() { Example("Every midnight") }) Attribute("autosend", Boolean, "Autosend") Attribute("disabled", Boolean, "Disabled") })
View Source
var ProgramPolicyGroupMedia = MediaType("program_policy_group", func() { Attributes(func() { Attribute("group", GroupMedia, "group") Attribute("policy", PolicyMedia, "policy") }) View("default", func() { Attribute("group") Attribute("policy") }) })
View Source
var ProgramPolicyGroupPayload = Type("ProgramPolicyGroupPayload", func() {
Attribute("group_id", String, "group")
Attribute("policy_id", String, "policy")
})
View Source
var ProgramUpdatePayload = Type("ProgramUpdatePayload", func() { Attribute("policy_groups", ArrayOf(ProgramPolicyGroupPayload), "PolicyGroups") Attribute("name", String, "name", func() { Example("Every midnight") }) Attribute("autosend", Boolean, "Autosend") Attribute("disabled", Boolean, "Disabled") })
View Source
var RecipientMedia = MediaType("recipient", func() {
Description("Recipient")
Attributes(func() {
Attribute("email", String, "email", func() { Example("john.doe@vulcan.example.com") })
})
View("default", func() {
Attribute("email")
})
})
View Source
var RecipientsPayload = Type("RecipientsPayload", func() { Attribute("emails", ArrayOf(String), "Emails", func() { Example([]string{"john.doe@vulcan.example.com", "jane.doe@vulcan.example.com"}) }) Required("emails") })
View Source
var ReportEmailMedia = MediaType("reportEmail", func() {
Description("Report Email Body")
Attributes(func() {
Attribute("email_body", String, "Email Body", func() { Example("<html><body><title>...</title></body></html>") })
})
View("default", func() {
Attribute("email_body")
})
})
View Source
var ReportMedia = MediaType("report", func() {
Description("Report")
Attributes(func() {
Attribute("id", String, "Report ID", func() { Example("a7f3a072-67bb-41ad-941e-25afcafc0ed5") })
Attribute("scan_id", String, "Scan ID", func() { Example("360f1c3a-f0e9-4c10-b557-ebf3015a61a9") })
Attribute("report", String, "Report URL", func() {
Example("https://insights.vulcan.example.com/2b3123c0b0083ab6d87b7bb743652b9a58125079258b8b4650511bd47bc1a552/2018-07-10/360f1c3a-f0e9-4c10-b557-ebf3015a61a9-full-report.html")
})
Attribute("report_json", String, "Report JSON URL", func() {
Example("https://insights.vulcan.example.com/2b3123c0b0083ab6d87b7bb743652b9a58125079258b8b4650511bd47bc1a552/2018-07-10/360f1c3a-f0e9-4c10-b557-ebf3015a61a9-full-report.json")
})
Attribute("status", String, "Status", func() { Example("FINISHED") })
Attribute("delivered_to", String, "Delivered To", func() { Example("john.doe@vulcan.example.com, jane.doe@vulcan.example.com") })
})
View("default", func() {
Attribute("id")
Attribute("scan_id")
Attribute("report")
Attribute("report_json")
Attribute("status")
Attribute("delivered_to")
})
})
View Source
var ResourceMedia = MediaType("resource", func() { Description("resource") Attributes(func() { Attribute("name", String, "Resource name", func() { Example("Network Resources") }) Attribute("attributes", ArrayOf(String), "attributes of a resource", func() { Example([]string{"Hostname", "Port"}) }) Attribute("resources", ArrayOf(HashOf(String, String)), "values for attributes of a resource", func() { Example([]map[string]string{{"Hostname": "test.example.com", "Port": "443"}}) }) }) View("default", func() { Attribute("name") Attribute("attributes") Attribute("resources") }) })
Resource
View Source
var ScanMedia = MediaType("scan", func() { Description("Scan") Attributes(func() { Attribute("id", String, "Scan ID", func() { Example("23e7034f-8180-4895-8e7f-73f2f7d90631") }) Attribute("program", ProgramMedia, "Program") Attribute("scheduled_time", DateTime, "Scheduled Time", func() { Example("2018-09-07T10:40:52Z") }) Attribute("start_time", DateTime, "Start Time", func() { Example("2018-09-07T10:40:52Z") }) Attribute("end_time", DateTime, "End Time", func() { Example("2018-09-07T10:40:52Z") }) Attribute("progress", Number, "Progress", func() { Example(1) }) Attribute("checks_count", Integer, "Checks Count", func() { Example(20) }) Attribute("status", String, "Status", func() { Example("FINISHED") }) Attribute("requested_by", String, "Requested By", func() { Example("john.doe@vulcan.example.com") }) }) View("default", func() { Attribute("id") Attribute("program") Attribute("scheduled_time") Attribute("start_time") Attribute("end_time") Attribute("progress") Attribute("checks_count") Attribute("status") Attribute("requested_by") }) })
View Source
var ScanPayload = Type("ScanPayload", func() {
Attribute("program_id", String, "Program ID")
Attribute("program_id", String, "Program ID", func() { Example("1bb4c953-245e-477b-b005-400f319274f2") })
Attribute("scheduled_time", DateTime, "Group ID", func() { Example("2018-09-07T10:40:52Z") })
Required("program_id")
})
View Source
var ScheduleMedia = MediaType("schedule", func() {
Description("Schedule")
Attributes(func() {
Attribute("cron", String, "Cron Expression", func() { Example("0 7 1 * *") })
})
Required("cron")
View("default", func() {
Attribute("cron")
})
})
View Source
var SchedulePayload = Type("SchedulePayload", func() {
Attribute("cron", String, "Cron Expression", func() { Example("0 7 1 * *") })
})
View Source
var ScheduleUpdatePayload = Type("ScheduleUpdatePayload", func() {
Attribute("cron", String, "Cron Expression", func() { Example("0 7 1 * *") })
})
View Source
var SourceMedia = MediaType("source", func() {
Description("source")
Attributes(func() {
Attribute("id", String, "Source ID", func() { Example("f8129c7f-7abf-41ba-ab1f-c97090bb3db4") })
Attribute("name", String, "Source name", func() { Example("vulcan") })
Attribute("component", String, "Source component", func() { Example("vulcan-tls") })
Attribute("instance", String, "Source instance ID", func() { Example("b3320f03-1284-42fd-9cf4-5bb6c500966f") })
Attribute("options", String, "Source options", func() { Example("{\"timeout\":60}") })
Attribute("time", String, "Source execution end time", func() { Example("2019-06-08 11:16:40") })
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("component")
Attribute("instance")
Attribute("options")
Attribute("time")
})
})
Source
View Source
var StatsAssetsMedia = MediaType("statsAssets", func() { Description("Assets by severity stats") Attributes(func() { Attribute("assets", StatsTotalMedia, "Stats for assets by severity") }) View("default", func() { Attribute("assets") }) })
View Source
var StatsAveragesMedia = MediaType("statsAverages", func() {
Description("Stats by different averages")
Attributes(func() {
Attribute("percentile_10", Number, "Percentile 10 of the stats")
Attribute("percentile_25", Number, "Percentile 25 of the stats")
Attribute("percentile_50", Number, "Percentile 50 or median of the stats")
Attribute("percentile_75", Number, "Percentile 75 or third quartile of the stats")
Attribute("percentile_90", Number, "Percentile 90 of the stats")
Attribute("mean", Number, "Mean of the stats")
})
View("default", func() {
Attribute("percentile_10")
Attribute("percentile_25")
Attribute("percentile_50")
Attribute("percentile_75")
Attribute("percentile_90")
Attribute("mean")
})
})
View Source
var StatsCoverageMedia = MediaType("statsCoverage", func() {
Description("Asset Coverage: discovered vs. confirmed")
Attributes(func() {
Attribute("coverage", Number, "Percentage of assets confirmed respect to discovered")
})
View("default", func() {
Attribute("coverage")
})
})
View Source
var StatsCurrentExposureMedia = MediaType("current_exposure", func() { Description("Current exposure stats") Attributes(func() { Attribute("current_exposure", StatsAveragesMedia, "Stats for current exposure by different averages") }) View("default", func() { Attribute("current_exposure") }) })
View Source
var StatsExposureMedia = MediaType("exposure", func() { Description("Exposure stats") Attributes(func() { Attribute("exposure", StatsAveragesMedia, "Stats for exposure by different averages") }) View("default", func() { Attribute("exposure") }) })
View Source
var StatsFixedMedia = MediaType("statsFixed", func() { Description("Fixed issues stats") Attributes(func() { Attribute("fixed_issues", StatsMedia, "Stats for fixed issues by severity") }) View("default", func() { Attribute("fixed_issues") }) })
View Source
var StatsMTTRMedia = MediaType("mttr", func() { Description("MTTR stats") Attributes(func() { Attribute("mttr", StatsTotalMedia, "Stats for MTTR by severity") }) View("default", func() { Attribute("mttr") }) })
View Source
var StatsMedia = MediaType("stats", func() {
Description("Stats by severity")
Attributes(func() {
Attribute("critical", Number, "Stats for critical vulnerabilities")
Attribute("high", Number, "Stats for high vulnerabilities")
Attribute("medium", Number, "Stats for medium vulnerabilities")
Attribute("low", Number, "Stats for low vulnerabilities")
Attribute("informational", Number, "Stats for informational vulnerabilities")
})
View("default", func() {
Attribute("critical")
Attribute("high")
Attribute("medium")
Attribute("low")
Attribute("informational")
})
})
View Source
var StatsOpenMedia = MediaType("statsOpen", func() { Description("Open issues stats") Attributes(func() { Attribute("open_issues", StatsMedia, "Stats for open issues by severity") }) View("default", func() { Attribute("open_issues") }) })
View Source
var StatsTotalMedia = MediaType("statsTotal", func() {
Description("Stats by severity")
Attributes(func() {
Attribute("critical", Number, "Stats for critical vulnerabilities")
Attribute("high", Number, "Stats for high vulnerabilities")
Attribute("medium", Number, "Stats for medium vulnerabilities")
Attribute("low", Number, "Stats for low vulnerabilities")
Attribute("informational", Number, "Stats for informational vulnerabilities")
Attribute("total", Number, "Stats for all vulnerabilities")
})
View("default", func() {
Attribute("critical")
Attribute("high")
Attribute("medium")
Attribute("low")
Attribute("informational")
Attribute("total")
})
})
Stats
View Source
var TargetMedia = MediaType("target", func() { Description("target") Attributes(func() { Attribute("id", String, "Target ID", func() { Example("f8129c7f-7abf-41ba-ab1f-c97090bb3db4") }) Attribute("identifier", String, "Target identifier", func() { Example("www.test.com") }) Attribute("teams", ArrayOf(String), "List of TeamIDs associated with target", func() { Example([]string{"a9d33628-ddb0-467c-b482-474887097820", "9cb0bb2b-ca36-4877-acad-9dde23880595"}) }) }) View("default", func() { Attribute("id") Attribute("identifier") Attribute("teams") }) })
Target
View Source
var TeamMedia = MediaType("team", func() {
Description("Team")
Attributes(func() {
Attribute("id", String, "Team ID", func() { Example("ff74a33c-e683-4612-a62f-a9cf385f6522") })
Attribute("name", String, "Name", func() { Example("Security") })
Attribute("description", String, "Description", func() { Example("Security Team") })
Attribute("tag", String, "tag", func() { Example("team:security") })
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("description")
Attribute("tag")
})
})
View Source
var TeamMemberMedia = MediaType("teamMember", func() { Description("Team Member") Attributes(func() { Attribute("user", UserMedia, "User") Attribute("role", String, "Role", func() { Example("owner") }) }) View("default", func() { Attribute("user") Attribute("role") }) })
View Source
var TeamMemberPayload = Type("TeamMemberPayload", func() {
Attribute("user_id", String, "User ID", func() { Example("967d9966-b561-4233-bd6f-cac603fd8320") })
Attribute("email", String, "Email", func() { Example("john.doe@vulcan.example.com") })
Attribute("role", String, "Member role. Valid values are: owner, member", func() { Example("owner") })
})
View Source
var TeamMemberUpdatePayload = Type("TeamMemberUpdatePayload", func() {
Attribute("role", String, "Member role. Valid values are: owner, member", func() { Example("owner") })
})
View Source
var TeamPayload = Type("TeamPayload", func() {
Attribute("name", String, "name", func() { Example("Security") })
Attribute("description", String, "description", func() { Example("Security Team") })
Attribute("tag", String, "tag", func() { Example("team:security") })
Required("name")
Required("tag")
})
View Source
var TeamUpdatePayload = Type("TeamUpdatePayload", func() {
Attribute("name", String, "name", func() { Example("Security") })
Attribute("description", String, "description", func() { Example("Security Team") })
Attribute("tag", String, "tag", func() { Example("team:security") })
})
View Source
var TokenMedia = MediaType("token", func() {
Description("Token")
Attributes(func() {
Attribute("email", String, "Email", func() { Example("john.doe@vulcan.example.com") })
Attribute("hash", String, "Hash", func() { Example("903af1a77ea4eda46b60d85fac0f312ff9d3b6ea092434c8a6ef1868bf95da77") })
Attribute("creation_time", String, "Creation time", func() { Example("2018-09-07T10:40:52Z") })
Attribute("token", String, "Token", func() {
Example("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MzcxODQ0NjksInN1YiI6Im1haWNvbkBjb3N0YS5jb20iLCJ0eXBlIjoiQVBJIn0.zu8mf5nSpvmFyZNZM7Im-omHa_J9Ck1KH49zuy1wvjY")
})
})
View("default", func() {
Attribute("email")
Attribute("hash")
Attribute("creation_time")
Attribute("token")
})
View("metadata", func() {
Attribute("email")
Attribute("hash")
Attribute("creation_time")
})
})
View Source
var UserMedia = MediaType("user", func() { Description("User") Attributes(func() { Attribute("id", String, "User ID", func() { Example("967d9966-b561-4233-bd6f-cac603fd8320") }) Attribute("firstname", String, "First name", func() { Example("John") }) Attribute("lastname", String, "Last name", func() { Example("Doe") }) Attribute("email", String, "Email", func() { Example("john.doe@vulcan.example.com") }) Attribute("admin", Boolean, "Admin", func() { Example(true) }) Attribute("observer", Boolean, "Observer", func() { Example(true) }) Attribute("active", Boolean, "Active", func() { Example(true) }) Attribute("active", Boolean, "Active", func() { Example(true) }) Attribute("last_login", DateTime, "last_login", func() { Example("2018-09-07T10:40:52Z") }) }) View("default", func() { Attribute("id") Attribute("firstname") Attribute("lastname") Attribute("email") Attribute("admin") Attribute("observer") Attribute("active") Attribute("last_login") }) })
View Source
var UserPayload = Type("UserPayload", func() { Attribute("firstname", String, "First Name", func() { Example("John") }) Attribute("lastname", String, "Last Name", func() { Example("Doe") }) Attribute("email", String, "Email", func() { Example("john.doe@vulcan.example.com") }) Attribute("admin", Boolean, "Admin", func() { Example(false) Default(false) }) Attribute("observer", Boolean, "Observer", func() { Example(false) Default(false) }) Attribute("active", Boolean, "Active (Default: true)", func() { Example(true) }) Required("email") })
View Source
var UserUpdatePayload = Type("UserUpdatePayload", func() { Attribute("firstname", String, "First Name", func() { Example("John") }) Attribute("lastname", String, "Last Name", func() { Example("Doe") }) Attribute("admin", Boolean, "Admin", func() { Example(false) Default(false) }) Attribute("active", Boolean, "Active (Default: true)", func() { Example(true) }) })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.