This page will guide you through the how to configure your GitLab Self-Managed instance to use Data Theorem’s SAST scanning without sharing your code with Data Theorem. It will create AWS resources to run a container-based SAST scanner provided by Data Theorem. The SAST scan results will be visible in the Data Theorem portal

Please reach out to support@datatheorem.com if you need help!

Installation

Requirements

Step 1: Generate a SAST Security Results API Key

Navigate to Data Theorem’s API key provisioning portal https://www.securetheorem.com/devsecops/v2/results_api_access

Make sure the API key has the “SAST Scanning” feature permission

Keep the window open or securely store the API Key, you will need to enter it in a later step.

sast-api-key.png

Step 2: Create A Data Theorem App In GitLab

Start with creating the GitLab application for the Data Theorem integration:

We will update the “Redirect URI” value to the the URI of our AWS Lambda handler in a later step. We use this value a secure placeholder, but OAuth redirects will not be sent to this URI.

Screenshot 2024-07-24 at 15.01.12.png

Screenshot 2024-07-24 at 15.02.09.png

Step 3: Create AWS Resources

Open the AWS CloudFormation Quick Create Link you received from Data Theorem, and sign in the AWS account where you want the SAST scanning resources to be created.

Create a new system hook with the following settings:

Paste the values for the GitLab App Id, Gitlab App Secret

Screenshot 2024-07-24 at 15.50.05.png

Step 4: Configuring The GitLab System Hook

The system hook will notify the GitLab integration of changes to any of the repositories present in the GitLab integration.

Configuration steps:

Screenshot 2024-07-24 at 15.15.20.png

Step 5: Update The GitLab App OAuth Redirect URI

Screenshot 2024-07-24 at 15.02.26.png