Skip to main content

project_vulnerabilities

Gets or lists a project_vulnerabilities resource.

Overview​

Nameproject_vulnerabilities
TypeResource
Idgitlab.security.project_vulnerabilities

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringGraphQL ID of the vulnerability.
namestringName or title of the object.
ai_resolution_availablebooleanIndicates whether the type of vulnerability can be resolved with AI.
ai_resolution_enabledbooleanIndicates whether the specific vulnerability can be resolved with AI.
confirmed_atstringTimestamp of when the vulnerability state was changed to confirmed.
descriptionstringDescription of the vulnerability.
detected_atstringTimestamp of when the vulnerability was first detected.
dismissal_reasonstringReason for dismissal. Returns null for states other than dismissed. (ACCEPTABLE_RISK, FALSE_POSITIVE, MITIGATING_CONTROL, USED_IN_TESTS, NOT_APPLICABLE)
dismissed_atstringTimestamp of when the vulnerability state was changed to dismissed.
false_positivebooleanIndicates whether the vulnerability is a false positive.
has_remediationsbooleanIndicates whether there is a remediation available for the vulnerability.
present_on_default_branchbooleanIndicates whether the vulnerability is present on the default branch or not.
projectobjectProject identity (id, full_path, name)
removed_from_codebooleanIndicates whether the vulnerability is present in the code or not.
report_typestringType of the security report that found the vulnerability (SAST, DEPENDENCY_SCANNING, CONTAINER_SCANNING, DAST, SECRET_DETECTION, COVERAGE_FUZZING, API_FUZZING, CLUSTER_IMAGE_SCANNING, CONTAINER_SCANNING_FOR_REGISTRY, SARIF, GENERIC). Scan Type in the UI. (SAST, DEPENDENCY_SCANNING, CONTAINER_SCANNING, DAST, SECRET_DETECTION, COVERAGE_FUZZING, API_FUZZING, CLUSTER_IMAGE_SCANNING, CONTAINER_SCANNING_FOR_REGISTRY, SARIF, GENERIC)
resolved_atstringTimestamp of when the vulnerability state was changed to resolved.
resolved_on_default_branchbooleanIndicates whether the vulnerability is fixed on the default branch or not.
severitystringSeverity of the vulnerability (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL) (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL)
solutionstringRecommended solution for the vulnerability.
statestringState of the vulnerability (DETECTED, CONFIRMED, RESOLVED, DISMISSED) (CONFIRMED, DETECTED, DISMISSED, RESOLVED)
state_commentstringComment given for the vulnerability state change.
titlestringTitle of the vulnerability.
unverifiedbooleanIndicates whether the finding was detected without an identified source (untrusted input).
updated_atstringTimestamp of when the vulnerability was last updated.
user_notes_countintegerNumber of user notes attached to the vulnerability.
uuidstringUUID of the vulnerability finding. Can be used to look up the associated security report finding.
vulnerability_pathstringPath to the vulnerability's details page.
web_urlstringURL to the vulnerability's details page.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfull_path, hosthas_ai_resolution, has_issues, has_merge_request, has_remediations, has_resolution, identifier_name, sortVulnerabilities reported on the project. Generated from the GitLab GraphQL schema field Project.vulnerabilities (connection of Vulnerability nodes).

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)
has_ai_resolutionbooleanReturns only the vulnerabilities which can likely be resolved by GitLab Duo Vulnerability Resolution.
has_issuesbooleanReturns only the vulnerabilities which have linked issues.
has_merge_requestbooleanReturns only the vulnerabilities which have linked merge requests.
has_remediationsbooleanReturns only the vulnerabilities which have remediations.
has_resolutionbooleanReturns only the vulnerabilities which have been resolved on default branch.
identifier_namestringFilter vulnerabilities by identifier name. Ignored when applied on instance security dashboard queries.
sortstringList vulnerabilities by sort order.

SELECT examples​

Vulnerabilities reported on the project. Generated from the GitLab GraphQL schema field Project.vulnerabilities (connection of Vulnerability nodes).

SELECT
id,
name,
ai_resolution_available,
ai_resolution_enabled,
confirmed_at,
description,
detected_at,
dismissal_reason,
dismissed_at,
false_positive,
has_remediations,
present_on_default_branch,
project,
removed_from_code,
report_type,
resolved_at,
resolved_on_default_branch,
severity,
solution,
state,
state_comment,
title,
unverified,
updated_at,
user_notes_count,
uuid,
vulnerability_path,
web_url
FROM gitlab.security.project_vulnerabilities
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
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 }}'
AND identifier_name = '{{ identifier_name }}'
AND sort = '{{ sort }}'
;