Carbon Black Harbor Adapter is a scanner to scan images in Harbor Registry with the help of Carbon Black Cloud.

carbon-black-adapter-for-harbor

Overview

Carbon Black adapter for Harbor integrates your Harbor Registry with the Carbon Black Cloud. It leverages Harbor's official Pluggable Scanner API Spec. to enable Harbor to scan images present in its registry and provide vulnerability reports for those images - right in the Harbor UI.

Configuration

All configuration values for the Harbor Adapter can be set using the following environment variables at startup:

Name Default Description
CB_API_ID Carbon Black API ID
CB_ORG_KEY Carbon Black ORG KEY
CB_URL Carbon Black URL
CB_API_KEY Carbon Black API KEY
LOG_LEVEL info Adapter service log level

Installation

Requirements

  • Kubernetes >= 1.14
  • Harbor >= 1.10
  • Helm >= 3
  • Carbon Black Credentials - CB_API_ID, CB_ORG_KEY, CB_URL, CB_API_KEY

Obtaining CB credentials

  • Log in to the Carbon Black cloud.

  • On the left side bar navigate to Inventory -> Kubernetes -> K8s Clusters

  • Switch to CLI config and click on Add cli on the right top.

  • Provide CLI name, Default build step, CLI description and generate credentials.

  • Now you can get the following environment values from the generated credentials.

    CB_API_ID - cb_api_id, CB_ORG_KEY - org_key, CB_URL - saas_url, CB_API_KEY - cb_api_key

Obtaining Credentials

Try it out

Helm install

The easiest was to deploy Harbor Adapter is through the helm install command and make sure you provide all the necessary arguments as mentioned below:

,cb_image_scanning.org_key= ,cb_image_scanning.api_key= ,cb_image_scanning.url= cb-harbor-adapter/harbor-adapter NAME: carbon-black LAST DEPLOYED: Thu Apr 15 02:40:37 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None ">
$ helm repo add cb-harbor-adapter https://projects.registry.vmware.com/chartrepo/cb_harbor_adapter
"cb-harbor-adapter" has been added to your repositories

$ helm install carbon-black --set cb_image_scanning.api_id=,
      
       ,cb_image_scanning.org_key=
       
        ,cb_image_scanning.api_key=
        
         ,cb_image_scanning.url=
         
            cb-harbor-adapter/harbor-adapter
NAME: carbon-black
LAST DEPLOYED: Thu Apr 15 02:40:37 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

         
        
       
      

You can also provide the configuration through values file and make sure you provide configuration values for the following parameters in values.yaml file:

  • cb_image_scanning.api_id
  • cb_image_scanning.org_key
  • cb_image_scanning.api_key
  • cb_image_scanning.url
$ helm repo add cb-harbor-adapter https://projects.registry.vmware.com/chartrepo/cb_harbor_adapter
"cb-harbor-adapter" has been added to your repositories

$ helm install carbon-black -f values.yaml cb-harbor-adapter/harbor-adapter

Here is the sample values.yaml file

kubectl apply

  1. Add the base 64 encoded values for api_id, org_key, org_key, org_key into ./k8s/cb-harbor-adapter.yaml file
  2. Run the following command:
kubectl apply -f ./k8s/cb-harbor-adapter.yaml

Set up Harbor Adapter in Harbor Registry

  1. Log in to your Harbor registry
  2. Navigate to Administration -> Interrogation Services on the left panel.
  3. Click on new scanner
  4. Provide the following -

Here is how you get the service name

$ kubectl get service
NAME                                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
carbon-black-harbor-adapter            ClusterIP   10.97.54.107     
   
            8080/TCP            8h

   
* check on `Use internal registry address`

Obtaining Credentials

  1. After adding set the scanner as default.
  2. Now the Adapter is ready for scanning.

Contributing

Please follow CONTRIBUTING.md

License

Apache-2.0

Similar Resources

Scan and analyze OSS dependencies and licenses from compiled Go binaries

Scan and analyze OSS dependencies and licenses from compiled Go binaries

golicense - Go Binary OSS License Scanner golicense is a tool that scans compiled Go binaries and can output all the dependencies, their versions, and

Nov 6, 2022

Take a list of domains and scan for endpoints, secrets, api keys, file extensions, tokens and more...

