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, andAPI Tokenfrom 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:
- Navigate to your GitLab project and go to Settings > CI/CD > Variables.
- Click Add variable.
- Create a variable named
HASHSECURED_API_TOKENand paste your API Token as the value. - (Optional) If you plan to scan private GitLab repositories, you also need a GitLab Personal Access Token (PAT) with the
apiandread_repositoryscopes. Create a variable namedPAT_TOKENwith your PAT as the value.
Tip: Use “Masked” and “Protected” options for sensitive tokens to prevent accidental exposure.