-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflags.go
More file actions
331 lines (315 loc) · 14.8 KB
/
flags.go
File metadata and controls
331 lines (315 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
package params
// Flags
const (
AllStatesFlag = "all"
AgentFlag = "agent"
AiProviderFlag = "ai-provider"
ProblemSeverityFlag = "problem-severity"
TypeFlag = "type"
SubTypeFlag = "sub-type"
EngineFlag = "engine"
StatusFlag = "status"
scanTypeFlag = "scan-type"
TotalCountFlag = "total-count"
OriginFlag = "origin"
AgentFlagUsage = "Scan origin name"
ApplicationName = "application-name"
DefaultAgent = "ASTCLI"
DebugFlag = "debug"
DebugUsage = "Debug mode with detailed logs"
RetryFlag = "retry"
RetryDefault = 3
RetryUsage = "Retry requests to Checkmarx One on connection failure"
RetryDelayFlag = "retry-delay"
RetryDelayDefault = 20
RetryDelayPollingDefault = 60
RetryDelayUsage = "Time between retries in seconds, use with --" + RetryFlag
SourcesFlag = "file-source"
IgnoredFilePathFlag = "ignored-file-path"
SourcesFlagSh = "s"
TenantFlag = "tenant"
TenantFlagUsage = "Checkmarx tenant"
AsyncFlag = "async"
WaitDelayFlag = "wait-delay"
ScanTimeoutFlag = "scan-timeout"
PolicyTimeoutFlag = "policy-timeout"
IgnorePolicyFlag = "ignore-policy"
SourceDirFilterFlag = "file-filter"
SourceDirFilterFlagSh = "f"
ImportFilePath = "import-file-path"
IncludeFilterFlag = "file-include"
IncludeFilterFlagSh = "i"
ProjectIDFlag = "project-id"
BranchFlag = "branch"
BranchFlagSh = "b"
ScanIDFlag = "scan-id"
CodeRepositoryFlag = "code-repository-url"
CodeRepositoryFlagUsage = "Code repository URL (required for self-hosted SCMs)"
BranchFlagUsage = "Branch to scan"
MainBranchFlag = "branch"
ScaResolverFlag = "sca-resolver"
ScaResolverParamsFlag = "sca-resolver-params"
AccessKeyIDFlag = "client-id"
AccessKeySecretFlag = "client-secret"
AccessKeyIDFlagUsage = "The OAuth2 client ID"
AccessKeySecretFlagUsage = "The OAuth2 client secret"
InsecureFlag = "insecure"
InsecureFlagUsage = "Ignore TLS certificate validations"
ScanInfoFormatFlag = "scan-info-format"
FormatFlag = "format"
FormatFlagUsageFormat = "Format for the output. One of %s"
FilterFlag = "filter"
ASCALatestVersion = "asca-latest-version"
BaseURIFlag = "base-uri"
ProxyFlag = "proxy"
ProxyFlagUsage = "Proxy server to send communication through"
IgnoreProxyFlag = "ignore-proxy"
IgnoreProxyFlagUsage = "Ignore proxy configuration"
ProxyTypeFlag = "proxy-auth-type"
ProxyTypeFlagUsage = "Proxy authentication type (supported types: basic, ntlm, kerberos or kerberos-native)"
TimeoutFlag = "timeout"
TimeoutFlagUsage = "Timeout for network activity, (default 5 seconds)"
NtlmProxyDomainFlag = "proxy-ntlm-domain"
KerberosProxySPNFlag = "proxy-kerberos-spn"
KerberosKrb5ConfFlag = "proxy-kerberos-krb5-conf"
KerberosCcacheFlag = "proxy-kerberos-ccache"
SastFastScanFlag = "sast-fast-scan"
SastLightQueriesFlag = "sast-light-queries"
BranchPrimaryFlag = "branch-primary"
SastRecommendedExclusionsFlags = "sast-recommended-exclusions"
NtlmProxyDomainFlagUsage = "Window domain when using NTLM proxy"
KerberosProxySPNFlagUsage = "Service Principal Name (SPN) for Kerberos proxy authentication"
KerberosKrb5ConfFlagUsage = "Path to Kerberos configuration file(default: /etc/krb5.conf on linux and C:\\Windows\\krb5.ini on windows)"
KerberosCcacheFlagUsage = "Path to Kerberos credential cache (optional, default uses KRB5CCNAME env or OS default)"
BaseURIFlagUsage = "The base system URI"
BaseAuthURIFlag = "base-auth-uri"
BaseAuthURIFlagUsage = "The base system IAM URI"
AstAPIKeyFlag = "apikey"
AstAPIKeyUsage = "The API Key to login to Checkmarx One"
ClientRolesFlag = "roles"
ClientRolesSh = "r"
ClientDescriptionFlag = "description"
ClientDescriptionSh = "d"
UsernameFlag = "username"
UsernameSh = "u"
PasswordFlag = "password"
PasswordSh = "p"
Help = "help"
TargetFlag = "output-name"
TargetPathFlag = "output-path"
TargetFormatFlag = "report-format"
ReportFormatPdfToEmailFlag = "report-pdf-email"
ReportFormatPdfOptionsFlag = "report-pdf-options"
ReportSbomFormatFlag = "report-sbom-format"
ProjectName = "project-name"
ScanTypes = "scan-types"
ScanTypeFlag = "scan-type"
ScanResubmit = "resubmit"
KicsRealtimeFile = "file"
KicsRealtimeEngine = "engine"
KicsRealtimeAdditionalParams = "additional-params"
ScaRealtimeProjectDir = "project-dir"
ScaRealtimeProjectDirSh = "p"
RemediationFiles = "package-files"
KicsRemediationFile = "results-file"
KicsProjectFile = "kics-files"
KicsSimilarityFilter = "similarity-ids"
RemediationPackage = "package"
RemediationPackageVersion = "package-version"
TagList = "tags"
GroupList = "groups"
ProjectGroupList = "project-groups"
ProjectTagList = "project-tags"
IncrementalSast = "sast-incremental"
PresetName = "sast-preset-name"
Threshold = "threshold"
ThresholdFlagUsage = "Local build threshold. Format <engine>-<severity>=<limit>. " +
"Example: scan --threshold \"sast-high=10;sca-high=5;iac-security-low=10\""
KeyValuePairSize = 2
WaitDelayDefault = 5
SimilarityIDFlag = "similarity-id"
SeverityFlag = "severity"
StateFlag = "state"
CustomStateIDFlag = "state-id"
CommentFlag = "comment"
LanguageFlag = "language"
VulnerabilityTypeFlag = "vulnerability-type"
CweIDFlag = "cwe-id"
SCMTokenFlag = "token"
AzureTokenUsage = "Azure DevOps personal access token. Requires “Connected server” and “Code“ scope"
GithubTokenUsage = "GitHub OAuth token. Requires “Repo” scope and organization SSO authorization, if enforced by the organization"
GitLabTokenUsage = "GitLab OAuth token"
BitbucketTokenUsage = "Bitbucket OAuth token"
BotCount = "Note: dependabot is not counted but other bots might be considered as contributors."
DisabledReposCount = "Note: Disabled repositories are not counted."
URLFlag = "url"
GitLabURLFlag = "url-gitlab"
URLFlagUsage = "API base URL"
QueryIDFlag = "query-id"
SSHKeyFlag = "ssh-key"
RepoURLFlag = "repo-url"
AstToken = "ast-token"
SSHValue = "ssh-value"
KicsContainerNameKey = "kics-container-name"
KicsPlatformsFlag = "kics-platforms"
KicsPlatformsFlagUsage = "KICS Platform Flag. Use ',' as the delimiter for arrays."
IacsPlatformsFlag = "iac-security-platforms"
IacsPlatformsFlagUsage = "IaC Security Platform Flag"
IacsPresetIDFlag = "iac-security-preset-id"
IacsPresetIDUsage = "The ID of the IaC Security Preset to use (must be a valid UUID)"
ApikeyOverrideFlag = "apikey-override"
ExploitablePathFlag = "sca-exploitable-path"
LastSastScanTime = "sca-last-sast-scan-time"
ProjecPrivatePackageFlag = "project-private-package"
SastRedundancyFlag = "sast-redundancy"
ContainerResolveLocallyFlag = "containers-local-resolution"
ContainerImagesFlag = "container-images"
ContainersTypeFlag = "container-security"
VSCodeAgent = "VS Code"
EclipseAgent = "Eclipse"
VisualStudioAgent = "Visual Studio"
JetbrainsAgent = "Jetbrains"
ScaPrivatePackageVersionFlag = "sca-private-package-version"
ScaHideDevAndTestDepFlag = "sca-hide-dev-test-dependencies"
LimitFlag = "limit"
ConfigFilePathFlag = "config-file-path"
LogFileFlag = "log-file"
LogFileUsage = "Saves logs to the specified file path only"
LogFileConsoleFlag = "log-file-console"
LogFileConsoleUsage = "Saves logs to the specified file path as well as to the console"
GitIgnoreFileFilterFlag = "use-gitignore"
GitIgnoreFileFilterUsage = "Exclude files and directories from the scan based on the patterns defined in the directory's .gitignore file"
// INDIVIDUAL FILTER FLAGS
SastFilterFlag = "sast-filter"
SastFilterUsage = "SAST filter"
KicsFilterFlag = "kics-filter"
IacsFilterFlag = "iac-security-filter"
IacsFilterUsage = "IaC Security filter"
KicsFilterUsage = "KICS filter"
ScaFilterFlag = "sca-filter"
ScaFilterUsage = "SCA filter"
// PR decoration flags
NamespaceFlag = "namespace"
NamespaceFlagUsage = "%s namespace is required to post the comments"
RepoNameFlag = "repo-name"
RepoNameFlagUsage = "%s repository details"
PRNumberFlag = "pr-number"
PRNumberFlagUsage = "Pull Request number for posting notifications and comments"
PRIidFlag = "mr-iid"
PRIidFlagUsage = "Gitlab IID (internal ID) of the merge request"
PRGitlabProjectFlag = "gitlab-project-id"
PRGitlabProjectFlagUsage = "Gitlab project ID"
AzureProjectFlag = "project"
AzureProjectFlagUsage = "Azure project name or project ID"
CodeRespositoryUsernameFlag = "code-repository-username"
CodeRespositoryUsernameFlagUsage = "Azure username for code repository"
ProjectKeyFlag = "project-key"
ProjectKeyFlagUsage = "Key of the project containing the repository"
PRBBIDFlag = "pr-id"
PRBBIDFlagUsage = "Bitbucket PR ID"
// Chat (General)
ChatAPIKey = "chat-apikey"
ChatConversationID = "conversation-id"
ChatUserInput = "user-input"
ChatModel = "model"
// Chat (Kics)
ChatKicsResultFile = "result-file"
ChatKicsResultLine = "result-line"
ChatKicsResultSeverity = "result-severity"
ChatKicsResultVulnerability = "result-vulnerability"
// Mask
MaskContent = "mask-content"
// Chat (SAST)
ChatSastScanResultsFile = "scan-results-file"
ChatSastSourceDir = "source-dir"
ChatSastResultID = "sast-result-id"
// SCS Engines Enabled
SCSEnginesFlag = "scs-engines"
// SCS (Github)
SCSRepoTokenFlag = "scs-repo-token"
SCSRepoURLFlag = "scs-repo-url"
// Containers Config Flags
ContainersFileFolderFilterFlag = "containers-file-folder-filter"
ContainersImageTagFilterFlag = "containers-image-tag-filter"
ContainersPackageFilterFlag = "containers-package-filter"
ContainersExcludeNonFinalStagesFlag = "containers-exclude-non-final-stages"
// SBOM - flag
SbomFlag = "sbom-only"
)
// Parameter values
const (
IDQueryParam = "id"
IDsQueryParam = "ids"
IDRegexQueryParam = "id-regex"
LimitQueryParam = "limit"
OffsetQueryParam = "offset"
ScanIDQueryParam = "scan-id"
ScanIDsQueryParam = "scan-ids"
QueryIDQueryParam = "query-id"
TagsKeyQueryParam = "tags-keys"
TagsValueQueryParam = "tags-values"
TagsEmptyQueryParam = "empty-tags"
StatusesQueryParam = "statuses"
StatusQueryParam = "status"
BranchNameQueryParam = "branch-name"
ProjectIDQueryParam = "project-id"
FromDateQueryParam = "from-date"
ToDateQueryParam = "to-date"
SeverityQueryParam = "severity"
StateQueryParam = "state"
GroupQueryParam = "group"
QueryQueryParam = "query"
NodeIDsQueryParam = "node-ids"
IncludeNodesQueryParam = "include-nodes"
SortQueryParam = "sort"
Profile = "default"
BaseURI = ""
BaseIAMURI = ""
Tenant = ""
Branch = ""
ScanPolicyDefaultTimeout = 4
ResultPolicyDefaultTimeout = 1
)
// Results
const (
SastType = "sast"
KicsType = "kics"
APISecurityType = "api-security"
AIProtectionType = "AI Protection"
CheckmarxOneAssistType = "Checkmarx One Assist"
ContainersType = "containers"
APIDocumentationFlag = "apisec-swagger-filter"
IacType = "iac-security"
IacLabel = "IaC Security"
APISecurityLabel = "API Security"
ScaType = "sca"
APISecType = "apisec"
ScsType = "scs"
SscsType = "sscs"
MicroEnginesType = "microengines" // the scs scan type for scans API
Success = "success"
SCSScorecardType = "sscs-scorecard"
SCSSecretDetectionType = "sscs-secret-detection"
SecretDetectionType = "secret-detection"
SecretDetectionLabel = "Secret Detection"
EnterpriseSecretsLabel = "Enterprise Secrets"
EnterpriseSecretsType = "enterprise-secrets"
RepositoryHealthType = "repository-health"
RepositoryHealthLabel = "Repository Health"
SCSScorecardOverviewType = "Scorecard"
SCSSecretDetectionOverviewType = "2ms"
)
// ScaAgent AST Role
const ScaAgent = "SCA_AGENT"
var (
Version = "dev"
)
// Custom states
const IncludeDeletedQueryParam = "include-deleted"
const True = "true"
// System States
const ToVerify = "TO_VERIFY"
const NotExploitable = "NOT_EXPLOITABLE"
const ProposedNotExploitable = "PROPOSED_NOT_EXPLOITABLE"
const CONFIRMED = "CONFIRMED"
const URGENT = "URGENT"