A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.gitlab.com/user/application_security/detect/security_configuration/ below:

Security configuration | GitLab Docs

You can configure security scanners for projects individually or create a scanner configuration shared by multiple projects. Configuring each project manually gives you maximum flexibility but becomes difficult to maintain at scale. For multiple projects or groups, shared scanner configuration provides easier management while still allowing some customization where needed.

For example, if you have 10 projects with the same security scanning configuration applied manually, a single change must be made 10 times. If instead you create a shared CI/CD configuration, the single change only needs to be made once.

Configure an individual project

To configure security scanning in an individual project, either:

With a CI/CD file

To manually enable security scanning of individual projects, either:

AutoDevOps provides a least-effort path to enabling most of the security scanners. However, customization options are limited, compared with enabling individual security scanners.

Enable individual security scanners

To enable individual security scanning tools with the option of customizing settings, include the security scanner’s templates to your .gitlab-ci.yml file.

For instructions on how to enable individual security scanners, see their documentation.

Enable security scanning by using Auto DevOps

To enable the following security scanning tools, with default settings, enable Auto DevOps:

While you cannot directly customize Auto DevOps, you can include the Auto DevOps template in your project’s .gitlab-ci.yml file and override its settings as required.

With the UI

Use the Security configuration page to view and configure the security testing and vulnerability management settings of a project.

The Security testing tab reflects the status of each of the security tools by checking the CI/CD pipeline in the most recent commit on the default branch.

Enabled
The security testing tool’s artifact was found in the pipeline’s output.
Not enabled
Either no CI/CD pipeline exists or the security testing tool’s artifact was not found in the pipeline’s output.
View security configuration page

To view a project’s security configuration:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Secure > Security configuration.

To see a historic view of changes to the CI/CD configuration file, select Configuration history.

Edit a project’s security configuration

To edit a project’s security configuration:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Secure > Security configuration.
  3. Select the security scanner you want to enable or configure and follow the instructions.

For more details on how to enable and configure individual security scanners, see their documentation.

To apply the same security scanning configuration to multiple projects, use one of the following methods:

Each of these methods allow a CI/CD configuration, including security scanning, to be defined once and applied to multiple projects and groups. These methods have several advantages over configuring each project individually, including:

Scan execution policy compared to compliance framework

Consider the following when deciding between using a scan execution policy or compliance framework.

Additional details about the differences between these solutions are outlined below:

Compliance Framework Pipelines Scan Execution Policies Flexibility Supports anything that can be done in a CI/CD file. Limited to only the items for which GitLab has explicitly added support. DAST, SAST, SAST IaC, Secret Detection, Dependency Scanning, and Container Scanning scans are supported. Usability Requires knowledge of CI YAML. Follows a rules and actions-based YAML structure. Inclusion in CI pipeline The compliance pipeline is executed instead of the project’s .gitlab-ci.yml file. To include the project’s .gitlab-ci.yml file, use an include statement. Defined variables aren’t allowed to be overwritten by the included project’s YAML file. Forced inclusion of a new job into the CI pipeline. DAST jobs that must be customized on a per-project basis can have project-level Site Profiles and Scan Profiles defined. To ensure separation of duties, these profiles are immutable when referenced in a scan execution policy. All jobs can be customized as part of the security policy itself with the same variables that are usually available to the CI job. Schedulable Has to be scheduled through a scheduled pipeline on each project. Can be scheduled natively through the policy configuration itself. Separation of Duties Only group owners can create compliance framework labels. Only project owners can apply compliance framework labels to projects. The ability to make or approve changes to the compliance pipeline definition is limited to individuals who are explicitly given access to the project that contains the compliance pipeline. Only project owners can define a linked security policy project. The ability to make or approve changes to security policies is limited to individuals who are explicitly given access to the security policy project. Ability to apply one standard to multiple projects The same compliance framework label can be applied to multiple projects inside a group. The same security policy project can be used for multiple projects across GitLab with no requirement of being located in the same group.

Feedback is welcome on our vision for unifying the user experience for these two features

Customize security scanning

You can customize security scanning to suit your requirements and environment. For details of how to customize individual security scanners, refer to their documentation.

Best practices

When customizing the security scanning configuration:

Template editions

GitLab application security tools have up to two template editions:

Don’t mix security templates in the same project. Mixing different security template editions can cause both merge request and branch pipelines to run.

Override the default registry base address

By default, GitLab security scanners use registry.gitlab.com/security-products as the base address for Docker images. You can override this for most scanners by setting the CI/CD variable SECURE_ANALYZERS_PREFIX to another location. This affects all scanners at once.

The Container Scanning analyzer is an exception, and it does not use the SECURE_ANALYZERS_PREFIX variable. To override its Docker image, see the instructions for Running container scanning in an offline environment.

Use security scanning tools with merge request pipelines

By default, the application security jobs are configured to run for branch pipelines only. To use them with merge request pipelines, either:

For example, to run both SAST and Dependency Scanning with merge request pipelines enabled, the following configuration is used:

include:
  - template: Jobs/Dependency-Scanning.gitlab-ci.yml
  - template: Jobs/SAST.gitlab-ci.yml

variables:
  AST_ENABLE_MR_PIPELINES: "true"
Use a custom scanning stage

Security scanner templates use the predefined test stage by default. To have them instead run in a different stage, add the custom stage’s name to the stages: section of the .gitlab-ci.yml file.

For more information about overriding security jobs, see:

Troubleshooting

When configuring security scanning you might encounter the following issues.

Error: chosen stage test does not exist

When running a pipeline you might get an error that states chosen stage test does not exist.

This issue occurs when the stage used by the security scanning jobs isn’t declared in the .gitlab-ci.yml file.

To resolve this, either:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4