escape

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package escape provides the API client for the Escape Platform

Package escape provides the API client for the Escape Platform

Index

Constants

View Source
const (
	// InvalidAPIKeyMessage is the user-facing error when the API rejects credentials.
	InvalidAPIKeyMessage = "Invalid API Key."
	// InvalidAPIKeyHint tells users where to retrieve a valid API key.
	InvalidAPIKeyHint = env.APIKeyHint
)

Variables

View Source
var Debug = false

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

View Source
var KnowledgeFileSortTypes = []string{"CREATED_AT", "KIND", "NAME", "STATUS"}

KnowledgeFileSortTypes lists the sort fields the knowledge file listing accepts, mirroring the operation's sortType enum.

Functions

func BulkImportAssets

func BulkImportAssets(ctx context.Context, data []byte) (*v3.BulkImportAssets200Response, error)

BulkImportAssets starts an asynchronous job that creates multiple assets. The raw JSON body is the BulkImportAssets request, so callers can pass the stdin payload straight through.

func BulkTriggerIssueWorkflows

BulkTriggerIssueWorkflows runs manual workflows on every issue matching a filter. A body with All set targets every issue and cannot carry a filter; DryRun previews the matching issue IDs without triggering anything.

func BulkUpdateIssues added in v1.1.0

BulkUpdateIssues updates multiple issues matching a filter

func BulkUpdateProfiles

func BulkUpdateProfiles(ctx context.Context, body []byte) (*v3.BulkUpdateProfiles200Response, error)

BulkUpdateProfiles updates the schedule, tags and projects of many profiles at once from raw JSON bytes. The body names the profiles and the change to apply; the API requires at least one of tagIds, projectIds or schedule.

func BulkUpdateSecurityTests

BulkUpdateSecurityTests changes the organization configuration of every security test matching a filter, or of all of them when body.All is set. A body with All set cannot carry a filter. DryRun previews the matching security test IDs without changing anything.

func CancelScan added in v0.3.0

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

CancelScan cancels a scan

func CommentAsset added in v1.1.0

func CommentAsset(ctx context.Context, assetID, comment string) (*v3.CreateAssetComment200Response, error)

CommentAsset adds a comment to an asset

func CommentIssue added in v1.1.0

func CommentIssue(ctx context.Context, issueID string, comment string) (*v3.CreateAssetComment200Response, error)

CommentIssue adds a comment to an issue and returns the created activity.

func CreateAIChat

CreateAIChat opens a chat.

func CreateAIChatMessage

func CreateAIChatMessage(ctx context.Context, chatID string, body v3.CreateAIChatMessageRequest) (*v3.CreateAIChatMessage200Response, error)

CreateAIChatMessage posts a user message to a chat.

func CreateAsset added in v0.3.0

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

CreateAsset creates an asset

func CreateContinuousPentest

func CreateContinuousPentest(ctx context.Context, profileID string, data []byte) (*v3.UpdateContinuousPentest200Response, error)

CreateContinuousPentest sets up continuous pentesting on an AI pentest profile.

func CreateCustomRule added in v0.3.8

func CreateCustomRule(ctx context.Context, data []byte) (*v3.CreateCustomRule200Response, error)

CreateCustomRule creates a custom rule from raw JSON

func CreateIntegration added in v1.1.0

func CreateIntegration(ctx context.Context, kind string, body []byte) (map[string]interface{}, error)

CreateIntegration creates an integration of a given kind from raw JSON bytes.

func CreateLocation

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

CreateLocation creates a location and returns the created location.

func CreateOrganizationScannerConfiguration

func CreateOrganizationScannerConfiguration(ctx context.Context, body []byte) (*v3.CreateOrganizationScannerConfiguration200Response, error)

CreateOrganizationScannerConfiguration publishes a new organization-wide scanner configuration from raw JSON bytes. The body carries the `content` object; profiles without their own override follow it.

func CreateProfileAiPentest added in v1.3.6

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

CreateProfileAiPentest creates an AI pentest profile (POST /profiles/ai-pentest).

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 CreateProject added in v1.1.0

func CreateProject(ctx context.Context, body []byte) (*v3.CreateProject200Response, error)

CreateProject creates a new project from raw JSON bytes

func CreateRegressionTest

func CreateRegressionTest(ctx context.Context, data []byte) (*v3.CreateRegressionTest200Response, error)

CreateRegressionTest creates a regression test from a source report uploaded beforehand via POST /upload/signed-url.

func CreateRole added in v1.1.0

func CreateRole(ctx context.Context, body []byte) (*v3.CreateRole200Response, error)

CreateRole creates a new role from raw JSON bytes

func CreateRoleBindings added in v1.1.0

func CreateRoleBindings(ctx context.Context, roleID, userID string) ([]v3.CreateRoleBindings200ResponseInner, error)

CreateRoleBindings creates role bindings associating users to roles

func CreateSchemaAsset added in v1.3.3

func CreateSchemaAsset(ctx context.Context, temporaryObjectKey string, name string) (*v3.UpdateAsset200Response, error)

CreateSchemaAsset turns a temporary upload object key into a SCHEMA asset. POST /v3/assets/schema polls the schema-build workflow internally; the server returns the finalized asset or a 400 on workflow timeout.

func CreateTag added in v0.3.0

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

CreateTag creates a tag

func CreateView

func CreateView(ctx context.Context, body []byte) (*v3.CreateView200Response, error)

CreateView creates a view from raw JSON bytes.

func CreateWorkflow added in v1.1.0

func CreateWorkflow(ctx context.Context, body []byte) (*v3.CreateWorkflow200Response, error)

CreateWorkflow creates a new workflow from raw JSON bytes

func DeactivateUser

func DeactivateUser(ctx context.Context, userID string) (*v3.ListUsers200ResponseInner, error)

DeactivateUser deactivates a user of the organization. The same route reactivates a user, but the CLI exposes the one operation the ticket asks for; the API refuses a self-deactivation.

func DeleteAsset added in v0.3.0

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

DeleteAsset deletes an asset by ID and returns the API's acknowledgement.

func DeleteCustomRule added in v0.3.8

func DeleteCustomRule(ctx context.Context, id string) (*v3.DeleteCustomRule200Response, error)

DeleteCustomRule deletes a custom rule

func DeleteIntegration

func DeleteIntegration(ctx context.Context, kind, integrationID string) (*v3.CreateakamaiIntegration200Response, error)

DeleteIntegration deletes an integration by kind and ID. Every generated delete operation returns CreateakamaiIntegration200Response, so the kind-generic client decodes that one shape.

func DeleteKnowledgeFile

func DeleteKnowledgeFile(ctx context.Context, fileID string) (*v3.DeleteProfile200Response, error)

