vulnerability
Gets or lists a vulnerability resource.
Overview​
| Name | vulnerability |
| Type | Resource |
| Id | gitlab.security.vulnerability |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | GraphQL ID of the vulnerability. |
name | string | Name or title of the object. |
ai_resolution_available | boolean | Indicates whether the type of vulnerability can be resolved with AI. |
ai_resolution_enabled | boolean | Indicates whether the specific vulnerability can be resolved with AI. |
confirmed_at | string | Timestamp of when the vulnerability state was changed to confirmed. |
description | string | Description of the vulnerability. |
detected_at | string | Timestamp of when the vulnerability was first detected. |
dismissal_reason | string | Reason for dismissal. Returns null for states other than dismissed. (ACCEPTABLE_RISK, FALSE_POSITIVE, MITIGATING_CONTROL, USED_IN_TESTS, NOT_APPLICABLE) |
dismissed_at | string | Timestamp of when the vulnerability state was changed to dismissed. |
false_positive | boolean | Indicates whether the vulnerability is a false positive. |
has_remediations | boolean | Indicates whether there is a remediation available for the vulnerability. |
present_on_default_branch | boolean | Indicates whether the vulnerability is present on the default branch or not. |
project | object | Project identity (id, full_path, name) |
removed_from_code | boolean | Indicates whether the vulnerability is present in the code or not. |
report_type | string | Type 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_at | string | Timestamp of when the vulnerability state was changed to resolved. |
resolved_on_default_branch | boolean | Indicates whether the vulnerability is fixed on the default branch or not. |
severity | string | Severity of the vulnerability (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL) (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL) |
solution | string | Recommended solution for the vulnerability. |
state | string | State of the vulnerability (DETECTED, CONFIRMED, RESOLVED, DISMISSED) (CONFIRMED, DETECTED, DISMISSED, RESOLVED) |
state_comment | string | Comment given for the vulnerability state change. |
title | string | Title of the vulnerability. |
unverified | boolean | Indicates whether the finding was detected without an identified source (untrusted input). |
updated_at | string | Timestamp of when the vulnerability was last updated. |
user_notes_count | integer | Number of user notes attached to the vulnerability. |
uuid | string | UUID of the vulnerability finding. Can be used to look up the associated security report finding. |
vulnerability_path | string | Path to the vulnerability's details page. |
web_url | string | URL to the vulnerability's details page. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, host | Find a vulnerability. Generated from the GitLab GraphQL schema field Query.vulnerability (Vulnerability). |
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.
| Name | Datatype | Description |
|---|---|---|
host | string | GitLab 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) |
id | string | Global ID of the Vulnerability. |
SELECT examples​
- get
Find a vulnerability. Generated from the GitLab GraphQL schema field Query.vulnerability (Vulnerability).
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.vulnerability
WHERE id = '{{ id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;