Sending Build and Deployment Events to SSD

This page explains in detail on how to send build metadata, artifact details, and deployment information from an AWS CodeBuild / CodeDeploy pipeline to the SSD (Security, Safety & Delivery) Scanner using API calls. It includes:

  • Required AWS environment variables

  • Steps to add after pushing images to Artifactory/ECR

  • Correct Git URL formatting

  • SSD configuration (Teams, Integrators, Tokens)

Prerequisites

The AWS Pipeline must be able to:

  • Build the application

  • Push Docker images to Artifactory / ECR

circle-info

If the data needs to be mapped to a specific team, creating a team is required. Otherwise, this field is optional and can be left empty. Refer Managing Teams and Accessarrow-up-right.

The Bitbucket and ECR integrators needs to be integrated. Refer Integrating BitBucketarrow-up-right and Integrating ECRarrow-up-right on steps to complete the process.

Required AWS Environment Variables

The following environment variables are required in AWS CodeBuild:

Variable

Description

SSD_URL

Base URL of the SSD instance

SSD_TEAM_TOKEN

API token for team authentication

GIT_URL

Repository URL (format shown below)

GIT_BRANCH

Branch being built

DOCKER_IMAGE

Pushed Docker image name

DOCKER_TAG

Tag of the image

Mandatory Git URL Format

https://bitbucket.org/<ORGANISATION_NAME>/<REPO_NAME>.git

circle-info

If image name/tag variables are already configured in your environment, you can utilize those existing pipeline variables.

Pipeline Step: Sending Build Metadata to SSD

Add the following code immediately after pushing the image to Artifactory/ECR:

Login to ECR & Fetch Artifact SHA

To login to ECR and fetch the artifact SHA execue the below code:

Trigger SSD Data Collection (with Retry Logic)

To trigger SSD data collection, execute the following code:

To retrieve the necessary ORGANISATION_NAME information from the SSD Dashboard, follow these steps:

  1. Go to Setup.

  2. Navigate to Access Management.

circle-info

This information is required for ORGANISATION_NAME.

Firewall API (Policy Enforcement Before Deployment)

To access the firewall API execute the following code:

Field

Description

teamName

Must match the Team configured in SSD

appName

Application name displayed in SSD UI

account

Must match name in Clusters page

clusterName

Any user-defined cluster label

Generating a Team Token in SSD

  1. Click on the name of the Team (given as tabs in the Teams panel) for which you want to generate token as shown below:

  1. The details of the Team along with its User Roles are displayed.

  2. Click Generate Token button as shown below:

  1. A token is created and a success message is displayed as shown:

  1. Copy & store the token securely

Points to Remember

  • SSD_URL and SSD_TEAM_TOKEN must be defined in AWS CodeBuild environment variables

  • Pipeline IAM must allow:

    • ECR authentication

    • Docker manifest inspect

    • External API calls

  • After configurations:

    • Re-run the pipeline via AWS console or PR/Push event

    • Wait 5 minutes for SSD Dashboard to update the latest results

    • Ensure there are no errors in the AWS build logs

Last updated