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 CreateCustomRule(ctx context.Context, data []byte) (*v3.CreateCustomRule200Response, 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 DeleteCustomRule(ctx context.Context, id string) (*v3.DeleteCustomRule200Response, error)
- func DeleteLocation(ctx context.Context, id string) error
- func DeleteProfile(ctx context.Context, profileID string) error
- func GetAsset(ctx context.Context, id string) (*v3.AssetDetailed, error)
- func GetCustomRule(ctx context.Context, id string) (*v3.CreateCustomRule200Response, error)
- func GetEvent(ctx context.Context, eventID string) (*v3.EventDetailed, 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 GetUploadSignedURL(ctx context.Context) (*v3.UploadSummary, error)
- func IgnoreScan(ctx context.Context, scanID string) error
- func ListAssets(ctx context.Context, next string, filters *ListAssetsFilters) ([]v3.AssetSummarized, *string, error)
- func ListAuditLogs(ctx context.Context, next string, filters *ListAuditLogsFilters) ([]v3.AuditLogSummarized, *string, error)
- func ListCustomRules(ctx context.Context) ([]v3.CustomRuleSummarized, error)
- func ListEvents(ctx context.Context, next string, filters *ListEventsFilters) ([]v3.EventSummarized, *string, 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, filters *ListLocationsFilters) ([]v3.LocationSummarized, *string, error)
- func ListProblems(ctx context.Context, next string, filters *ListProblemsFilters) ([]v3.LastScanStatusSummarized, *string, error)
- func ListProfiles(ctx context.Context, next string, filters *ListProfilesFilters) ([]v3.ProfileSummarized, *string, error)
- func ListScans(ctx context.Context, next string, filters *ListScansFilters) ([]v3.ScanSummarized1, *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 UpdateAsset(ctx context.Context, id string, assetDescription *string, ...) error
- func UpdateCustomRule(ctx context.Context, id string, data []byte) (*v3.CreateCustomRule200Response, error)
- func UpdateIssue(ctx context.Context, issueID string, ...) (bool, error)
- func UpdateLocation(ctx context.Context, id string, name, sshPublicKey string) error
- func UploadSchema(ctx context.Context, url string, data []byte) error
- func UpsertLocation(ctx context.Context, name, sshPublicKey string) (string, error)
- func WatchScan(ctx context.Context, scanID string) (chan *v3.ScanDetailed1, error)
- type ListAssetsFilters
- type ListAuditLogsFilters
- type ListEventsFilters
- type ListIssuesFilters
- type ListLocationsFilters
- type ListProblemsFilters
- type ListProfilesFilters
- type ListScansFilters
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 CreateCustomRule ¶ added in v0.3.8
CreateCustomRule creates a custom rule from raw JSON
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 DeleteCustomRule ¶ added in v0.3.8
DeleteCustomRule deletes a custom rule
func DeleteLocation ¶
DeleteLocation deletes a location
func DeleteProfile ¶ added in v0.3.10
DeleteProfile deletes a profile by ID
func GetCustomRule ¶ added in v0.3.4
GetCustomRule gets a custom rule
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 GetUploadSignedURL ¶ added in v0.3.10
func GetUploadSignedURL(ctx context.Context) (*v3.UploadSummary, error)
GetUploadSignedURL gets a signed url
func IgnoreScan ¶ added in v0.3.0
IgnoreScan ignore a scan
func ListAssets ¶ added in v0.3.0
func ListAssets(ctx context.Context, next string, filters *ListAssetsFilters) ([]v3.AssetSummarized, *string, error)
ListAssets lists all assets
func ListAuditLogs ¶ added in v0.3.0
func ListAuditLogs(ctx context.Context, next string, filters *ListAuditLogsFilters) ([]v3.AuditLogSummarized, *string, error)
ListAuditLogs lists audit logs
func ListCustomRules ¶ added in v0.3.4
func ListCustomRules(ctx context.Context) ([]v3.CustomRuleSummarized, error)
ListCustomRules lists all custom rules
func ListEvents ¶ added in v0.3.0
func ListEvents(ctx context.Context, next string, filters *ListEventsFilters) ([]v3.EventSummarized, *string, error)
ListEvents lists events
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 ¶
func ListLocations(ctx context.Context, next string, filters *ListLocationsFilters) ([]v3.LocationSummarized, *string, error)
ListLocations lists all locations
func ListProblems ¶ added in v0.5.0
func ListProblems(ctx context.Context, next string, filters *ListProblemsFilters) ([]v3.LastScanStatusSummarized, *string, error)
ListProblems lists all scan problems
func ListProfiles ¶ added in v0.3.0
func ListProfiles(ctx context.Context, next string, filters *ListProfilesFilters) ([]v3.ProfileSummarized, *string, error)
ListProfiles lists all profiles
func ListScans ¶
func ListScans(ctx context.Context, next string, filters *ListScansFilters) ([]v3.ScanSummarized1, *string, error)
ListScans lists all scans for an application
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
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 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 UpdateCustomRule ¶ added in v0.3.8
func UpdateCustomRule(ctx context.Context, id string, data []byte) (*v3.CreateCustomRule200Response, error)
UpdateCustomRule updates a custom rule from raw JSON
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 UploadSchema ¶ added in v0.3.10
UploadSchema uploads a file to the signed url
func UpsertLocation ¶
UpsertLocation Creates or updates a location
Types ¶
type ListAssetsFilters ¶ added in v0.3.2
type ListAssetsFilters struct {
AssetTypes []string
AssetStatuses []string
Search string
ManuallyCreated bool
}
ListAssetsFilters holds optional filters for listing assets
type ListAuditLogsFilters ¶ added in v0.3.2
type ListAuditLogsFilters struct {
DateFrom string
DateTo string
ActionType string
Actor string
Search string
}
ListAuditLogsFilters holds optional filters for listing audit logs
type ListEventsFilters ¶ added in v0.3.2
type ListEventsFilters struct {
Search string
ScanIDs []string
AssetIDs []string
IssueIDs []string
Levels []string
Stages []string
HasAttachments bool
Attachments []string
}
ListEventsFilters holds optional filters for listing events
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
type ListLocationsFilters ¶ added in v0.3.2
ListLocationsFilters holds optional filters for listing locations
type ListProblemsFilters ¶ added in v0.5.0
type ListProblemsFilters struct {
AssetIDs []string
Domains []string
IssueIDs []string
TagsIDs []string
Search string
Initiators []string
Kinds []string
Risks []string
}
ListProblemsFilters holds optional filters for listing problems