DeleteKnowledgeFile deletes a knowledge file. The generated delete operation reuses the {"message": string} schema shared with the other delete routes.

func DeleteLocation

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

DeleteLocation deletes a location and returns the API's acknowledgement.

func DeleteProfile added in v0.3.10

func DeleteProfile(ctx context.Context, profileID string) (*v3.DeleteProfile200Response, error)

DeleteProfile deletes a profile by ID

func DeleteProject added in v1.1.0

func DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a project by ID.

func DeleteRegressionTest

func DeleteRegressionTest(ctx context.Context, regressionTestID string) (*v3.DeleteProfile200Response, error)

DeleteRegressionTest deletes a regression test by ID.

func DeleteRole added in v1.1.0

func DeleteRole(ctx context.Context, roleID string) error

DeleteRole deletes a role by ID.

func DeleteRoleBinding added in v1.1.0

func DeleteRoleBinding(ctx context.Context, bindingID string) (*v3.DeleteCustomRule200Response, error)

DeleteRoleBinding deletes a role binding by ID.

func DeleteTag added in v0.6.0

func DeleteTag(ctx context.Context, id string) (*v3.DeleteProfile200Response, error)

DeleteTag deletes a tag

func DeleteVaultVariable

func DeleteVaultVariable(ctx context.Context, variableID string) error

DeleteVaultVariable deletes a vault variable by ID.

func DeleteView

func DeleteView(ctx context.Context, viewID string) (*v3.DeleteProfile200Response, error)

DeleteView deletes a view by ID.

func DeleteWorkflow added in v1.1.0

func DeleteWorkflow(ctx context.Context, workflowID string) (*v3.CreateWorkflow200Response, error)

DeleteWorkflow deletes a workflow by ID

func DisableContinuousPentest

func DisableContinuousPentest(ctx context.Context, profileID string) (*v3.UpdateContinuousPentest200Response, error)

DisableContinuousPentest stops the timer of a continuous pentest and keeps the repositories.

func DownloadSignedURL added in v1.3.3

func DownloadSignedURL(ctx context.Context, signedURL string, dst io.Writer) error

DownloadSignedURL streams the body of a pre-signed URL to the writer. Used to download schema bytes after `GetProfile` returns a signedUrl. The caller is the sole authority on deadlines: pass a ctx with the desired deadline via context.WithTimeout / context.WithDeadline. We deliberately don't set http.Client.Timeout here — stacking two independent timeout mechanisms (ctx deadline + client timeout) produces confusing failure modes where the shorter one wins silently.

func EnableContinuousPentest

func EnableContinuousPentest(ctx context.Context, profileID string, data []byte) (*v3.UpdateContinuousPentest200Response, error)

EnableContinuousPentest turns the timer back on for a continuous pentest.

func GenerateIssueAiRemediation

GenerateIssueAiRemediation schedules AI remediation generation for an issue. The body carries the kind ("remediation" for the full issue-panel remediation or "summary" for the short overview). Generation is asynchronous: read the result back with GetIssue.

func GetAIChat

func GetAIChat(ctx context.Context, chatID string) (*v3.GetAIChat200Response, error)

GetAIChat returns one chat with a preview of its messages. The preview holds the first 100 messages; ListAIChatMessages walks the full history.

func GetAsset added in v0.3.0

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

GetAsset gets an asset by ID

func GetAssetContent

func GetAssetContent(ctx context.Context, id string) (*v3.GetAssetContent200Response, error)

GetAssetContent gets the download metadata (signed URL, content type, filename) of an asset content

func GetAuthentication added in v1.1.0

func GetAuthentication(ctx context.Context, authenticationID string) (*v3.GetAuthentication200Response, error)

GetAuthentication gets a profile authentication check by ID.

func GetCompliancePosture

func GetCompliancePosture(ctx context.Context) (*v3.GetCompliancePosture200Response, error)

GetCompliancePosture returns the organization compliance posture: every framework, whether it is enabled, and the security tests mapped to each of its compliance items.

func GetCustomRule added in v0.3.4

func GetCustomRule(ctx context.Context, id string) (*v3.CreateCustomRule200Response, error)

GetCustomRule gets a custom rule

func GetEnabledCompliances

func GetEnabledCompliances(ctx context.Context) (*v3.GetEnabledCompliances200Response, error)

GetEnabledCompliances returns the compliance frameworks the organization turned on.

func GetEvent added in v0.3.0

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

GetEvent gets an event

func GetIntegration

func GetIntegration(ctx context.Context, kind, integrationID string) (map[string]interface{}, error)

GetIntegration gets an integration by kind and ID.

func GetIssue added in v0.3.0

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

GetIssue gets an issue by ID

func GetJob added in v1.1.0

func GetJob(ctx context.Context, jobID string) (*v3.GetJob200Response, error)

GetJob gets the status and result of an async job

func GetLocation

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

GetLocation gets a location by ID

func GetMe added in v1.1.0

func GetMe(ctx context.Context) (*v3.GetMe200Response, error)

GetMe returns the current authenticated user and organization context

func GetOrganizationSettings

func GetOrganizationSettings(ctx context.Context) (*v3.GetOrganizationSettings200Response, error)

GetOrganizationSettings reads the organization settings.

func GetProfile added in v0.3.0

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

GetProfile gets a profile by ID

func GetProject added in v1.1.0

func GetProject(ctx context.Context, projectID string) (*v3.CreateProject200Response, error)

GetProject gets a project by ID

func GetRegressionTest

func GetRegressionTest(ctx context.Context, regressionTestID string) (*v3.CreateRegressionTest200Response, error)

GetRegressionTest returns a regression test by ID, including its recent runs.

func GetRetest

func GetRetest(ctx context.Context, retestID string, cursor string, size int) (*v3.GetRetest200Response, error)

GetRetest gets one page of a retest by scan id. Reports are cursor-paginated. size <= 0 leaves the API default page size in place.

func GetRole added in v1.1.0

func GetRole(ctx context.Context, roleID string) (*v3.CreateRole200Response, error)

GetRole gets a role by ID

func GetScan

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

GetScan returns a scan by its ID

func GetScanCompliance

func GetScanCompliance(ctx context.Context, scanID string) (*v3.GetScanCompliance200Response, error)

GetScanCompliance returns the compliance posture of one scan: per-framework enabled status and the compliance items the scan failed.

func GetScanConfiguration

func GetScanConfiguration(ctx context.Context, scanID string) (*v3.GetScanConfiguration200Response, error)

GetScanConfiguration returns the effective configuration a scan ran with. Secret values are redacted server-side.

func GetScanIssues

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

GetScanIssues returns one page of issues found in a scan. size 0 keeps the API default page size (the server default is 50). Callers that need every issue must follow nextCursor. The returned total is totalCount.

