Documentation ¶
Overview ¶
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 ¶
- func FetchGithubArchive(repo string) (string, string, error)
- func GitClone(repo string) (string, error)
- func RunContainerizedCLI(configPath string)
- type BlackduckConfig
- type CodeLocation
- type Config
- type ContainerizedCLI
- type DockerImage
- type FileSystem
- type GitRepo
- type ImageFacadeConfig
- type ImageSpec
- type PolarisConfig
- type PolarisScanConfig
- type ScanConfig
- type ScanQueueConfig
- type ScanTypeConfig
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchGithubArchive ¶
FetchGithubArchive returns tempDir, unzippedDir, error the caller is responsible for removing tempDir
func RunContainerizedCLI ¶
func RunContainerizedCLI(configPath string)
Types ¶
type BlackduckConfig ¶
type CodeLocation ¶
type CodeLocation struct { GitRepo *GitRepo FileSystem *FileSystem DockerImage *DockerImage None bool }
type Config ¶
type Config struct { Blackduck *BlackduckConfig ImageFacade *ImageFacadeConfig ScanQueue *ScanQueueConfig //Scanner *ScannerConfig // TODO do we need this for anything? Polaris *PolarisConfig LogLevel string Port int }
type ContainerizedCLI ¶
type ContainerizedCLI struct {
// contains filtered or unexported fields
}
func NewContainerizedCLI ¶
func NewContainerizedCLI(scanner *Scanner, client *scanqueue.Client, stop <-chan struct{}) *ContainerizedCLI
type DockerImage ¶
type DockerImage struct {
PullSpec string
}
type FileSystem ¶
type FileSystem struct {
Path string
}
type ImageFacadeConfig ¶
type ImageFacadeConfig struct { ImageDirectory string ImagePullerType string PrivateDockerRegistries []docker.RegistryAuth DeleteImageAfterScan bool }
type ImageSpec ¶
type ImageSpec struct { Repository string Tag string Sha string HubURL string HubProjectName string HubProjectVersionName string HubScanName string Priority int ScanType string }
ImageSpec .....
type PolarisConfig ¶
type PolarisScanConfig ¶
type PolarisScanConfig struct {
UseLocalAnalysis bool
}
type ScanConfig ¶
type ScanConfig struct { Key string ScanType *ScanTypeConfig CodeLocation *CodeLocation }
type ScanQueueConfig ¶
type ScanTypeConfig ¶
type ScanTypeConfig struct { Polaris *PolarisScanConfig Blackduck *hubcli.ScanConfig }
type Scanner ¶
type Scanner struct { Polaris polaris.ScannerInterface Blackduck hubcli.ScanClientInterface ImagePuller docker.ImagePullerInterface }
func NewScanner ¶
func NewScanner(polaris polaris.ScannerInterface, blackduck hubcli.ScanClientInterface, imagePuller docker.ImagePullerInterface) *Scanner
func NewScannerFromConfig ¶
func NewScannerFromConfig(blackduckCfg *BlackduckConfig, polarisCfg *PolarisConfig, imagePuller *ImageFacadeConfig) (*Scanner, error)
func (*Scanner) Scan ¶
func (sc *Scanner) Scan(scanConfig *ScanConfig) error