Documentation
¶
Overview ¶
* © 2023 Snyk Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
Constants ¶
View Source
const ( // HTTPClientDefaultTimeout is the default value for the HTTPClientTimeout setting. HTTPClientDefaultTimeout = 5 * time.Second // SnykAPIDefaultBaseURL is the default endpoint that the scanner will talk to. SnykAPIDefaultBaseURL = "https://api.snyk.io" )
default values for config settings
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Scanning Scan `json:"scanning"` MetricsAddress string `json:"metricsAddress"` // MetricsNamespace defines the namespace that will be used for the prometheus metrics. MetricsNamespace string `json:"metricsNamespace"` ProbeAddress string `json:"probeAddress"` // OrganizationID is the snyk organization ID where data should be routed to. OrganizationID string `json:"organizationID"` // Egress contains configuration for everything that's related to sending data to Snyk's // backend. Egress *Egress `json:"egress"` // ClusterName should be the "friendly" name of the cluster where the scanner is running in. // For example, "prod-us" or "dev-eu." ClusterName string `json:"clusterName"` Scheme *runtime.Scheme `json:"-"` RestConfig *rest.Config `json:"-"` }
type Egress ¶
type Egress struct { // HTTPClientTimeout sets the timeout for the HTTP client that is being used for connections to // the Snyk backend. HTTPClientTimeout metav1.Duration `json:"httpClientTimeout"` // SnykAPIBaseURL defines the endpoint where the scanner will send data to. SnykAPIBaseURL string `json:"snykAPIBaseURL"` // SnykServiceAccountToken is the token of the Snyk Service Account. Is not read from the config // file, can only be set through the environment variable. SnykServiceAccountToken string `json:"-" env:"SNYK_SERVICE_ACCOUNT_TOKEN"` }
type GroupVersionKind ¶ added in v0.6.0
type GroupVersionKind struct { schema.GroupVersionKind PreferredVersion string }
type Scan ¶
type Scan struct { Types []ScanType `json:"types"` // RequeueAfter defines the duration after which an object is requeued when we've visited it. // Note that due to the event handlers, objects that are being changed will be requeued earlier // in such cases. RequeueAfter metav1.Duration `json:"requeueAfter"` }
type ScanType ¶
type ScanType struct { // TODO: The "*" group / resource specifier isn't implemented yet (and maybe never will). APIGroups []string `json:"apiGroups"` Resources []string `json:"resources"` // Versions is an optional field to specify which exact versions should be scanned. If unset, // the scanner will use the API Server's preferred version. Versions []string `json:"versions"` // Namespaces allows to restrict scanning to specific namespaces. An empty list means no // namespaces. Omit to scan resources in all namespaces. Does not affect the scanning of // cluster-scoped resources. Namespaces []string `json:"namespaces,omitempty"` }
Click to show internal directories.
Click to hide internal directories.