func GetScanStatistics

func GetScanStatistics(ctx context.Context, scanID string) (*v3.GetScanStatistics200Response, error)

GetScanStatistics returns aggregated statistics for a scan.

func GetSecurityTest

func GetSecurityTest(ctx context.Context, securityTestUID string) (*v3.GetSecurityTest200Response, error)

GetSecurityTest returns one catalog entry with its organization configuration and the issue counts still open under it.

func GetStatistics added in v1.1.0

func GetStatistics(ctx context.Context) (*v3.GetStatistics200Response, error)

GetStatistics returns organization-level statistics

func GetStatisticsEndpoints

func GetStatisticsEndpoints(ctx context.Context, source StatisticsSource, projectID string) (*v3.GetStatisticsEndpoints200Response, error)

GetStatisticsEndpoints returns how many API routes, GraphQL resolvers and web pages the scans of one source reached. source empty keeps the API default; projectID empty keeps every project.

func GetStatisticsIssues

func GetStatisticsIssues(ctx context.Context, source StatisticsSource, projectID string) (*v3.GetStatisticsIssues200Response, error)

GetStatisticsIssues returns the open and recently resolved issue counts of one source, grouped by status and by severity.

func GetStatisticsTrends

func GetStatisticsTrends(ctx context.Context, start, end, interval string, projectIDs []string) (*v3.GetStatisticsTrends200Response, error)

GetStatisticsTrends returns the time-bucketed trends of the organization: open versus resolved issue counts, and the average API health score. start and end are ISO 8601 bounding the half-open window; interval empty keeps the API default bucket width; an empty projectIDs keeps every project.

func GetTag added in v1.1.0

func GetTag(ctx context.Context, id string) (*v3.CreateTag200Response, error)

GetTag gets a tag by ID

func GetUploadSignedURL added in v0.3.10

func GetUploadSignedURL(ctx context.Context) (*v3.CreateUploadSignedUrl200Response, error)

GetUploadSignedURL gets a signed url

func GetUser added in v1.1.0

func GetUser(ctx context.Context, userID string) (*v3.GetUser200Response, error)

GetUser gets a user by ID

func GetValidation

func GetValidation(ctx context.Context, validationID string) (*v3.GetValidation200Response, error)

GetValidation returns the status, progress and events of a validation.

func GetWorkflow added in v1.1.0

func GetWorkflow(ctx context.Context, workflowID string) (*v3.CreateWorkflow200Response, error)

GetWorkflow gets a workflow by ID

func IgnoreScan added in v0.3.0

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

IgnoreScan ignore a scan

func InviteUsers added in v1.1.0

func InviteUsers(ctx context.Context, emails []string, roleID string) ([]v3.ListUsers200ResponseInner, error)

InviteUsers invites one or more users by email address.

func IsInvalidAPIKey added in v1.3.6

func IsInvalidAPIKey(err error) bool

IsInvalidAPIKey reports whether err was produced by an unauthorized API response.

func KnowledgeFileKind

func KnowledgeFileKind(name string) string

KnowledgeFileKind resolves the kind of a file name. Unknown extensions map to FILE, which is the kind the API uses for anything it cannot classify.

func ListAIChatMessages

func ListAIChatMessages(ctx context.Context, chatID string, next string, size int) ([]v3.AIChatMessage, *string, int, error)

ListAIChatMessages returns one page of the messages of a chat, oldest first. size 0 keeps the API default page size. The returned total is totalCount.

func ListAIChats

func ListAIChats(ctx context.Context, next string, size int) ([]v3.AIChatSummary, *string, int, error)

ListAIChats returns one page of the copilot chats of the caller. size 0 keeps the API default page size. The returned total is totalCount.

func ListAssetActivities added in v1.1.0

func ListAssetActivities(ctx context.Context, assetID string) ([]v3.ActivitySummarized, error)

ListAssetActivities lists activities for an asset

func ListAssets added in v0.3.0

func ListAssets(ctx context.Context, next string, filters *ListAssetsFilters, size int) ([]v3.AssetSummarized, *string, int, error)

ListAssets lists one page of assets. size 0 keeps the historical page size of 100. The returned total is totalCount.

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 ListAzureBoardsAreas

func ListAzureBoardsAreas(ctx context.Context, integrationID, project, workItemType string) ([]string, error)

ListAzureBoardsAreas lists the area paths of one Azure Boards project. project and workItemType are both required by the route. The route returns a bare array of strings, so this listing uses rawRequest.

func ListCompliancePerApplication

func ListCompliancePerApplication(ctx context.Context, next string, size int, profileIDs string) ([]v3.GetCompliancePerApplication200ResponseDataInner, *string, int, error)

ListCompliancePerApplication returns one page of per-application compliance statistics. profileIDs is the comma-separated filter the route takes; an empty string keeps every application. size 0 keeps the API default page size. The returned total is totalCount.

func ListCustomRules added in v0.3.4

func ListCustomRules(ctx context.Context, filters *ListCustomRulesFilters) ([]v3.CustomRuleSummarized, error)

ListCustomRules lists every custom rule, draining every page the X-Next-Cursor header announces. A nil filters lists every rule.

func ListEvents added in v0.3.0

func ListEvents(ctx context.Context, next string, filters *ListEventsFilters, size int) ([]v3.EventSummarized, *string, int, error)

ListEvents lists one page of events. size 0 keeps the historical page size of 100. The returned total is totalCount.

func ListInboxEmails added in v1.2.0

func ListInboxEmails(ctx context.Context, cursor string, filters *ListInboxEmailsFilters) (*v3.ListInboxEmails200Response, error)

ListInboxEmails lists inbox emails for a target scan email address.

func ListIntegrationRuns

func ListIntegrationRuns(ctx context.Context, kind, integrationID, next string, size int) ([]map[string]interface{}, *string, int, error)

ListIntegrationRuns lists one page of the runs of an integration. size 0 keeps the API default page size. The returned total is totalCount.

func ListIntegrations

func ListIntegrations(ctx context.Context, kind, next string, filters *ListIntegrationsFilters, size int) ([]map[string]interface{}, *string, int, error)

ListIntegrations lists one page of integrations of a given kind. size 0 omits the query parameter so the API keeps its default page size. The returned total is totalCount.

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, sortType string, sortDirection string, size int) ([]v3.IssueSummarized, *string, int, error)

ListIssues lists one page of issues. size 0 keeps the API default page size. The returned total is the collection totalCount, not the number of rows in this page.

func ListJobs

func ListJobs(ctx context.Context, next string, size int, filters *JobsFilters) ([]v3.JobSummary, *string, int, error)

ListJobs returns one page of the async jobs of the organization, most recent first. size 0 keeps the API default page size. The returned total is totalCount.

