Skip to Content
Hashsecured v1.0 is released 🎉
CI/CDGitlab Template Setup

GitLab CI/CD: Setup

To use Hashsecured with GitLab, you first need to add your credentials as CI/CD variables. This ensures your tokens are stored securely and are not exposed in your pipeline files.

Prerequisites

  • A Hashsecured account and a created project.
  • Your User ID, Project ID, and API Token from the Hashsecured dashboard.

Storing Credentials as CI/CD Variables

For each GitLab project where you want to run Hashsecured scans, you must add the following variables:

  1. Navigate to your GitLab project and go to Settings > CI/CD > Variables.
  2. Click Add variable.
  3. Create a variable named HASHSECURED_API_TOKEN and paste your API Token as the value.
  4. (Optional) If you plan to scan private GitLab repositories, you also need a GitLab Personal Access Token (PAT) with the api and read_repository scopes. Create a variable named PAT_TOKEN with your PAT as the value.

Tip: Use “Masked” and “Protected” options for sensitive tokens to prevent accidental exposure.