Documentation
¶
Overview ¶
Package escape provides the API client for the Escape Platform
Index ¶
- Variables
- func CancelScan(ctx context.Context, scanID string) error
- func CreateAsset(ctx context.Context, data []byte, assetType string) (interface{}, error)
- func CreateLocation(ctx context.Context, name, sshPublicKey string) (string, error)
- func CreateProfileGraphql(ctx context.Context, data []byte) (interface{}, error)
- func CreateProfileRest(ctx context.Context, data []byte) (interface{}, error)
- func CreateProfileWebapp(ctx context.Context, data []byte) (interface{}, error)
- func CreateTag(ctx context.Context, name string, color string) (*v3.TagDetail, error)
- func DeleteAsset(ctx context.Context, id string) error
- func DeleteIntegration(ctx context.Context, id string) error
- func DeleteLocation(ctx context.Context, id string) error
- func GetApplication(ctx context.Context, id string) (*v2.GetApplication200Response, error)
- func GetAsset(ctx context.Context, id string) (*v3.AssetDetailed, error)
- func GetEvent(ctx context.Context, eventID string) (*v3.EventDetailed, error)
- func GetIntegration(ctx context.Context, id string) (*v2.GetIntegration200Response, error)
- func GetIssue(ctx context.Context, issueID string) (*v3.IssueDetailed, error)
- func GetLocation(ctx context.Context, id string) (*v3.LocationDetailed, error)
- func GetProfile(ctx context.Context, profileID string) (*v3.ProfileDetailed, error)
- func GetScan(ctx context.Context, scanID string) (*v3.ScanDetailed1, error)
- func GetScanIssues(ctx context.Context, scanID string) ([]v3.IssueSummarized, error)
- func IgnoreScan(ctx context.Context, scanID string) error
- func ListApplications(ctx context.Context) ([]v2.ListApplications200ResponseInner, error)
- func ListAssets(ctx context.Context, next string, assetTypes []string, assetStatuses []string) ([]v3.AssetSummarized, *string, error)
- func ListAuditLogs(ctx context.Context, dateFrom string, dateTo string, actionType string, ...) ([]v3.AuditLogSummarized, *string, error)
- func ListEvents(ctx context.Context, next string, levels []string) ([]v3.EventSummarized, *string, error)
- func ListIntegrations(ctx context.Context) ([]v2.ListIntegrations200ResponseInner, error)
- func ListIssueActivities(ctx context.Context, issueID string) ([]v3.ActivitySummarized, error)
- func ListIssues(ctx context.Context, next string, filters *ListIssuesFilters) ([]v3.IssueSummarized, *string, error)
- func ListLocations(ctx context.Context, next string) ([]v3.LocationSummarized, *string, error)
- func ListProfiles(ctx context.Context, next string) ([]v3.ProfileSummarized, *string, error)
- func ListScans(ctx context.Context, profileIDs *[]string, next string) ([]v3.ScanSummarized1, *string, error)
- func ListSubdomains(ctx context.Context, count *int, after *string) ([]v2.ListSubdomains200ResponseDataInner, string, error)
- func ListTags(ctx context.Context) ([]v3.TagDetail, error)
- func ParseJSONOrYAML[T parsable](body []byte, v T) (T, error)
- func StartScan(ctx context.Context, profileID string, commitHash string, commitLink string, ...) (*v3.ScanDetailed1, error)
- func UpdateApplicationConfig(ctx context.Context, id string, configPath string) error
- func UpdateApplicationSchema(ctx context.Context, id string, schemaPathOrURL string) error
- func UpdateAsset(ctx context.Context, id string, assetDescription *string, ...) error
- func UpdateIssue(ctx context.Context, issueID string, ...) (bool, error)
- func UpdateLocation(ctx context.Context, id string, name, sshPublicKey string) error
- func UpsertIntegration(ctx context.Context, name string, locationID *string, ...) error
- func UpsertIntegrationFromFile(ctx context.Context, filePath string) error
- func UpsertLocation(ctx context.Context, name, sshPublicKey string) (string, error)
- func WatchScan(ctx context.Context, scanID string) (chan *v3.ScanDetailed1, error)
- type ListIssuesFilters
Constants ¶
This section is empty.
Variables ¶
var Debug = false
Debug is a flag to enable debug mode for the API client
Functions ¶
func CancelScan ¶ added in v0.3.0
CancelScan cancels a scan
func CreateAsset ¶ added in v0.3.0
CreateAsset creates an asset
func CreateLocation ¶
CreateLocation creates a location
func CreateProfileGraphql ¶ added in v0.3.0
CreateProfileGraphql creates a profile for a GraphQL application
func CreateProfileRest ¶ added in v0.3.0
CreateProfileRest creates a profile for a REST application
func CreateProfileWebapp ¶ added in v0.3.0
CreateProfileWebapp creates a profile for a web application
func DeleteAsset ¶ added in v0.3.0
DeleteAsset deletes an asset by ID
func DeleteIntegration ¶
DeleteIntegration Deletes an integration
func DeleteLocation ¶
DeleteLocation deletes a location
func GetApplication ¶
GetApplication gets an application by ID
func GetIntegration ¶
GetIntegration Get an integration by ID
func GetLocation ¶
GetLocation gets a location by ID
func GetProfile ¶ added in v0.3.0
GetProfile gets a profile by ID
func GetScanIssues ¶
GetScanIssues returns issues found in a scan
func IgnoreScan ¶ added in v0.3.0
IgnoreScan ignore a scan
func ListApplications ¶
func ListApplications(ctx context.Context) ([]v2.ListApplications200ResponseInner, error)
ListApplications lists all applications
func ListAssets ¶ added in v0.3.0
func ListAssets(ctx context.Context, next string, assetTypes []string, assetStatuses []string) ([]v3.AssetSummarized, *string, error)
ListAssets lists all assets
func ListAuditLogs ¶ added in v0.3.0
func ListAuditLogs(ctx context.Context, dateFrom string, dateTo string, actionType string, next string) ([]v3.AuditLogSummarized, *string, error)
ListAuditLogs lists audit logs
func ListEvents ¶ added in v0.3.0
func ListEvents(ctx context.Context, next string, levels []string) ([]v3.EventSummarized, *string, error)
ListEvents lists events
func ListIntegrations ¶
func ListIntegrations(ctx context.Context) ([]v2.ListIntegrations200ResponseInner, error)
ListIntegrations Lists all integrations
func ListIssueActivities ¶ added in v0.3.0
ListIssueActivities lists the activities of an issue
func ListIssues ¶ added in v0.3.0
func ListIssues(ctx context.Context, next string, filters *ListIssuesFilters) ([]v3.IssueSummarized, *string, error)
ListIssues lists all issues.
func ListLocations ¶
ListLocations lists all locations
func ListProfiles ¶ added in v0.3.0
ListProfiles lists all profiles
func ListScans ¶
func ListScans(ctx context.Context, profileIDs *[]string, next string) ([]v3.ScanSummarized1, *string, error)
ListScans lists all scans for an application
func ListSubdomains ¶
func ListSubdomains(ctx context.Context, count *int, after *string) ([]v2.ListSubdomains200ResponseDataInner, string, error)
ListSubdomains lists subdomains with pagination
func ParseJSONOrYAML ¶
ParseJSONOrYAML parses a JSON or YAML data into the requested struct It returns an error if the data is neither JSON nor YAML
Example:
d, err := ParseJSONOrYAML([]byte(`{"kind": "KUBERNETES", "parameters": {}}`), &v2.GetIntegration200ResponseData{})
func StartScan ¶
func StartScan( ctx context.Context, profileID string, commitHash string, commitLink string, commitBranch string, commitAuthor string, commitAuthorProfilePictureLink string, configurationOverride map[string]interface{}, additionalProperties map[string]interface{}, initiator v3.ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS, ) (*v3.ScanDetailed1, error)
StartScan starts a scan for an application
func UpdateApplicationConfig ¶
UpdateApplicationConfig updates an application configuration
func UpdateApplicationSchema ¶
UpdateApplicationSchema updates an application schema
func UpdateAsset ¶ added in v0.3.0
func UpdateAsset( ctx context.Context, id string, assetDescription *string, assetFramework *v3.ENUMPROPERTIESFRAMEWORK, assetOwners *[]string, assetStatus *v3.ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS, assetTagIDs *[]string, ) error
UpdateAsset updates an asset by ID
func UpdateIssue ¶ added in v0.3.0
func UpdateIssue(ctx context.Context, issueID string, status v3.ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS) (bool, error)
UpdateIssue updates an issue
func UpdateLocation ¶
UpdateLocation updates a location
func UpsertIntegration ¶
func UpsertIntegration(ctx context.Context, name string, locationID *string, integration *v2.GetIntegration200ResponseData) error
UpsertIntegration Upserts an integration
func UpsertIntegrationFromFile ¶
UpsertIntegrationFromFile Upserts an integration from a file
func UpsertLocation ¶
UpsertLocation Creates or updates a location
Types ¶
type ListIssuesFilters ¶ added in v0.3.0
type ListIssuesFilters struct {
Status []string
Severities []string
ProfileIDs []string
AssetIDs []string
Domains []string
IssueIDs []string
ScanIDs []string
TagsIDs []string
Search string
JiraTicket string
Risks []string
AssetClasses []string
ScannerKinds []string
}
ListIssuesFilters holds optional filters for listing issues