{"modulePath":"github.com/CompassSecurity/pipeleek","version":"v1.5.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package scan\n\n## Types\n\n```go\ntype Account struct {\n\tAccountID   string `json:\"accountId\"`\n\tAccountURI  string `json:\"accountUri\"`\n\tAccountName string `json:\"accountName\"`\n}\n```\n\n```go\ntype Artifact struct {\n\tID       int    `json:\"id\"`\n\tName     string `json:\"name\"`\n\tSource   string `json:\"source\"`\n\tResource struct {\n\t\tType       string `json:\"type\"`\n\t\tData       string `json:\"data\"`\n\t\tProperties struct {\n\t\t\tLocalpath    string `json:\"localpath\"`\n\t\t\tArtifactsize string `json:\"artifactsize\"`\n\t\t} `json:\"properties\"`\n\t\tURL         string `json:\"url\"`\n\t\tDownloadURL string `json:\"downloadUrl\"`\n\t} `json:\"resource\"`\n}\n```\n\n```go\ntype AuthenticatedUser struct {\n\tDisplayName  string    `json:\"displayName\"`\n\tPublicAlias  string    `json:\"publicAlias\"`\n\tEmailAddress string    `json:\"emailAddress\"`\n\tCoreRevision int       `json:\"coreRevision\"`\n\tTimeStamp    time.Time `json:\"timeStamp\"`\n\tID           string    `json:\"id\"`\n\tRevision     int       `json:\"revision\"`\n}\n```\n\n```go\ntype AzureDevOpsApiClient struct {\n\tClient   resty.Client\n\tBaseURL  string\n\tVsspsURL string // URL for profile/account APIs\n}\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/](https://learn.microsoft.com/en-us/rest/api/azure/devops/)\n\n```go\nfunc NewClient(username string, password string, baseURL string) AzureDevOpsApiClient\n```\n\n```go\nfunc (a AzureDevOpsApiClient) DownloadArtifactZip(url string) ([]byte, *resty.Response, error)\n```\n\n```go\nfunc (a AzureDevOpsApiClient) GetAuthenticatedUser() (*AuthenticatedUser, *resty.Response, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/profile/profiles/get?view=azure-devops-rest-7.2\u0026tabs=HTTP](https://learn.microsoft.com/en-us/rest/api/azure/devops/profile/profiles/get?view=azure-devops-rest-7.2\u0026tabs=HTTP)\n\n```go\nfunc (a AzureDevOpsApiClient) GetLog(organization string, project string, buildId int, logId int) ([]byte, *resty.Response, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/get-build-log?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/get-build-log?view=azure-devops-rest-7.2)\n\n```go\nfunc (a AzureDevOpsApiClient) ListAccounts(ownerId string) ([]Account, *resty.Response, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/account/accounts/list?view=azure-devops-rest-7.2\u0026tabs=HTTP](https://learn.microsoft.com/en-us/rest/api/azure/devops/account/accounts/list?view=azure-devops-rest-7.2\u0026tabs=HTTP)\n\n```go\nfunc (a AzureDevOpsApiClient) ListBuildArtifacts(continuationToken string, organization string, project string, buildId int) ([]Artifact, *resty.Response, string, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/list?view=azure-devops-rest-7.1](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/list?view=azure-devops-rest-7.1) this endpoint is NOT paged\n\n```go\nfunc (a AzureDevOpsApiClient) ListBuildLogs(organization string, project string, buildId int) ([]BuildLog, *resty.Response, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/get-build-logs?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/get-build-logs?view=azure-devops-rest-7.2) this endpoint is NOT paged\n\n```go\nfunc (a AzureDevOpsApiClient) ListBuilds(continuationToken string, organization string, project string) ([]Build, *resty.Response, string, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-7.2](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-7.2)\n\n```go\nfunc (a AzureDevOpsApiClient) ListProjects(continuationToken string, organization string) ([]Project, *resty.Response, string, error)\n```\n[https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-7.2\u0026tabs=HTTP](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-7.2\u0026tabs=HTTP)\n\n```go\ntype Build struct {\n\tLinks struct {\n\t\tSelf struct {\n\t\t\tHref string `json:\"href\"`\n\t\t} `json:\"self\"`\n\t\tWeb struct {\n\t\t\tHref string `json:\"href\"`\n\t\t} `json:\"web\"`\n\t\tSourceVersionDisplayURI struct {\n\t\t\tHref string `json:\"href\"`\n\t\t} `json:\"sourceVersionDisplayUri\"`\n\t\tTimeline struct {\n\t\t\tHref string `json:\"href\"`\n\t\t} `json:\"timeline\"`\n\t\tBadge struct {\n\t\t\tHref string `json:\"href\"`\n\t\t} `json:\"badge\"`\n\t} `json:\"_links\"`\n\tProperties struct {\n\t} `json:\"properties\"`\n\tTags              []interface{} `json:\"tags\"`\n\tValidationResults []interface{} `json:\"validationResults\"`\n\tPlans             []struct {\n\t\tPlanID string `json:\"planId\"`\n\t} `json:\"plans\"`\n\tTriggerInfo struct {\n\t} `json:\"triggerInfo\"`\n\tID          int       `json:\"id\"`\n\tBuildNumber string    `json:\"buildNumber\"`\n\tStatus      string    `json:\"status\"`\n\tResult      string    `json:\"result\"`\n\tQueueTime   time.Time `json:\"queueTime\"`\n\tStartTime   time.Time `json:\"startTime\"`\n\tFinishTime  time.Time `json:\"finishTime\"`\n\tURL         string    `json:\"url\"`\n\tDefinition  struct {\n\t\tDrafts      []interface{} `json:\"drafts\"`\n\t\tID          int           `json:\"id\"`\n\t\tName        string        `json:\"name\"`\n\t\tURL         string        `json:\"url\"`\n\t\tURI         string        `json:\"uri\"`\n\t\tPath        string        `json:\"path\"`\n\t\tType        string        `json:\"type\"`\n\t\tQueueStatus string        `json:\"queueStatus\"`\n\t\tRevision    int           `json:\"revision\"`\n\t\tProject     struct {\n\t\t\tID             string    `json:\"id\"`\n\t\t\tName           string    `json:\"name\"`\n\t\t\tURL            string    `json:\"url\"`\n\t\t\tState          string    `json:\"state\"`\n\t\t\tRevision       int       `json:\"revision\"`\n\t\t\tVisibility     string    `json:\"visibility\"`\n\t\t\tLastUpdateTime time.Time `json:\"lastUpdateTime\"`\n\t\t} `json:\"project\"`\n\t} `json:\"definition\"`\n\tBuildNumberRevision int `json:\"buildNumberRevision\"`\n\tProject             struct {\n\t\tID             string    `json:\"id\"`\n\t\tName           string    `json:\"name\"`\n\t\tURL            string    `json:\"url\"`\n\t\tState          string    `json:\"state\"`\n\t\tRevision       int       `json:\"revision\"`\n\t\tVisibility     string    `json:\"visibility\"`\n\t\tLastUpdateTime time.Time `json:\"lastUpdateTime\"`\n\t} `json:\"project\"`\n\tURI           string `json:\"uri\"`\n\tSourceBranch  string `json:\"sourceBranch\"`\n\tSourceVersion string `json:\"sourceVersion\"`\n\tQueue         struct {\n\t\tID   int    `json:\"id\"`\n\t\tName string `json:\"name\"`\n\t\tPool struct {\n\t\t\tID       int    `json:\"id\"`\n\t\t\tName     string `json:\"name\"`\n\t\t\tIsHosted bool   `json:\"isHosted\"`\n\t\t} `json:\"pool\"`\n\t} `json:\"queue\"`\n\tPriority     string `json:\"priority\"`\n\tReason       string `json:\"reason\"`\n\tRequestedFor struct {\n\t\tDisplayName string `json:\"displayName\"`\n\t\tURL         string `json:\"url\"`\n\t\tLinks       struct {\n\t\t\tAvatar struct {\n\t\t\t\tHref string `json:\"href\"`\n\t\t\t} `json:\"avatar\"`\n\t\t} `json:\"_links\"`\n\t\tID         string `json:\"id\"`\n\t\tUniqueName string `json:\"uniqueName\"`\n\t\tImageURL   string `json:\"imageUrl\"`\n\t\tDescriptor string `json:\"descriptor\"`\n\t} `json:\"requestedFor\"`\n\tRequestedBy struct {\n\t\tDisplayName string `json:\"displayName\"`\n\t\tURL         string `json:\"url\"`\n\t\tLinks       struct {\n\t\t\tAvatar struct {\n\t\t\t\tHref string `json:\"href\"`\n\t\t\t} `json:\"avatar\"`\n\t\t} `json:\"_links\"`\n\t\tID         string `json:\"id\"`\n\t\tUniqueName string `json:\"uniqueName\"`\n\t\tImageURL   string `json:\"imageUrl\"`\n\t\tDescriptor string `json:\"descriptor\"`\n\t} `json:\"requestedBy\"`\n\tLastChangedDate time.Time `json:\"lastChangedDate\"`\n\tLastChangedBy   struct {\n\t\tDisplayName string `json:\"displayName\"`\n\t\tURL         string `json:\"url\"`\n\t\tLinks       struct {\n\t\t\tAvatar struct {\n\t\t\t\tHref string `json:\"href\"`\n\t\t\t} `json:\"avatar\"`\n\t\t} `json:\"_links\"`\n\t\tID         string `json:\"id\"`\n\t\tUniqueName string `json:\"uniqueName\"`\n\t\tImageURL   string `json:\"imageUrl\"`\n\t\tDescriptor string `json:\"descriptor\"`\n\t} `json:\"lastChangedBy\"`\n\tOrchestrationPlan struct {\n\t\tPlanID string `json:\"planId\"`\n\t} `json:\"orchestrationPlan\"`\n\tLogs struct {\n\t\tID   int    `json:\"id\"`\n\t\tType string `json:\"type\"`\n\t\tURL  string `json:\"url\"`\n\t} `json:\"logs\"`\n\tRepository struct {\n\t\tID                 string      `json:\"id\"`\n\t\tType               string      `json:\"type\"`\n\t\tName               string      `json:\"name\"`\n\t\tURL                string      `json:\"url\"`\n\t\tClean              interface{} `json:\"clean\"`\n\t\tCheckoutSubmodules bool        `json:\"checkoutSubmodules\"`\n\t} `json:\"repository\"`\n\tRetainedByRelease            bool        `json:\"retainedByRelease\"`\n\tTriggeredByBuild             interface{} `json:\"triggeredByBuild\"`\n\tAppendCommitMessageToRunName bool        `json:\"appendCommitMessageToRunName\"`\n}\n```\n\n```go\ntype BuildLog struct {\n\tLineCount     int       `json:\"lineCount\"`\n\tCreatedOn     time.Time `json:\"createdOn\"`\n\tLastChangedOn time.Time `json:\"lastChangedOn\"`\n\tID            int       `json:\"id\"`\n\tType          string    `json:\"type\"`\n\tURL           string    `json:\"url\"`\n}\n```\n\n```go\ntype PaginatedResponse[T any] struct {\n\tCount int `json:\"count\"`\n\tValue []T `json:\"value\"`\n}\n```\n\n```go\ntype Project struct {\n\tID             string    `json:\"id\"`\n\tName           string    `json:\"name\"`\n\tURL            string    `json:\"url\"`\n\tState          string    `json:\"state\"`\n\tRevision       int       `json:\"revision\"`\n\tVisibility     string    `json:\"visibility\"`\n\tLastUpdateTime time.Time `json:\"lastUpdateTime\"`\n}\n```\n\n```go\ntype ScanOptions struct {\n\tUsername            string\n\tAccessToken         string\n\tConfidenceFilter    []string\n\tMaxScanGoRoutines   int\n\tSecretsVerification bool\n\tMaxBuilds           int\n\tOrganization        string\n\tProject             string\n\tArtifacts           bool\n\tDevOpsURL           string\n\tMaxArtifactSize     int64\n\tHitTimeout          time.Duration\n\tContext             context.Context\n\tClient              AzureDevOpsApiClient\n}\n```\nScanOptions contains configuration options for Azure DevOps scanning operations.\n\n```go\nfunc InitializeOptions(username, accessToken, devOpsURL, organization, project, maxArtifactSizeStr string,\n\tartifacts, secretsVerification bool,\n\tmaxBuilds, maxScanGoRoutines int, confidenceFilter []string, hitTimeout time.Duration) (ScanOptions, error)\n```\nInitializeOptions prepares scan options from CLI parameters.\n\n```go\ntype Scanner interface {\n\tpkgscanner.BaseScanner\n}\n```\n\n```go\nfunc NewScanner(opts ScanOptions) Scanner\n```\n\n","path":"github.com/CompassSecurity/pipeleek/pkg/devops/scan","name":"scan","synopsis":"","isRedistributable":true}