func ListKnowledgeFiles

func ListKnowledgeFiles(ctx context.Context, cursor string, size int, sortType, sortDirection string) ([]v3.KnowledgeFileSummary, *string, int, error)

ListKnowledgeFiles lists one page of the organization knowledge library.

func ListLocationLogs

func ListLocationLogs(ctx context.Context, locationID, next string, size int, filters *ListLocationLogsFilters) ([]v3.LocationLog, *string, int, error)

ListLocationLogs lists one page of the logs a location produced. size 0 keeps the API default page size. The returned total is totalCount.

func ListLocations

func ListLocations(ctx context.Context, next string, filters *ListLocationsFilters, size int) ([]v3.LocationSummarized, *string, int, error)

ListLocations lists one page of locations. size 0 keeps the API default page size. The logs endpoint reports no total, so the returned count is the length of the page.

func ListPermissions

func ListPermissions(ctx context.Context) ([]v3.PermissionCatalogEntry, error)

ListPermissions returns every permission a role can be granted. The returned ids are the values `roles create` and `roles update` accept.

func ListProblems added in v0.5.0

func ListProblems(ctx context.Context, next string, filters *ListProblemsFilters, size int) ([]v3.ProfileScanProblemsRow, *string, int, error)

ListProblems lists one page of profile scan problems. size 0 keeps the API default page size. The returned total is totalCount.

func ListProfiles added in v0.3.0

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

ListProfiles lists one page of profiles. size 0 keeps the API default page size. The returned total is totalCount.

func ListProjects added in v1.1.0

func ListProjects(ctx context.Context, next string, filters *ListProjectsFilters, size int) ([]v3.ListProjects200ResponseDataInner, *string, int, error)

ListProjects lists one page of projects. size 0 keeps the API default page size. The returned total is totalCount.

func ListRegressionTestHistory

func ListRegressionTestHistory(ctx context.Context, regressionTestID string, next string, size int) ([]v3.RegressionTestRun, *string, int, error)

ListRegressionTestHistory returns one page of runs of a regression test. size 0 keeps the API default page size. The returned total is totalCount.

func ListRegressionTests

func ListRegressionTests(ctx context.Context, next string, search string, size int) ([]v3.RegressionTestSummary, *string, int, error)

ListRegressionTests returns one page of regression tests. size 0 keeps the API default page size. The returned total is totalCount.

func ListRetests

func ListRetests(ctx context.Context, next string, filters *ListRetestsFilters, size int) ([]v3.RetestDetailed, *string, int, error)

ListRetests lists one page of issue retests. The id of each item is the scan id. Empty sort fields default to createdAt desc so the newest retest is first. size <= 0 keeps the historical request page size (the API maximum). The returned int is totalCount.

func ListRoles added in v1.1.0

func ListRoles(ctx context.Context, search string) ([]v3.ListRoles200ResponseInner, error)

ListRoles lists every role in the organization, draining every page the X-Next-Cursor header announces. search filters the role name and is sent on every page.

func ListScanProblems added in v1.3.6

func ListScanProblems(ctx context.Context, next string, filters *ListScanProblemsFilters, size int) ([]v3.ScanSummarizedWithProblems2, *string, int, error)

ListScanProblems lists one page of scans together with their validation problems. The returned total is totalCount.

func ListScanScenarios

func ListScanScenarios(ctx context.Context, scanID, next, vector, search string, size int) ([]v3.PentestScenario, *string, int, error)

ListScanScenarios lists one page of the attack scenarios explored during a scan. size 0 keeps the API default page size. The returned total is totalCount.

func ListScanTargets added in v1.1.0

func ListScanTargets(
	ctx context.Context,
	scanID string,
	next string,
	filters *ListScanTargetsFilters,
	size int,
) ([]v3.TargetDetailed, *string, int, error)

ListScanTargets lists one page of targets discovered during a scan. size is the API page size (max 100). Pass 0 to use scanTargetsAPIPageSize. A nil filters lists the page unfiltered.

func ListScans

func ListScans(ctx context.Context, next string, filters *ListScansFilters, size int) ([]v3.ScanSummarized2, *string, int, error)

ListScans lists one page of scans. size 0 keeps defaultScanListPageSize. The returned total is totalCount.

func ListSecurityTests

func ListSecurityTests(ctx context.Context, next string, size int, filters *SecurityTestsFilters) ([]v3.SecurityTest, *string, int, error)

ListSecurityTests returns one page of the security-test catalog. size 0 keeps the API default page size. The returned total is totalCount.

func ListTags added in v0.3.0

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

ListTags lists all tags

func ListUsers added in v1.1.0

func ListUsers(ctx context.Context, search, deactivated string) ([]v3.ListUsers200ResponseInner, error)

ListUsers lists users in the organization. Search is sent to the API, whose search matches the email only: filtering names client-side promised a match the endpoint never performs. deactivated is the query enum "true" or "false"; an empty value lists every user.

func ListViewIssues

func ListViewIssues(ctx context.Context, viewID, next string, size int, filters *ListViewIssuesFilters) ([]v3.IssueSummarized, *string, int, error)

ListViewIssues lists one page of the issues a saved view selects. size 0 keeps the API default page size. The returned total is totalCount.

func ListViews

func ListViews(ctx context.Context, target, projectID string) ([]v3.ViewDetail, error)

ListViews lists the saved views of one target.

func ListWorkflowExecutions

func ListWorkflowExecutions(ctx context.Context, workflowID, next string, size int) ([]v3.WorkflowExecution, *string, int, error)

ListWorkflowExecutions lists one page of the runs of a workflow. size 0 keeps the API default page size. The returned total is totalCount.

func ListWorkflows added in v1.1.0

func ListWorkflows(ctx context.Context, next string, filters *ListWorkflowsFilters, size int) ([]v3.WorkflowSummarized, *string, int, error)

ListWorkflows lists one page of workflows. size 0 keeps the API default page size. The returned total is totalCount.

func NotifyIssueOwners added in v1.1.0

func NotifyIssueOwners(ctx context.Context, issueID, scanID string) (*v3.NotifyIssueOwners200Response, error)

NotifyIssueOwners sends a notification to asset owners about an issue

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

func PauseWorkflow

func PauseWorkflow(ctx context.Context, workflowID string, paused bool) (*v3.CreateWorkflow200Response, error)

PauseWorkflow pauses or resumes a workflow. The API carries the pause flag on the generic update route; this wrapper keeps the intent explicit.

func ReadInboxEmail added in v1.2.0

func ReadInboxEmail(ctx context.Context, id string) (*v3.ScanEmailDetails, error)

ReadInboxEmail reads the full raw content of an inbox email by ID.

func RenameExport

