Install Go agent with Debian
To install the Go agent:
Download both of the executable files from
https://pkg.contrastsecurity.com
. This command registers our package repository in your system:curl \ https://pkg.contrastsecurity.com/api/gpg/key/public | sudo apt-key add - echo "deb https://pkg.contrastsecurity.com/debian-public/ $(sed -rne 's/^VERSION_CODENAME=(.*)$/\1/p' /etc/*ease) contrast" \ | sudo tee /etc/apt/sources.list.d/contrast.list echo "deb https://pkg.contrastsecurity.com/debian-public/ all contrast" \ | sudo tee -a /etc/apt/sources.list.d/contrast.list
Once complete, use this command to install the agent and service:
sudo yum install contrast-go contrast-service
Be sure the application has a
go.mod
file to indicate required dependencies. In the application source directory run the following command:go mod init
Build your application:
contrast-go build -o output-name-of-application
Configure the Go agent using the Go YAML template or environment variables.
Install the Contrast service and run it using the command:
./contrast-service
.Run your application using the executable from the output above.
Exercise and test your application.
Verify that Contrast sees your application.