registry-scanner
by CrowdStrike
CrowdStrike Self-hosted Registry Assessment
About this chart
CrowdStrike Self-hosted Registry Assessment (SHRA) Helm Chart
Falcon is the CrowdStrike platform purpose-built to stop breaches via a unified set of cloud-delivered technologies.
This Helm Chart helps you deploy CrowdStrike's self-hosted registry scanner to create inventories of the container images in your registries. The software sends the inventories up to the CrowdStrike cloud where they are analyzed for vulnerabilities and reported in your Falcon console. With this scanner, your images stay in your environment. This approach is an alternative to CrowdStrike's cloud-based Cloud Workload Protection registry assessment options, where images are copied into the CrowdStrike registry to create the image inventories.
Choosing to use the self-hosted approach vs CrowdStrike's cloud-based Cloud Workload Protection solution has a cost implication. For example, running these services in your environment requires additional storage and computing time. These costs may or may not be offset by the savings for data egress costs incurred with the cloud-based Cloud Workload Protection solution.
Table of Contents
- Supported registries
- How it works
- Kubernetes cluster compatibility
- Requirements
- Create a basic config file
- Customize your deployment
- Configure your CrowdStrike credentials
- Configure SHRA image download
- Configure which registries to scan
- Configure persistent data storage
- Configure temporary storage
- Allow traffic to CrowdStrike servers
- Optional. Configure CrowdStrike allow list
- Optional. Configure gRPC over TLS
- Optional. Configure HTPP Proxy
- Forward SHRA Container Logs to Logscale
- Install the SHRA Helm Chart
- Update SHRA
- Uninstall SHRA
- Falcon Chart configuration options
Supported registries
- Amazon Elastic Container Registry (AWS ECR)
- Docker Hub
- Docker Registry V2
- GitLab
- Google Artifact Registry (GAR)
- Google Container Registry (GCR)
- Harbor
- IBM Cloud
- JFrog Artifactory
- Mirantis Secure Registry (MSR)
- Oracle Container Registry
- Red Hat Quay.io
- Sonatype Nexus
How it works
The following architecture diagram gives you insight into how SHRA works.
-
Following our configuration instructions, you:
- Create a
values_override.yamlfile specific to your environment. - Add CrowdStrike's SHRA Helm Chart to your Helm repo or download the Chart from this GitHub repo.
- Download the SHRA container image files from CrowdStrike's registry and, best practice, save to your own registry.
- Create a
-
You run the Helm install command to deploy the Chart. As the Helm is deployed:
- Your configured registry connections are validated.
- A jobs database is initialized in persistent storage.
- A registry assessment cache is initialized in persistent storage.
- A Jobs Controller Pod spins up.
- One or more Executor Pods spin up.
-
Per your configured schedule, the Jobs Controller tells the Executor(s) which registries to scan. If multiple registries are configured within your installation, the jobs are worked in a round robin approach to balance between the registries.
-
The Executor(s) perform the following three tasks:
Registry scan: identifies the repositories within your configured registriesRepository scan: identifies image tags within the repositoriesTag assessment: downloads and uncompresses images that haven’t previously been scanned, creates a full inventory of what is in each image, then sends that inventory to CrowdStrike's cloud for analysis.
To streamline work,
Tag assessmentuses a local registry assessment database to keep track of image tags previously scanned. If an image tag is not found in the local database, it asks the CrowdStrike cloud if the image is new. Only images that have not been inventoried before are unpacked and inventoried. -
The CrowdStrike cloud assesses the image inventories.
-
Image assessment results are visible to you via the Falcon console. Go to Cloud security > Vulnerabilities > Image assessments, then click the Images tab. Images scanned by SHRA have Self-hosted registry in the optional Sources column.
Three volume mounts are needed for SHRA:
- A 1+ GiB persistent volume for a job controller sqlite database.
- A 1+ GiB persistent volume used by the executor(s) for a registry assessment cache.
- A working volume to store and expand images for assessment.
Note: Performance of the Registry scan and Repository scan jobs are networking bound, for the most part.
By contrast, the Tag assessment job is mainly constrained by the amount of available disk space to unpack the images and perform the inventory.
Ensure you provide sufficient disk space. For more information, see Configure temporary storage.
Kubernetes cluster compatibility
The Falcon Self-hosted Registry Scanner Helm Chart has been tested to deploy on the following Kubernetes distributions:
- Amazon Elastic Kubernetes Service (EKS) - EKS and EKS Fargate
- Azure Kubernetes Service (AKS)
- Google Kubernetes Engine (GKE)
- SUSE Rancher K3s
- Red Hat OpenShift Kubernetes
Requirements
- Access to the Falcon console with one or more of these default roles:
- Falcon Administrator
- Cloud Security Manager
- Kubernetes and Containers Manager
- A client API key, as described in the configuration steps.
- A x86_64 (AMD64) Kubernetes cluster.
- Helm 3.x is installed and supported by the Kubernetes provider.
- 2 Persistent Volume claims
- 1 Volume (persistent or emptyDir) of sufficient size for unpacking and assessing images
- Networking sufficient to communicate with CrowdStrike cloud services and your image registries.
- Optional. Cert Manager - Helm if you wish to use TLS between the containers in this Chart. See TLS Configuration.
Note: For more information on SHRA's supported persistent volume storage schemes, see Configure persistent data storage.
Create a basic config file
Before you install this Helm Chart, there are several config values to customize for your specific use case.
To start, copy the following code block into a new file called values_override.yaml.
Follow the steps in Customize your deployment to configure these values.
Tip: If you have experience deploying other CrowdStrike Helm Charts, you can refer to Falcon Chart configuration options for details on how to customize the fields in this minimal installation example.
crowdstrikeConfig:
clientID: ""
clientSecret: ""
executor:
image:
registry: ""
repository: ""
tag: ""
dbStorage:
storageClass: ""
assessmentStorage:
type: "PVC"
pvc:
storageClass: ""
jobController:
image:
registry: ""
repository: ""
tag: ""
dbStorage:
storageClass: ""
registryConfigs:
- type: dockerhub
credentials:
username: ""
password: ""
port: "443"
host: "https://registry-1.docker.io"
cronSchedule: "* * * * *"
- type: dockerhub
credentials:
username: ""
password: ""
port: "443"
host: "https://registry-2.docker.io"
cronSchedule: "0 0 * * *"
Continue to tailor this file for your environment by following the remaining steps in this guide.
Customize your deployment
Configure your deployment of the Self-hosted Registry Assessment tool by editing values in your values_override.yaml files.
The most commonly used parameters are described in the steps below.
For other options, refer to the full set of configurations options and the comments in provided values.yaml.
Configure your CrowdStrike credentials
To download and operate CrowdStrike's self-hosted registry assessment tool, you need a CrowdStrike API client ID and secret with the required API scopes.
Create your client ID and secret:
- In the Falcon console, go to Support and resources > Resources and tools > API clients and keys.
- Click Add new API client.
- In the Add new API client dialog, enter a client name and description that identify this key is for self-hosted registry assessment.
- Set the following API scopes
- Falcon Container CLI: Write
- Falcon Container Image: Read/Write
- Falcon Images Download: Read
- Sensor Download: Read
- Click Add.
- From the API client created dialog, copy the client ID and secret to a password management or secret management service.
Note: The API client secret will not be presented again, so don't close the dialog until you have this value safely saved.
Export these variables for use in later steps:
export FALCON_CLIENT_ID=<your-falcon-api-client-id>
export FALCON_CLIENT_SECRET=<your-falcon-api-client-secret>
Next, get your Customer ID (CID):
- In the Falcon console, go to Host setup and management > Deploy > Sensor downloads.
- Copy your Customer ID (CID) from the How to Install section and save it as the variable FALCON_CID.
export FALCON_CID=0123456789ABCDEFGHIJKLMNOPQRSTUV-WX
Configure the following two parameters in your values_override.yaml file.
| Parameter | Description | Default | |
|---|---|---|---|
crowdstrikeConfig.clientID | required | The client id used to authenticate the self-hosted registry assessment service with CrowdStrike. | "" |
crowdstrikeConfig.clientSecret | required | The client secret used to authenticate the self-hosted registry assessment service with CrowdStrike. | "" |
Configure SHRA image versions and download registry
Our self-hosted registry assessment tool is composed of two OCI images:
job-controllerexecutor
You specify what versions of job-controller and executor that you want to install.
During installation, the SHRA Helm Chart downloads those images from your specified image registry and deploys with your custom configurations.
Login to our registry
To download the SHRA images, you need the FALCON_CLIENT_ID, FALCON_CLIENT_SECRET, and FALCON_CID environment variables you exported in earlier steps.
If you're in a new terminal window or if running the commands above causes authentication errors, repeat the variable exports described in Configure your CrowdStrike credentials.
Run the following commands to get perform an OAuth handshake and log in to our Docker registry:
ENCODED_CREDENTIALS=$(echo -n "$FALCON_CLIENT_ID:$FALCON_CLIENT_SECRET" | base64)
TOKEN_URL="https://api.crowdstrike.com/oauth2/token"
ACCESS_TOKEN=$(curl -X POST "$TOKEN_URL" \
-H "Authorization: Basic $ENCODED_CREDENTIALS" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" | jq -r '.access_token')
DOCKER_LOGIN_PASSWORD=$(curl -X 'GET' 'https://api.crowdstrike.com/container-security/entities/image-registry-credentials/v1' -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" | jq -r '.resources[0].token')
echo $DOCKER_LOGIN_PASSWORD | docker login -u fc-${FALCON_CID} registry.crowdstrike.com/falcon-selfhostedregistryassessment --password-stdin
List available images
To see the available SHRA images, use a tool like skopeo to request a list of available tags.
skopeo list-tags --creds fc-$FALCON_CID:$DOCKER_LOGIN_PASSWORD docker://registry.crowdstrike.com/falcon-selfhostedregistryassessment/release/falcon-jobcontroller
skopeo list-tags --creds fc-$FALCON_CID:$DOCKER_LOGIN_PASSWORD docker://registry.crowdstrike.com/falcon-selfhostedregistryassessment/release/falcon-registryassessmentexecutor
You can expect output fr
Deploy registry-scanner with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has registry-scanner on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartregistry-scanner is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply