Skip to main content

Scanner Appliance


This appliance can be deployed locally and used for scanning git repositories. Multiple appliances can be deployed simultaneously.

When to use a Scanner Appliance?

  • Scan git repositories which are not accessible from the internet, you can deploy the appliance on a local adjacent network that does have access. The appliance will then scan this git repository and update the instance with the list of projects and their dependencies.
  • Run resolution for dynamic package managers that don't have a lockfile (like maven or pip).
  • Keep your code in the bounds of your network. Cloning and scanning operations will be done on your infrastructure.
image when to use scanner appliance

System Requirements

Hardware

Hardware requirements are determined by the amount of operations and the size of git repositories being scanned.

ComponentMinimumRecommended
CPU24
RAM8GB32GB
Storage50GB200GB

Software

Operation SystemSoftware
Linux x64 (Ubuntu/Debian, CentOS/RHEL)Docker 20.10.x or later (Engine & Client)

Network Access

DomainProtocol (Port)Description
INSTANCE_ID.illustria.ioHTTPS (TCP/443)Scanner communication

Forward Proxy Support

image proxy support

Supported protocols

HTTP, SOCKS4, SOCKS5.

SSL Termination

If the forward proxy terminates SSL requests, you can supply a PEM Certificates Bundle to the appliance.

Deployment

tip

To get the full list of appliance supported parameters, run the following command:

docker run -it ghcr.io/illustrialtd/cnside-appliance/scanner:develop -h
warning

The container needs to have access to the docker socket on the host. This is necessary requirement for the dynamic resolution of manifest files. You can always deploy the container with dynamic resolution disabled, removing the need for the docker socket.

There are two option to deploy the appliance

Deployment with a registration token will register and connect the appliance to the instance. This is a good option when you want to deploy a new appliance.


Required ParameterDescription
INSTANCE_URLThe URL for the instance in the following format: https://INSATNCE_ID.illustria.io
DEPLOYMENT_TOKENThe registration token to be used by the appliance. Can be acquired from the Management UI > Appliances > Scanner Appliances

Run the following command:

docker run -d --name illustria-scanner-appliance -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/illustrialtd/cnside-appliance/scanner:develop --paneld-url INSTANCE_URL --register-token DEPLOYMENT_TOKEN

Network Communication HLD

In general the appliance does the following:

  1. Register with the instance.
  2. Subscribe to events.
  3. Invoke a procedure on received event.

This is the communication High Level Design for the scanner appliance:

image appliance network calls HLD

Maven - Settings.xml

To pass custom repository configuration, after running the appliance, navigate to the maven cache volume and add settings.xml file in the root of the folder.

If the volume is managed by docker, run the following command:

docker volume inspect illustria-dr-maven-cache

In the output you should see a Mountpoint:

[
{
"CreatedAt": "2024-06-24T15:49:44+03:00",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/illustria-dr-maven-cache/_data",
"Name": "illustria-dr-maven-cache",
"Options": null,
"Scope": "local"
}
]

Navigate to this mount point with sudo / root / admin and add the setting.xml file.

Dynamic resolution DNS records

If the running container can't resolve DNS records, you will need to define DNS resolution for the docker daemon (https://docs.docker.com/config/daemon/).

  1. Create the config file if it doesn't exist:
sudo touch /etc/docker/daemon.json
  1. Add the DNS configuration in the settings file (replace the records with your own):
{
"dns": ["8.8.8.8", "8.8.4.4"]
}
  1. Restart docker daemon:
sudo systemctl restart docker

Dynamic resolution DNS static records

Every host entry that has been passed to the scanner appliance will be used by the child containers when executing dynamic resolution.

To pass static host entries (https://docs.docker.com/reference/cli/docker/container/run/):

docker run ... --add-host={fqdn}:{ip_addr} --add-host=acme.local:192.168.0.2