func RenameExport(ctx context.Context, jobID, name string) (*v3.RenameExport200Response, error)

RenameExport renames an export job so its report is filed under another name.

func ReorderViews

func ReorderViews(ctx context.Context, body []byte) (*v3.ReorderViews200Response, error)

ReorderViews stores the display order of one target's views from raw JSON bytes.

func ReplyRegressionTestClarification

func ReplyRegressionTestClarification(ctx context.Context, regressionTestID string, runID string, data []byte) (*v3.ReplyRegressionTestClarification200Response, error)

ReplyRegressionTestClarification answers the clarification question of a run.

func RunRegressionTest

func RunRegressionTest(ctx context.Context, regressionTestID string) (*v3.CreateRegressionTest200Response, error)

RunRegressionTest starts a run of the regression test. The run is asynchronous.

func SaveIssueAiRemediationFeedback

SaveIssueAiRemediationFeedback records whether an AI remediation artefact was useful. The body carries the kind and the tri-state feedback: true, false, or an explicit null (carried through AdditionalProperties) to clear a rating.

func SendJobArtefacts

func SendJobArtefacts(ctx context.Context, jobID string, emails []string, subject string) (*v3.SendJobArtefacts200Response, error)

SendJobArtefacts emails the artefacts a finished job produced. subject is optional and is left out of the request when empty.

func StartAuthentication added in v1.1.0

func StartAuthentication(ctx context.Context, body []byte) (*v3.StartAuthentication200Response, error)

StartAuthentication starts a profile authentication check from raw JSON bytes.

func StartRetest

func StartRetest(ctx context.Context, request v3.StartRetestRequest) (*v3.StartRetest200Response, error)

StartRetest starts an issue retest. The request must contain a profile id and exactly one of issueIds or filter. The returned id is the scan id.

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.StartScan200Response, error)

StartScan starts a scan for an application

func StartValidation

func StartValidation(ctx context.Context, body []byte) (*v3.StartValidation200Response, error)

StartValidation asks the platform to validate an asset reachability and returns the validation handle used to poll its status.

func StopRegressionTest

func StopRegressionTest(ctx context.Context, regressionTestID string) (*v3.CreateRegressionTest200Response, error)

StopRegressionTest stops the run in progress for a regression test.

func SyncIntegration

func SyncIntegration(ctx context.Context, kind, integrationID string) (*v3.SyncAkamaiIntegration200Response, error)

SyncIntegration schedules a synchronization run of the integration.

func TestIntegration

func TestIntegration(ctx context.Context, kind, integrationID string) (*v3.SyncAkamaiIntegration200Response, error)

TestIntegration asks the integration to check its credentials.

func TriggerAsmScans added in v1.1.0

TriggerAsmScans triggers ASM scans on assets matching an optional filter

func TriggerExport added in v1.1.0

func TriggerExport(ctx context.Context, blocks []string, opts ExportOptions) (*v3.TriggerExport200Response, error)

TriggerExport triggers an async PDF/report export job

func TriggerIssueManualWorkflow

func TriggerIssueManualWorkflow(ctx context.Context, issueID, workflowID string) (*v3.TriggerIssueManualWorkflow200Response, error)

TriggerIssueManualWorkflow runs a manual workflow (e.g. exporting the issue to Jira) on a single issue and returns the workflow that was triggered.

func UpdateAsset added in v0.3.0

func UpdateAsset(ctx context.Context, id string, input UpdateAssetInput) (*v3.UpdateAsset200Response, error)

UpdateAsset updates an asset by ID

func UpdateContinuousPentest

func UpdateContinuousPentest(ctx context.Context, profileID string, data []byte) (*v3.UpdateContinuousPentest200Response, error)

UpdateContinuousPentest edits the repositories and cadence of an enabled continuous pentest.

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 UpdateEnabledCompliances

func UpdateEnabledCompliances(ctx context.Context, frameworks []string) (*v3.GetEnabledCompliances200Response, error)

UpdateEnabledCompliances replaces the set of compliance frameworks the organization measures. frameworks is the full list to enable: a framework left out is disabled, so an empty list turns every framework off.

func UpdateIntegration added in v1.1.0

func UpdateIntegration(ctx context.Context, kind, integrationID string, body []byte) (map[string]interface{}, error)

UpdateIntegration updates an integration by kind and ID from raw JSON bytes.

func UpdateIssue added in v0.3.0

func UpdateIssue(ctx context.Context, issueID string, body v3.UpdateIssueRequest) (*v3.UpdateIssue200Response, error)

UpdateIssue applies the supplied mutation to a single issue.

func UpdateLocation

func UpdateLocation(ctx context.Context, id string, name, sshPublicKey *string, enabled *bool) (*v3.GetLocation200Response, error)

UpdateLocation updates a location. Only non-nil fields are sent. The returned value is the location after the update.

func UpdateLocationTags

func UpdateLocationTags(ctx context.Context, locationID string, tagIDs []string) (*v3.GetLocation200Response, error)

UpdateLocationTags replaces the tags of a location.

func UpdateOrganizationSettings

func UpdateOrganizationSettings(ctx context.Context, body []byte) (*v3.GetOrganizationSettings200Response, error)

UpdateOrganizationSettings updates the organization settings from raw JSON bytes.

func UpdateProfile added in v1.0.0

func UpdateProfile(ctx context.Context, profileID string, data []byte) (*v3.GetProfile200Response, error)

UpdateProfile updates profile metadata (name, description, schedule, extra assets, and the AI pentest fields). The body is checked against UpdateProfileRequest, then forwarded unchanged. The generated client's ToMap drops explicit nulls, and the API uses null to clear proxyId, a context field, offLimitsAreas, and the other nullable update fields. The call still goes through the generated client so a 400, 401, or 404 stays a *v3.GenericOpenAPIError that humanizeAPIError and IsInvalidAPIKey can read.

func UpdateProfileConfiguration added in v1.0.0

func UpdateProfileConfiguration(ctx context.Context, profileID string, data []byte) (map[string]interface{}, error)

UpdateProfileConfiguration updates profile configuration (auth, scope, frontend_dast, etc.)

func UpdateProfileSchema added in v1.0.0

func UpdateProfileSchema(ctx context.Context, profileID string, schemaID string) (*v3.GetProfile200Response, error)

UpdateProfileSchema updates the schema attached to a profile

func UpdateProject added in v1.1.0

func UpdateProject(ctx context.Context, projectID string, body []byte) (*v3.CreateProject200Response, error)

UpdateProject updates a project by ID from raw JSON bytes

func UpdateRegressionTest

func UpdateRegressionTest(ctx context.Context, regressionTestID string, data []byte) (*v3.CreateRegressionTest200Response, error)

UpdateRegressionTest updates the name and/or the additional context of a test.

