escape

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package escape provides the API client for the Escape Platform

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Debug is a flag to enable debug mode for the API client

Functions

func CancelScan added in v0.3.0

func CancelScan(ctx context.Context, scanID string) error

CancelScan cancels a scan

func CreateAsset added in v0.3.0

func CreateAsset(ctx context.Context, data []byte, assetType string) (interface{}, error)

CreateAsset creates an asset

func CreateLocation

func CreateLocation(ctx context.Context, name, sshPublicKey string) (string, error)

CreateLocation creates a location

func CreateProfileGraphql added in v0.3.0

func CreateProfileGraphql(ctx context.Context, data []byte) (interface{}, error)

CreateProfileGraphql creates a profile for a GraphQL application

func CreateProfileRest added in v0.3.0

func CreateProfileRest(ctx context.Context, data []byte) (interface{}, error)

CreateProfileRest creates a profile for a REST application

func CreateProfileWebapp added in v0.3.0

func CreateProfileWebapp(ctx context.Context, data []byte) (interface{}, error)

CreateProfileWebapp creates a profile for a web application

func CreateTag added in v0.3.0

func CreateTag(ctx context.Context, name string, color string) (*v3.TagDetail, error)

CreateTag creates a tag

func DeleteAsset added in v0.3.0

func DeleteAsset(ctx context.Context, id string) error

DeleteAsset deletes an asset by ID

func DeleteIntegration

func DeleteIntegration(ctx context.Context, id string) error

DeleteIntegration Deletes an integration

func DeleteLocation

func DeleteLocation(ctx context.Context, id string) error

DeleteLocation deletes a location

func GetApplication

func GetApplication(ctx context.Context, id string) (*v2.GetApplication200Response, error)

GetApplication gets an application by ID

func GetAsset added in v0.3.0

func GetAsset(ctx context.Context, id string) (*v3.AssetDetailed, error)

GetAsset gets an asset by ID

func GetEvent added in v0.3.0

func GetEvent(ctx context.Context, eventID string) (*v3.EventDetailed, error)

GetEvent gets an event

func GetIntegration

func GetIntegration(ctx context.Context, id string) (*v2.GetIntegration200Response, error)

GetIntegration Get an integration by ID

func GetIssue added in v0.3.0

func GetIssue(ctx context.Context, issueID string) (*v3.IssueDetailed, error)

GetIssue gets an issue by ID

func GetLocation

func GetLocation(ctx context.Context, id string) (*v3.LocationDetailed, error)

GetLocation gets a location by ID

func GetProfile added in v0.3.0

func GetProfile(ctx context.Context, profileID string) (*v3.ProfileDetailed, error)

GetProfile gets a profile by ID

func GetScan

func GetScan(ctx context.Context, scanID string) (*v3.ScanDetailed1, error)

GetScan returns a scan by its ID

func GetScanIssues

func GetScanIssues(ctx context.Context, scanID string) ([]v3.IssueSummarized, error)

GetScanIssues returns issues found in a scan

func IgnoreScan added in v0.3.0

func IgnoreScan(ctx context.Context, scanID string) error

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

func ListIssueActivities(ctx context.Context, issueID string) ([]v3.ActivitySummarized, error)

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) ([]v3.LocationSummarized, *string, error)

ListLocations lists all locations

func ListProfiles added in v0.3.0

func ListProfiles(ctx context.Context, next string) ([]v3.ProfileSummarized, *string, error)

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 ListTags added in v0.3.0

func ListTags(ctx context.Context) ([]v3.TagDetail, error)

ListTags lists all tags

func ParseJSONOrYAML

func ParseJSONOrYAML[T parsable](body []byte, v T) (T, error)

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

func UpdateApplicationConfig(ctx context.Context, id string, configPath string) error

UpdateApplicationConfig updates an application configuration

func UpdateApplicationSchema

func UpdateApplicationSchema(ctx context.Context, id string, schemaPathOrURL string) error

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

func UpdateLocation(ctx context.Context, id string, name, sshPublicKey string) error

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

func UpsertIntegrationFromFile(ctx context.Context, filePath string) error

UpsertIntegrationFromFile Upserts an integration from a file

func UpsertLocation

func UpsertLocation(ctx context.Context, name, sshPublicKey string) (string, error)

UpsertLocation Creates or updates a location

func WatchScan

func WatchScan(ctx context.Context, scanID string) (chan *v3.ScanDetailed1, error)

WatchScan watches scans status and logs

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL