DEV Community

Binh Nguyen
Binh Nguyen

Posted on

Snyk Container: GitLab Container Registry easy integration

Prerequisites

  1. Snyk account: Organization's Administrator.
  2. GitLab project personal access token.
    • It is recommended to use access token instead of password.
    • If you enabled MFA, the personal access token is a MUST.

Integration

Create a Personal Access Token

Please ensure that your token meets the following requirements:

  1. role: at least Developer
  2. scopes:
    • read_api
    • read_registry

Configure Integration

  1. At the left navigation bar, go to Settings.
  2. Under Organization Settings, go to Integrations.
  3. Find GitLab Container Registry, under Container Registries section.
  4. From the Account credentials box, we have to input:
    1. Username: <your-gitlab-username>
    2. Password: <your-gitlab-access-token>
    3. Container registry name: registry.gitlab.com
  5. Then click the save changes button.

gitlab-container-registry-integration

Add project for scanning

  1. At the left navigation bar, go to Projects.
  2. Click the Add projects button.
  3. From the Image Name box, we input our project URL as follows:
<namespace>/<project>/<image>
Enter fullscreen mode Exit fullscreen mode

References

Top comments (0)