func UpdateRole added in v1.1.0

func UpdateRole(ctx context.Context, roleID string, body []byte) (*v3.CreateRole200Response, error)

UpdateRole updates a role by ID from raw JSON bytes

func UpdateSecurityTest

func UpdateSecurityTest(ctx context.Context, securityTestUID string, body v3.UpdateSecurityTestRequest) (*v3.GetSecurityTest200Response, error)

UpdateSecurityTest changes the organization configuration of one security test: whether it is enabled, and the severity override its issues report. Omitting customSeverity leaves the override untouched. A JSON null, carried on AdditionalProperties, resets it to the scanner default. An empty string is not a severity and is not sent.

func UpdateTag added in v1.1.0

func UpdateTag(ctx context.Context, id string, name *string, color *string) (*v3.CreateTag200Response, error)

UpdateTag updates a tag name and/or color

func UpdateView

func UpdateView(ctx context.Context, viewID string, body []byte) (*v3.CreateView200Response, error)

UpdateView updates a view by ID from raw JSON bytes.

func UpdateWorkflow added in v1.1.0

func UpdateWorkflow(ctx context.Context, workflowID string, body []byte) (*v3.CreateWorkflow200Response, error)

UpdateWorkflow updates a workflow by ID from raw JSON bytes

func UploadFileContent

func UploadFileContent(ctx context.Context, url, name string, data []byte) error

UploadFileContent PUTs file bytes at a signed upload URL. The content type follows the file name: the knowledge library keeps documents, while the schema upload only ever sends JSON or YAML.

func UploadKnowledgeFile

func UploadKnowledgeFile(ctx context.Context, name, kind, temporaryObjectKey string) (*v3.UploadKnowledgeFile200Response, error)

UploadKnowledgeFile registers a file whose bytes were already PUT to a signed upload URL, keyed by the id that URL returned.

func UploadSchema added in v0.3.10

func UploadSchema(ctx context.Context, url string, data []byte) error

UploadSchema uploads a schema file to the signed url

func UpsertKubernetesIntegration added in v0.6.3

UpsertKubernetesIntegration creates a Kubernetes integration if it doesn't exist

func UpsertLocation

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

UpsertLocation Creates or updates a location and returns its ID.

func WatchScan

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

WatchScan watches scans status and logs

Types

type AgentLogSummarized added in v1.8.1

