Skip to main content

project_vulnerability_severities_count

Gets or lists a project_vulnerability_severities_count resource.

Overview​

Nameproject_vulnerability_severities_count
TypeResource
Idgitlab.security.project_vulnerability_severities_count

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
criticalintegerNumber of vulnerabilities of CRITICAL severity of the project
highintegerNumber of vulnerabilities of HIGH severity of the project
infointegerNumber of vulnerabilities of INFO severity of the project
lowintegerNumber of vulnerabilities of LOW severity of the project
mediumintegerNumber of vulnerabilities of MEDIUM severity of the project
unknownintegerNumber of vulnerabilities of UNKNOWN severity of the project

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_path, hostcapped, has_ai_resolution, has_issues, has_merge_request, has_remediations, has_resolutionCounts for each vulnerability severity in the project. Generated from the GitLab GraphQL schema field Project.vulnerabilitySeveritiesCount (VulnerabilitySeveritiesCount).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
full_pathstringFull path of the project, for example gitlab-org/gitlab
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
cappedbooleanDefault value is false. When set to true, the count returned for each severity is capped at a maximum of 1001. Ignored when used along with any argument that requires advanced vulnerability management.
has_ai_resolutionbooleanFilters vulnerabilities which can or can not be resolved by GitLab Duo Vulnerability Resolution.
has_issuesbooleanFilter vulnerabilities that do or do not have issues.
has_merge_requestbooleanFilter vulnerabilities that do or do not have a merge request.
has_remediationsbooleanFilter vulnerabilities that do or do not have remediations.
has_resolutionbooleanFilter vulnerabilities that do or do not have a resolution.

SELECT examples​

Counts for each vulnerability severity in the project. Generated from the GitLab GraphQL schema field Project.vulnerabilitySeveritiesCount (VulnerabilitySeveritiesCount).

SELECT
critical,
high,
info,
low,
medium,
unknown
FROM gitlab.security.project_vulnerability_severities_count
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND capped = '{{ capped }}'
AND has_ai_resolution = '{{ has_ai_resolution }}'
AND has_issues = '{{ has_issues }}'
AND has_merge_request = '{{ has_merge_request }}'
AND has_remediations = '{{ has_remediations }}'
AND has_resolution = '{{ has_resolution }}'
;