Overview of Deepfactor #
Deepfactor Application Security is a new approach to AppSec that combines SBOM (Software Bill of Materials), SCA (Software Composition Analysis), and Runtime Security into a powerful integrated platform. AppSec and Engineering teams use Deepfactor to achieve one or more of the following objectives:
- SBOM: Generate SBOMs to secure your supply chain and comply with U.S. Executive order 14028
- SCA: Scan containers/dependencies for CVEs and gate builds and pull requests
- Runtime SCA: Burn down mountains of CVE debt quickly and intelligently by correlating SCA scan results with runtime analysis to prioritize CVEs that are used and remove packages that aren’t used.
- Runtime Analysis During Dev & Test: Identify unknown vulnerabilities in custom and 3rd party code, that cannot be identified by SAST & SCA tools, by analyzing running applications in dev & test environments.
- Runtime Security In Production: Detect insecure filesystem, network & memory behaviors in production environments, in order to meet SOC2 and other compliance requirements.
Quickstart Guide #
The following section will provide a quick start guide to scan and run your applications with Deepfactor.
Install Deepfactor CLI #
Run the following command on supported linux distributions to install dfctl.
curl https://repo.deepfactor.io/install-dfctl.sh | sh --
Export Deepfactor run token. You can get this from the Deepfactor UI by clicking on the Start button.
export DF_RUN_TOKEN=YOUR_DF_RUN_TOKEN
#
#
Scan container images for vulnerabilities #
Run the following command to scan your image with Deepfactor
dfctl scan IMAGE_PATH
where
IMAGE_PATH is the path of your image. You can find the list of languages and package manifest files Deepfactor scanner supports in the support matrix document.
Note: The above command assumes that you can pull the image onto the machine you are running this command from. If you would like to specify credentials for your private registry, please follow the steps mentioned in this article
#
Scan filesystem for vulnerabilities #
Run the following command to scan your image with Deepfactor
dfctl scan -s fs -a "APP_NAME" -c "COMPONENT_NAME" --version \ "VERSION" FILE_SYSTEM_DIRECTORY_PATH
where
APP_NAME is the name of your application. You can provide any name of your choice.
COMPONENT_NAME is the name of the component/microservice. You can provide any name of your choice.
VERSION is the version of the component you are scanning. For example, 1.0.1.
FILE_SYSTEM_DIRECTORY_PATH is the path of your directory which has the source code/package manifest files. You can find the list of languages and package manifest files Deepfactor scanner supports in the support matrix document.
#
Generate SBOM for your container images #
Run the following command to generate SBOM for your image with Deepfactor
dfctl scan -f cyclonedx,spdx -O OUTPUT_FILENAME IMAGE_PATH
where
OUTPUT_FILENAME is the name of the file in which you want the SBOM to be stored. You do not need to specify the extension. Deepfactor will automatically add the extension based on the format.
IMAGE_PATH is the path of your image. You can find the list of languages and package manifest files Deepfactor scanner supports in the support matrix document.
Note:
- The above command assumes that you can pull the image onto the machine you are running this command from. If you would like to specify credentials for your private registry, please follow the steps mentioned in this article
- The above command specifies cyclonedx and spdx formats. You can find the full list of formats/options in the CLI reference document
You can also generate SBOM for your filesystems by specifying the -f and -O options.
Analyze running containers for insecure behaviors #
Run the following command to analyze your running container instances for insecure behaviors with Deepfactor.
dfctl run -a "APP_NAME" -c "COMPONENT_NAME" --version \ "VERSION" -v --docker-run DOCKER_RUN_OPTIONS --image IMAGE
where
APP_NAME is the name of your application. You can provide any name of your choice.
COMPONENT_NAME is the name of the component/microservice. You can provide any name of your choice.
VERSION is the version of the component you are scanning. For example, 1.0.1.
DOCKER_RUN_OPTIONS is the options you would provide to your original docker run command
IMAGE is the path of the image which you want to run.
Your container will now along with Deepfactor interception library which will collect and send over to the Deepfactor portal. At the portal, telemetry will be analyzed for insecure behaviors in accordance to the alert policy. For the fill list of options refer to the CLI reference document.
Ex.
dfctl run -a "OWASP" -c "juice-shop" --version "1.1.1" \ -v --docker-run -p 5250:3000 --image bkimminich/juice-shop
#
#
Analyze non-containerized applications for insecure behaviors #
Run the following command to analyze a non-containerized application with Deepfactor
dfctl run -a "APP_NAME" -c "COMPONENT_NAME" --version \ "VERSION" -v --cmd COMMAND_WITH_ARGUMENTS
where
APP_NAME is the name of your application. You can provide any name of your choice.
COMPONENT_NAME is the name of the component/microservice. You can provide any name of your choice.
VERSION is the version of the component you are scanning. For example, 1.0.1.
COMMAND_WITH_ARGUMENTS is the full command along with arguments you use to launch your component. Please note this should be the last argument of dfctl run command. For example: /usr/bin/java -jar MyApp.jar
Your application will now along with Deepfactor interception library which will collect and send over to the Deepfactor portal. At the portal, telemetry will be analyzed for insecure behaviors in accordance to the alert policy. For the fill list of options refer to the CLI reference document.
#
Analyze Kubernetes workloads for insecure behaviors & scan images #
Deepfactor provides helm charts that install a mutating admission webhook and one or more scan pods in your K8s cluster. Deepfactor can automatically scan container images used by pods in your K8s cluster and also observe running containers for runtime security vulnerabilities. Deepfactor can also correlate the results of the two. Refer to the following document to install Deepfactor K8s webhook.
Install Deepfactor helm charts