Installing the sensor on MacOS

If you are running the sensor on MacOS Catalina version 10.15 or above, please use sensor version 1.8.0 or above.

You can install the Qualys Container Sensor on MacOS.

  1. Download the QualysContainerSensor.tar.xz file using the Download Container Sensor button on the Home page or from the Configurations > Sensors tab on Qualys Cloud Platform.
  2. Copy the file to the target MAC host.
  3. Perform the following actions in sequence.
    1. Extract the Sensor tar file:
      sudo tar -xvf QualysContainerSensor.tar.xz
    2. Create a storage directory (/tmp/qualys/sensor/data) where the sensor data like configuration, manifest, logs, and setup is stored:
      sudo mkdir -p /tmp/qualys/sensor/data

      (Optional) Apart from "tmp" folder, you can save the data either in "/Users" or "/Volumes" or "/private" folder by providing a custom storage location.
    3. Provide the required permissions to the directory to run the installer script:
      sudo chmod -R 777 /tmp/qualys/sensor/data
        

Providing a Custom Storage Location

To choose a storage location from (/Users or /Volumes or /private),

  1. On your MAC host, go to DockerPreferences > File Sharing,
  2. Add the custom path.
    For example,  /usr/local/qualys/sensor/data, and click Apply & Restart.

    You can set the storage location apart from the /Users, /Volumes, /private, or /tmp directories, by first enabling the file sharing. To avoid this step, we recommend using Storage=/tmp/qualys/sensor/data and HostIdSearchDir=/private/etc/qualys during the installation of the CS Sensor. By doing so, you can leverage the existing shared location with Docker, without the need of additional configuration to launch the CS Sensor.
  3. For a custom location, provide permissions to the directory to run the installer script.
    For example, 
    sudo chmod -R 777 /usr/local/qualys/sensor/data
  4. Make sure CS Sensor has permissions to write to hostid file in /private/etc/qualys/ directory.
    To provide the sufficient permissions, execute: 
    sudo mkdir /private/etc/qualys/ - 
    sudo chmod 777 /private/etc/qualys

 

The following commands install the Container Security sensor.

The CS sensor installation command includes the Activation ID and your Customer ID, both generated based on your subscription.
The Storage parameter specifies where to install the sensor.

Ensure that the installation command consists of HostIdSearchDir parameter, otherwise the installer script will throw an error.

  • Use the following command to install a General Sensor:
    sudo ./installsensor.sh ActivationId=d5814d5f-5fd2-44ec-8969-e03cc58a4ef5 CustomerId=6f35826e-4430-d75e-8356-c444a0abbb31 HostIdSearchDir=/private/etc/qualys Storage=/tmp/qualys/sensor/data -s 
  • Use the following command to install a Registry Sensor:
    sudo ./installsensor.sh ActivationId=d5814d5f-5fd2-44ec-8969-e03cc58a4ef5 CustomerId=6f35826e-4430-d75e-8356-c444a0abbb31 HostIdSearchDir=/private/etc/qualys Storage=/tmp/qualys/sensor/data -s --registry-sensor 
  • Use the following command to install a CI/CD Sensor:
    sudo ./installsensor.sh ActivationId=d5814d5f-5fd2-44ec-8969-e03cc58a4ef5 CustomerId=6f35826e-4430-d75e-8356-c444a0abbb31 HostIdSearchDir=/private/etc/qualys Storage=/tmp/qualys/sensor/data -s --cicd-deployed-sensor 
  • If you want to install the Sensor without persistent storage, exclude the “Storage” option, and include the “--sensor-without-persistent-storage” option in the installer script. It is recommended to use the “--enable-console-logs” option along with “--sensor-without-persistent-storage” to preserve the logs as data is not available on the host but stored at the /usr/local/qualys/qpa/data folder relative to the Sensor.
  • Secret Detection and Malware Detection are not supported on MacOS.

 

To know about InstallSensor shell script parameters, refer to Installsensor Shell Script Command Line Parameters.