Onprem runner configuration

PREREQUISITES
Ensure Docker is installed in your VM.
For detailed instructions on setup, please refer to the Docker documentation (opens in a new tab)

Setting Environment Variables:

To configure the FD_API_KEY, follow these steps:

Method 1: Temporary Environment Variable

For a session-based environment variable, run the following command

export FD_API_KEY=value
💡

Note: This variable will only be active until the session ends.

Method 2: Persistent Environment Variable

To make the environment variable persist across sessions, add it to your .bashrc file.

  • Open the .bashrc file for editing like nano ~/.bashrc
  • Add the line at the end of the file like export FD_API_KEY=value
  • Save the file
  • To apply the changes, run this command source ~/.bashrc.

Download the DuckDefender script file:

wget https://awosasins-artifacts.s3.amazonaws.com/runners/duckdefender.sh

Once the environment variable is set, execute the DuckDefender script:

sh duckdefender.sh

After the script runs successfully, the DuckDefender agent Docker container should be running. To verify, use the following command:

docker ps

If the container is not running, check the stopped containers with:

docker ps -a

To view the agent logs, run the command:

docker logs container_id

To view the log file of a container, Docker typically stores logs in the following default location:

/var/lib/docker/containers/<container_id>/<container_id>-json.log

Each container has its own log file named after its container ID. This log file contains both the standard output (stdout) and standard error (stderr) of the container.

Initiating a Scan in FlyingDuck

  • Go to the FlyingDuck portal (opens in a new tab)
  • Use the search bar in the navigation bar to find the repository by name.
  • In the search results, select the Overview button to open the repository overview. Then, navigate to Actions and choose Scan Code to start the scan.

On-demand-scan

Select your required scan, mention the Branch name and click on submit.