Skip to main content

Install an agent

Contrast uses agents to install sensors that monitor your code for vulnerabilities. Agents analyze for vulnerabilities in development environments and look for attacks in runtime production environments.

As your application runs, the agent analyzes information (such as HTTP requests, data flow, backend connections, and library dependencies) and sends vulnerabilities and attacks to Contrast, where you can view, prioritize, and take immediate action.

Instrumenting an app with Contrast can be divided into several phases. These guides should enable you to get Contrast up and running on your application in just a few minutes, allowing you to see how it works.

agent__install__1_1_1.png
agent__install__2_2_2.png
agent__install__3_3_3.png
agent__install__4_4_4.png

Select the installation method from the options below. Select the operating system and the deployment method.

Configure the agent to authenticate to your Contrast instance. The generated Agent Key will contain an embedded, encoded API key.

Make other configuration changes, like adding environment variables, if needed. These are recommended configurations for an optimal Contrast experience.

Use your application as you usually would. Select Applications in Contrast. You should see the name of your application.

Installation varies depending on the agent, the Contrast product(s) you are using, and where you want to install Contrast. For example, this could be:

  • On an application server or web server

  • In a build pipeline or container

  • In a Develop, QA, or Production environment

Once you see how it works, you can modify it in various ways to suit your needs. You can explore Contrast Documentation for further information about how to adapt Contrast to your situation.

Tip

For future installations, consider your organization's build tools and deployment pipeline, your security goals and the environments where you want to use Contrast. You can read about other methods to install Contrast that may better adapt to your situation.

Java

The easiest way to deploy Java agents is to use the Agent wizard in the Contrast web interface.

Install for executable JAR

Install on an app server

Install with build automation tool integrations

Install in a container

Install with build pipelines

Install the agent in one application with a JAR file.

Install the agent on an app server to provide security analysis for applications running in a test/QA or production environment.

Install the agent with Contrast plugins to automate the installation.

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods related to the installation and deployment of Java agents, visit Java advanced installation.

You can also use the Contrast Java agent with Contrast Assess or Contrast SCA to analyze Scala-based applications or to analyze Kotlin-based applications.

.NET Framework

The easiest way to deploy .NET Framework agents is to use the Agent wizard in the Contrast web interface.

Install with an installer

Install with Azure

Install in a container

Install with build pipelines

Install with an agent installer for self-hosted applications or applications in IIS.

Install the agent with Azure App Service.

Install the agent in a container image.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods related to the installation and deployment of .NET Framework agents, visit .NET Framework advanced installation.

.NET Core

The easiest way to deploy .NET Core agents is to use the Agent wizard in the Contrast web interface.

Basic installation

Install with an installer

Install with Azure

Install in a container

Install with build pipelines

Install the .NET Core agent with the basic install.

Install with an agent installer for self-hosted applications or applications in IIS.

Install the agent with the Azure App Service.

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods, including Linux, related to the installation and deployment of .NET Core agents, visit .NET Core advanced installation.

Node.js

The easiest way to deploy Node.js agents is to use the Agent wizard in the Contrast web interface.

Basic installation

Install in a container

Install with build pipelines

Install with Cloud deployment integrations

Install the Node agent with the basic install.

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

Install with IBM Cloud or VMware Tanzu .

If you want additional information or advanced methods related to the installation and deployment of Node.js agents, visit Node.js advanced installation.

PHP

The easiest way to deploy PHP agents is to use the Agent wizard in the Contrast web interface.

Install by repository

Install in a container

Install with build pipelines

Install the agent by repository (manually).

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods related to the installation and deployment of PHP agents, visit PHP advanced installation.

Python

The easiest way to deploy Python agents is to use the Agent wizard in the Contrast web interface.

Install manually

Install in a container

Install with build pipelines

Install the agent manually with the pip command.

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods related to the installation and deployment of Python agents, visit Python advanced installation.

Ruby

Important

The Ruby Agent is not currently being sold to new customers. Please contact our Sales team if you have any questions about our offerings and support for the Ruby language.

The easiest way to deploy the Ruby agent is to use the Agent wizard in the Contrast web interface.

Install manually

Install the agent with middleware.

If you want additional information or advanced methods related to the installation and deployment of Ruby agents, visit Ruby advanced installation.

Go

The easiest way to deploy the Go agent is to use the Agent wizard in the Contrast web interface.

Install with an installer

Install in a container

Install with build pipelines

Install with an agent installer.

Install the agent in a container image or with a Kubernetes operator.

Install the agent using GitHub or Bitbucket.

If you want additional information or advanced methods related to the installation and deployment of Go agents, visit Go advanced installation.