type AgentLogSummarized struct {
	ID          string `json:"id"`
	CreatedAt   string `json:"createdAt"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Stage       string `json:"stage"`
	Level       string `json:"level"`
}

AgentLogSummarized is a reasoning or action log entry for an agent.

func ListScanAgentLogs added in v1.8.1

func ListScanAgentLogs(
	ctx context.Context,
	scanID string,
	agentID string,
	next string,
	size int,
	filters *ListScanAgentLogsFilters,
) ([]AgentLogSummarized, *string, error)

ListScanAgentLogs lists reasoning logs for a scan agent.

type AgentSummarized added in v1.8.1

type AgentSummarized struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Status      string   `json:"status"`
	ParentID    *string  `json:"parentId"`
	HasChildren bool     `json:"hasChildren"`
	Duration    *float64 `json:"duration"`
	IssuesCount int      `json:"issuesCount"`
}

AgentSummarized is a lightweight AI pentest agent row.

func ListScanAgents added in v1.8.1

func ListScanAgents(
	ctx context.Context,
	scanID string,
	next string,
	size int,
	filters *ListScanAgentsFilters,
) ([]AgentSummarized, *string, int, error)

ListScanAgents lists one page of AI pentest agents for a scan. size 0 keeps defaultScanAgentsPageSize. The returned total is totalCount.

type BulkOperationResult

type BulkOperationResult struct {
	Success bool `json:"success"`
}

BulkOperationResult is the {"success": bool} body returned by the bulk asset endpoints. The generated client names the bulk response model after whichever operation the spec lists first (BulkUpdateAssets200Response, BulkUpdateProfiles200Response, ...), so the CLI decodes into this stable local type instead of the generated one and keeps compiling across regenerations.

func BulkDeleteAssets added in v1.1.0

BulkDeleteAssets deletes multiple assets matching a filter

func BulkUpdateAssets added in v1.1.0

BulkUpdateAssets updates multiple assets matching a filter. A nil tag or project list is omitted. An empty non-nil list is sent, which clears that assignment on every matching asset.

type Export

type Export struct {
	ContentType string
	Body        []byte
}

Export is one synchronous CSV or SARIF download. ContentType is the response media type, without parameters.

func ExportAssetsCSV

func ExportAssetsCSV(ctx context.Context, where string) (Export, error)

ExportAssetsCSV downloads assets as CSV. where is a JSON AssetWhereInput object, or empty for the whole organization.

func ExportIssuesCSV

func ExportIssuesCSV(ctx context.Context, where string) (Export, error)

ExportIssuesCSV downloads issues as CSV. where is a JSON IssueWhereInput object, or empty for the whole organization.

func ExportIssuesSARIF

func ExportIssuesSARIF(ctx context.Context, where string) (Export, error)

ExportIssuesSARIF downloads issues as a SARIF 2.1.0 document. where is a JSON IssueWhereInput object, or empty for the whole organization.

type ExportOptions

type ExportOptions struct {
	ScanID       string
	Name         string
	AssetWhere   json.RawMessage
	ProfileWhere json.RawMessage
	IssueWhere   json.RawMessage
	// Dry validates the selection and schedules no job.
	Dry bool
	// Notify is nil when the caller did not ask for a change: the API
	// defaults to emailing the report when it is ready.
	Notify *bool
}

ExportOptions carries the optional fields of the export request. The where fields hold JSON GraphQL where-inputs, validated by the caller.

type GithubRepository

type GithubRepository struct {
	ID             string   `json:"id"`
	FullName       string   `json:"fullName"`
	Name           string   `json:"name"`
	OwnerLogin     string   `json:"ownerLogin"`
	CloneURL       string   `json:"cloneUrl"`
	HTMLURL        string   `json:"htmlUrl"`
	DefaultBranch  string   `json:"defaultBranch"`
	Private        bool     `json:"private"`
	Archived       bool     `json:"archived"`
	Description    *string  `json:"description"`
	IntegrationIDs []string `json:"integrationIds"`
}

GithubRepository is one repository a GitHub integration can reach. FullName, CloneURL and IntegrationIDs are the coordinates an asset create of type GITHUB_REPOSITORY needs. Description is null when the provider has none.

func ListGithubRepositories

func ListGithubRepositories(ctx context.Context, integrationID, next string, size int, filters *ListGithubRepositoriesFilters) ([]GithubRepository, *string, int, error)

ListGithubRepositories lists one page of the repositories the organization's GitHub credentials can see. An empty integrationID lists every repository across the GitHub integrations; otherwise it lists one integration's. size 0 keeps the API default page size. The returned total is totalCount.

type IssueFunnelStep added in v1.1.0

type IssueFunnelStep struct {
	Category string  `json:"category"`
	Step     string  `json:"step"`
	Count    float32 `json:"count"`
}

IssueFunnelStep is a stable CLI DTO for the issue funnel endpoint.

func GetIssueFunnel added in v1.1.0

func GetIssueFunnel(ctx context.Context, projectIDs []string) ([]IssueFunnelStep, error)

GetIssueFunnel returns the issue funnel breakdown

type IssueTrendPoint added in v1.1.0

type IssueTrendPoint struct {
	Date   string  `json:"date"`
	HIGH   float32 `json:"HIGH"`
	MEDIUM float32 `json:"MEDIUM"`
	LOW    float32 `json:"LOW"`
	INFO   float32 `json:"INFO"`
}

IssueTrendPoint is a stable CLI DTO for the issue trends endpoint.

func GetIssueTrends added in v1.1.0

func GetIssueTrends(ctx context.Context, after, before, interval string, applicationIDs, projectIDs []string) ([]IssueTrendPoint, error)

GetIssueTrends returns severity trends over time

type JiraIssueType

type JiraIssueType struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description *string `json:"description"`
	Subtask     *bool   `json:"subtask"`
}

JiraIssueType is one issue type inside a Jira project.

func ListJiraIssueTypes

func ListJiraIssueTypes(ctx context.Context, integrationID, projectID string) ([]JiraIssueType, error)

ListJiraIssueTypes lists the issue types of one Jira project. projectID is the Jira project id (the projectId query param), not the Escape integration id. The route returns a bare array, so this listing uses rawRequest.

type JiraProject

type JiraProject struct {
	ID             string  `json:"id"`
	Name           string  `json:"name"`
	ProjectTypeKey string  `json:"projectTypeKey"`
	EntityID       *string `json:"entityId"`
}

JiraProject is one Jira project the integration can file tickets against.

func ListJiraProjects

func ListJiraProjects(ctx context.Context, integrationID, search string) ([]JiraProject, error)

ListJiraProjects lists every Jira project an integration can file tickets against, following X-Next-Cursor until the API stops sending one. search narrows the listing by project name and is sent on every page. A deployment that omits the header returns its array in one response.

The generated client decodes a page envelope, so the bare array is read directly and the response headers are kept for the cursor.

type JobsFilters

type JobsFilters struct {
	Search        string
	Kinds         []string
	Statuses      []string
	SortType      string
	SortDirection string
}

JobsFilters narrows a job listing. Empty fields are left out of the query so the server keeps its own default.

type ListAssetsFilters added in v0.3.2

type ListAssetsFilters struct {
	AssetTypes      []string
	AssetStatuses   []string
	ProjectIDs      []string
	TagIDs          []string
	Classes         []string
	Environments    []string
	Domains         []string
	IntegrationIDs  []string
	OwnerEmails     []string
	TechnologyKeys  []string
	Ports           []string
	Severities      []string
	Risks           []string
	Frameworks      []string
	DNF             string
	Search          string
	ManuallyCreated bool
	SortType        string
	SortDirection   string
}

ListAssetsFilters holds optional filters for listing assets. The slice fields are sent as comma-separated query values, matching the public API.

type ListAuditLogsFilters added in v0.3.2

type ListAuditLogsFilters struct {
	DateFrom      string
	DateTo        string
	ActionType    string
	Actor         string
	Search        string
	Target        string
	SortType      string
	SortDirection string
	Size          int
}

ListAuditLogsFilters holds optional filters for listing audit logs

type ListCustomRulesFilters

type ListCustomRulesFilters struct {
	Search  string
	Context string
}

ListCustomRulesFilters holds optional filters for listing custom rules. Empty fields are omitted. Both are applied on every drained page.

type ListEventsFilters added in v0.3.2

type ListEventsFilters struct {
	Search              string
	After               string
	Before              string
	ProfileIDs          []string
	ScanIDs             []string
	AssetIDs            []string
	IssueIDs            []string
	EventIDs            string
	TargetIDs           string
	WorkflowIDs         string
	Groups              string
	Levels              []string
	Stages              []string
	Severities          []string
	Risks               []string
	ScanProblemCodes    []string
	ResponseStatusCodes string
	HasAttachments      bool
	Attachments         []string
	Public              string
	Dnf                 string
	SortType            string
	SortDirection       string
}

ListEventsFilters holds optional filters for listing events

type ListGithubRepositoriesFilters

type ListGithubRepositoriesFilters struct {
	Search    string
	FullNames []string
}

ListGithubRepositoriesFilters narrows the GitHub repository listing. FullNames filters by owner/name; Search matches a substring of it.

type ListInboxEmailsFilters added in v1.2.0

type ListInboxEmailsFilters struct {
	Email  string
	IDs    []string
	Before *time.Time
	After  *time.Time
	Size   int
}

ListInboxEmailsFilters holds the supported inbox email list filters.

type ListIntegrationsFilters added in v1.1.0

type ListIntegrationsFilters struct {
	ProjectIDs  []string
	IDs         []string
	LocationIDs []string
	Search      string
}

ListIntegrationsFilters holds optional filters for listing integrations.

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
	Names            []string
	ProjectIDs       []string
	TargetIDs        []string
	Categories       []string
	AssetTypes       []string
	AssetStatuses    []string
	SecurityTestUids []string
	BlacklistedIDs   []string
	BlacklistedNames []string
	AiFalsePositive  string
	Agentic          string
	NoTags           *bool
	Dnf              string
}

ListIssuesFilters holds optional filters for listing issues

type ListKubernetesIntegrationsFilters added in v0.6.3

type ListKubernetesIntegrationsFilters struct {
	ProjectIDs  []string
	LocationIDs string
	Search      string
}

ListKubernetesIntegrationsFilters holds optional filters for listing Kubernetes integrations

type ListLocationLogsFilters

type ListLocationLogsFilters struct {
	Search string
}

ListLocationLogsFilters holds the optional filters of the log listing.

type ListLocationsFilters added in v0.3.2

type ListLocationsFilters struct {
	Search        string
	Enabled       bool
	LocationTypes []string
	SortType      string
	SortDirection string
}

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
	ProblemCodes      []string
	ProblemSeverities []string
}

ListProblemsFilters holds optional filters for listing problems

type ListProfilesFilters added in v0.3.2

type ListProfilesFilters struct {
	AssetIDs          []string
	AssetSchemaIDs    string
	AssetTypes        []string
	AssetStatuses     []string
	Domains           []string
	IDs               string
	IssueIDs          []string
	TagsIDs           []string
	ProjectIDs        []string
	ScanIDs           string
	LastScanStatuses  []string
	Search            string
	Initiators        []string
	Kinds             []string
	Risks             []string
	ProblemCodes      []string
	ProblemSeverities []string
	NoProjects        string
	NoTags            string
	Dnf               string
	SortType          string
	SortDirection     string
}

ListProfilesFilters holds optional filters for listing profiles

type ListProjectsFilters added in v1.1.0

type ListProjectsFilters struct {
	Search      string
	IDs         []string
	Permissions []string
}

ListProjectsFilters holds optional filters for listing projects. IDs is comma-joined: the generated client types this filter as one string, and the route splits commas. Permissions are repeated query keys.

type ListRetestsFilters

type ListRetestsFilters struct {
	ProfileIDs    []string
	SortType      string
	SortDirection string
}

ListRetestsFilters holds optional filters for listing retests.

type ListScanAgentLogsFilters added in v1.8.1

type ListScanAgentLogsFilters struct {
	Search        string
	Stages        []string
	SortType      string
	SortDirection string
}

ListScanAgentLogsFilters holds optional filters for listing agent logs.

type ListScanAgentsFilters added in v1.8.1

type ListScanAgentsFilters struct {
	Search        string
	EventSearch   string
	RootsOnly     bool
	SortType      string
	SortDirection string
}

ListScanAgentsFilters holds optional filters for listing scan agents.

type ListScanProblemsFilters added in v1.3.6

type ListScanProblemsFilters struct {
	After             string
	Before            string
	AssetIDs          []string
	ProfileIDs        []string
	ProjectIDs        []string
	Ignored           string
	Initiator         []string
	Kinds             []string
	Status            []string
	ProblemCodes      []string
	ProblemSeverities []string
	SortType          string
	SortDirection     string
}

ListScanProblemsFilters holds optional filters for listing scan problems

type ListScanTargetsFilters

type ListScanTargetsFilters struct {
	Types         []string
	Sources       []string
	Coverage      []string
	Severities    []string
	Issues        []string
	Methods       []string
	Search        string
	SortType      string
	SortDirection string
}

ListScanTargetsFilters are the optional filters for one page of scan targets. Empty fields are omitted. Slice filters are repeated query keys: the route accepts one value or repeated values and does not split commas.

type ListScansFilters added in v0.3.2

type ListScansFilters struct {
	After             string
	Before            string
	Search            string
	AssetIDs          *[]string
	ProfileIDs        *[]string
	ProjectIDs        *[]string
	TagIDs            *[]string
	AssetTypes        *[]string
	Ignored           string
	Initiator         *[]string
	Kinds             *[]string
	Status            *[]string
	ProblemCodes      *[]string
	ProblemSeverities *[]string
	NoTags            string
	Dnf               string
	CommitBranch      string
	LatestBranchScans string
	SortType          string
	SortDirection     string
}

ListScansFilters holds optional filters for listing scans

type ListVaultVariablesFilters

type ListVaultVariablesFilters struct {
	Search string
}

ListVaultVariablesFilters holds the optional filters of the variable listing.

type ListViewIssuesFilters

type ListViewIssuesFilters struct {
	SortType      string
	SortDirection string
}

ListViewIssuesFilters holds the optional sort of a view's issue listing.

type ListWorkflowsFilters added in v1.1.0

type ListWorkflowsFilters struct {
	Triggers       []string
	Search         string
	ProjectIDs     []string
	IntegrationIDs []string
	WorkflowIDs    []string
	Dnf            string
}

ListWorkflowsFilters holds optional filters for listing workflows

type SecurityTestsFilters

type SecurityTestsFilters struct {
	Search        string
	Enabled       string
	ScannerKinds  []string
	AssetTypes    []string
	SortType      string
	SortDirection string
}

SecurityTestsFilters narrows the organization security-test catalog. Empty fields are left out of the query so the server keeps its own default.

type StatisticsSource

type StatisticsSource string

StatisticsSource selects which scanner family a sub-resource counts.

const (
	// StatisticsSourceDAST counts DAST findings.
	StatisticsSourceDAST StatisticsSource = "DAST"
	// StatisticsSourcePentest counts AI pentest findings.
	StatisticsSourcePentest StatisticsSource = "PENTEST"
)

type UpdateAssetInput

type UpdateAssetInput struct {
	Description       *string
	Framework         *v3.ENUMPROPERTIESFRAMEWORK
	Owners            *[]string
	Status            *v3.ENUMPROPERTIESDATAITEMSPROPERTIESEXTRAASSETSITEMSPROPERTIESSTATUS
	TagIDs            *[]string
	ProjectIDs        *[]string
	Name              *string
	Environment       *v3.ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT
	ManuallySetStatus *bool
	BaseURL           *string
	Address           *string
	BestSchemaID      *string
	SchemaIDs         *[]string
	ParentLinks       *v3.UpdateAssetParentLinks
	ChildLinks        *v3.UpdateAssetChildLinks
}

UpdateAssetInput is the optional body of PUT /v3/assets/{id}. A nil field is omitted, so the API leaves it unchanged. A non-nil pointer is sent, including a pointer to "" or to an empty slice, which clears that field. Enums stay nil when unset: the API rejects an empty string for them.

type VariableContent

type VariableContent struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Name string `json:"name"`
}

VariableContent is a vault variable as the public API returns it. The value is write-only and is never part of this struct.

func CreateExternalVaultVariable

func CreateExternalVaultVariable(ctx context.Context, name, externalID, externalEntry string) (*VariableContent, error)

CreateExternalVaultVariable stores a pointer at a provider entry. The API confirms the vault and the entry exist before it stores the variable.

func CreatePlaintextVaultVariable

func CreatePlaintextVaultVariable(ctx context.Context, name, value string) (*VariableContent, error)

CreatePlaintextVaultVariable stores a plaintext value under name.

func CreateSecretVaultVariable

func CreateSecretVaultVariable(ctx context.Context, name, value string) (*VariableContent, error)

CreateSecretVaultVariable stores a masked secret under name.

func ListVaultVariables

func ListVaultVariables(ctx context.Context, next string, size int, filters *ListVaultVariablesFilters) ([]VariableContent, *string, int, error)

ListVaultVariables lists one page of the organization's vault variables. size 0 keeps the API default page size. The returned total is totalCount.

func UpdateVaultVariable

func UpdateVaultVariable(ctx context.Context, variableID, value, externalEntry string, external bool) (*VariableContent, error)

UpdateVaultVariable replaces the value of a plaintext or secret variable, or the entry name of an external one. Exactly one of value and externalEntry is sent.

Jump to

Keyboard shortcuts

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