Take a list of domains and scan for endpoints, secrets, api keys, file extensions, tokens and more...

Take a list of domains and scan for endpoints, secrets, api keys, file extensions, tokens and more... Coded with 💙 by edoardottt. Share on Twitter! P

Dec 25, 2022

WIP. Converts Azure Container Scan Action output to SARIF, for an easier integration with GitHub Code Scanning

container-scan-to-sarif container-scan-to-sarif converts Azure Container Scan Action output to Static Analysis Results Interchange Format (SARIF), for

Jan 25, 2022

Go network scan tool.

gns Go network scan tool. Version: v0.6.0 Usage: gns [Options] IP or domain eg: gns -r 22-8080 -s 300 localhost Options: -a All ports, 1-6553

Dec 9, 2021

Fast scan for redtools

Fast scan for redtools

scaninfo by 华东360安服团队 注意的点 漏洞扫描的时候有时候最后几个任务会卡住,是因为ftp爆破模块,这个fscan也一样目前没有好的解决办法,后续更新.先阶段可以-eq 21跳过ftp,或者control+c 主动停止不影响结果保存。 有时候扫外网的全端口会漏掉端口可以使用-n 指定

Dec 27, 2022

Use golang.org/x/vuln to scan your dependencies

vulnz - Use golang.org/x/vuln to scan your dependencies vulnz uses golang.org/x/vuln to scan the dependencies in your go.mod. Install go install githu

Oct 10, 2022

Git watchdog will scan your public repository and find out the vulnerabilities

Dependencies Docker Go 1.17 MySQL 8.0.25 Bootstrap Run chmod +x start.sh if start.sh script does not have privileged to run Run ./start.sh --bootstrap

Dec 30, 2021

Scan all AWS EC2 instances in a region for potentially vulnerable log4j versions

ec2-log4j-scan Scan all AWS EC2 instances in a region for potentially vulnerable log4j versions. This is a clumsy but effective tool which takes outpu

Dec 28, 2021
Scan systems and docker images for potential spring4shell vulnerabilities.
Scan systems and docker images for potential spring4shell vulnerabilities.

Scan systems and docker images for potential spring4shell vulnerabilities. Will detect in-depth (layered archives jar/zip/tar/war and scans for vulnerable Spring4shell versions. Binaries for Windows, Linux and OsX, but can be build on each platform supported by supported Golang.

Nov 9, 2022
Integrate Snyk into Harbor

Harbor Snyk Scanner Harbor Snyk Scanner is a scanner adaptor for Harbor to integrate scan results from Snyk. The project is currently work in progress

Sep 6, 2022
Gbu-scanner - Go Blog Updates (Scanner service)

Go Blog Updates - Scanner This service scans go blog (go.dev) and publishes new posts to message broker (rabbitmq). It uses mongodb as a storage for a

Jan 10, 2022
GONET-Scanner - Golang network scanner with arp discovery and own parser
GONET-Scanner - Golang network scanner with arp discovery and own parser

GO/NET Scanner ScreenShots Install chmod +x install.sh ./install.sh [as root] U

Dec 11, 2022
A vulnerability scanner for container images and filesystems
A vulnerability scanner for container images and filesystems

A vulnerability scanner for container images and filesystems

Jan 1, 2023
A vulnerability scanner for container images and filesystems
A vulnerability scanner for container images and filesystems

A vulnerability scanner for container images and filesystems. Easily install the

Dec 24, 2021
Windows 11 TPM 2.0 and Secure Boot Setup.exe/Registry bypass written in Go.

Win11-Patcher Windows 11 TPM 2.0 and Secure Boot Setup.exe bypass written in Go. Compiling Requires Go (no shit) Requires a version of 7zip that you c

Dec 19, 2022
Automatically load up your Protobuff generated Golang types into the Protobuff registry

Automatically load up your Protobuff generated Golang types into the Protobuff registry (from the generated code), so that you can lookup by name of Protobuff message type.

Apr 20, 2022
A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).
A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).

proxylogscan This tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and imperson

Dec 26, 2022
A fast tool to scan CRLF vulnerability written in Go
A fast tool to scan CRLF vulnerability written in Go

CRLFuzz A fast tool to scan CRLF vulnerability written in Go Resources Installation from Binary from Source from GitHub Usage Basic Usage Flags Target

Jan 1, 2023