Skip to content

Commit c90c034

Browse files
sidi7Simon Röthlisberger
andauthored
feat: add vulnerabilities toolset for AI-assisted triage (#610)
Opt-in vulnerabilities toolset with GraphQL-backed list/get/dismiss/confirm tools, allowlist enforcement, and tests. Co-authored-by: Simon Röthlisberger <simon.roethlisberger@swisscom.com> Co-authored-by: sidi7 <sidi7@users.noreply.github.com>
1 parent 73d198c commit c90c034

13 files changed

Lines changed: 1286 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,11 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
753753
209. `update_dependency_proxy_settings` - Update dependency proxy settings for a group (enable/disable, credentials for authenticated Docker Hub pulls)
754754
210. `list_dependency_proxy_blobs` - List cached dependency proxy blobs for a group with cursor-based pagination
755755
211. `purge_dependency_proxy_cache` - Schedule purge of all cached dependency proxy blobs for a group
756-
212. `discover_tools` - Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy. Already-active categories are listed in the response.
756+
212. `list_project_vulnerabilities` - List vulnerabilities for a project with optional state, severity, and report type filters (GraphQL-backed, cursor pagination)
757+
213. `get_vulnerability` - Get full details of a specific vulnerability
758+
214. `dismiss_vulnerability` - Dismiss a vulnerability with a reason (acceptable_risk, false_positive, used_in_tests, mitigating_control, not_applicable) and optional comment
759+
215. `confirm_vulnerability` - Confirm a vulnerability as a real finding requiring remediation
760+
216. `discover_tools` - Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities. Already-active categories are listed in the response.
757761

758762
<!-- TOOLS-END -->
759763

docs/tools/index.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ directly from `TOOLSET_DEFINITIONS` in
1717
| Status | Groups |
1818
|---|---|
1919
| **Default** — always exposed | [Projects & Namespaces](projects.md), [Projects & Files](repositories.md), [Branches & Commits](branches.md), [Groups](groups.md), [Merge Requests](merge-requests.md), [Issues](issues.md), [Labels](labels.md), [CI Lint](ci.md), [Users & Events](users.md) |
20-
| **Opt-in** — must be enabled | [Work Items](workitems.md), [Pipelines, Jobs & Deployments](pipelines.md) (also `USE_PIPELINE=true`), [Milestones](milestones.md) (also `USE_MILESTONE=true`), [Wiki](wiki.md) (also `USE_GITLAB_WIKI=true`), [Releases](releases.md), [Tags](tags.md), [Variables](variables.md), [Webhooks](webhooks.md), [Search](search.md), [Dependency Proxy](dependency-proxy.md), [Meta & GraphQL](meta.md) |
20+
| **Opt-in** — must be enabled | [Work Items](workitems.md), [Pipelines, Jobs & Deployments](pipelines.md) (also `USE_PIPELINE=true`), [Milestones](milestones.md) (also `USE_MILESTONE=true`), [Wiki](wiki.md) (also `USE_GITLAB_WIKI=true`), [Releases](releases.md), [Tags](tags.md), [Variables](variables.md), [Webhooks](webhooks.md), [Search](search.md), [Dependency Proxy](dependency-proxy.md), [Vulnerabilities](vulnerabilities.md), [Meta & GraphQL](meta.md) |
2121

2222
**How to enable opt-in groups** (any one is sufficient):
2323

@@ -412,6 +412,19 @@ Inspect and manage the GitLab dependency proxy cache settings, blob storage, and
412412
| [`list_dependency_proxy_blobs`](dependency-proxy.md#list_dependency_proxy_blobs) | List cached dependency proxy blobs for a group | 📖 |
413413
| [`purge_dependency_proxy_cache`](dependency-proxy.md#purge_dependency_proxy_cache) | Schedule purge of all cached dependency proxy blobs for a group | ✏️ |
414414

415+
### [Vulnerabilities](vulnerabilities.md)
416+
417+
AI-assisted vulnerability triage — list findings, inspect details, dismiss with reason, or confirm for remediation. Backed by the GitLab GraphQL API; requires GitLab Ultimate. *(4 tools)*
418+
419+
> Opt-in. Enable via `GITLAB_TOOLSETS=vulnerabilities` (or `GITLAB_TOOLSETS=all`), list individual tools in `GITLAB_TOOLS=`, or activate at runtime with the `discover_tools` MCP tool.
420+
421+
| Tool | What it does | R/W |
422+
|---|---|:-:|
423+
| [`list_project_vulnerabilities`](vulnerabilities.md#list_project_vulnerabilities) | List vulnerabilities for a project with optional state, severity, and report type filters (GraphQL-backed, cursor pagination) | 📖 |
424+
| [`get_vulnerability`](vulnerabilities.md#get_vulnerability) | Get full details of a specific vulnerability | 📖 |
425+
| [`dismiss_vulnerability`](vulnerabilities.md#dismiss_vulnerability) | Dismiss a vulnerability with a reason (acceptable_risk, false_positive, used_in_tests, mitigating_control, not_applicable) and optional comment | ✏️ |
426+
| [`confirm_vulnerability`](vulnerabilities.md#confirm_vulnerability) | Confirm a vulnerability as a real finding requiring remediation | ✏️ |
427+
415428
### [Meta & GraphQL](meta.md)
416429

417430
Server diagnostics, tool discovery, and the GraphQL escape hatch. *(2 tools)*
@@ -421,7 +434,7 @@ Server diagnostics, tool discovery, and the GraphQL escape hatch. *(2 tools)*
421434
| Tool | What it does | R/W |
422435
|---|---|:-:|
423436
| [`execute_graphql`](meta.md#execute_graphql) | Execute a GitLab GraphQL query | 📖 |
424-
| [`discover_tools`](meta.md#discover_tools) | Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy. Already-active categories are listed in the response. | 📖 |
437+
| [`discover_tools`](meta.md#discover_tools) | Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities. Already-active categories are listed in the response. | 📖 |
425438

426439
---
427440

docs/tools/meta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Execute a GitLab GraphQL query
2929

3030
*📖 Read-only*
3131

32-
Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy. Already-active categories are listed in the response.
32+
Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities. Already-active categories are listed in the response.
3333

3434
**Parameters**
3535

docs/tools/vulnerabilities.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Vulnerabilities
2+
3+
AI-assisted vulnerability triage — list findings, inspect details, dismiss with reason, or confirm for remediation. Backed by the GitLab GraphQL API; requires GitLab Ultimate.
4+
5+
!!! note "Feature toggle"
6+
Opt-in. Enable via `GITLAB_TOOLSETS=vulnerabilities` (or `GITLAB_TOOLSETS=all`), list individual tools in `GITLAB_TOOLS=`, or activate at runtime with the `discover_tools` MCP tool.
7+
8+
## Tools in this group
9+
10+
- [`list_project_vulnerabilities`](#list_project_vulnerabilities) — 📖 Read-only
11+
- [`get_vulnerability`](#get_vulnerability) — 📖 Read-only
12+
- [`dismiss_vulnerability`](#dismiss_vulnerability) — ✏️ Writes
13+
- [`confirm_vulnerability`](#confirm_vulnerability) — ✏️ Writes
14+
15+
---
16+
17+
### `list_project_vulnerabilities`
18+
19+
*📖 Read-only*
20+
21+
List vulnerabilities for a project with optional state, severity, and report type filters (GraphQL-backed, cursor pagination)
22+
23+
**Parameters**
24+
25+
| Parameter | Type | Required | Description |
26+
|---|---|:-:|---|
27+
| `project_id` | string || Project ID or URL-encoded path |
28+
| `state` | enum (`detected` \| `confirmed` \| `resolved` \| `dismissed`) | | Filter by vulnerability state |
29+
| `severity` | enum (`critical` \| `high` \| `medium` \| `low` \| `info` \| `unknown`) | | Filter by severity level |
30+
| `report_type` | enum (`sast` \| `dast` \| `dependency_scanning` \| `container_scanning` \| `secret_detection` \| `coverage_fuzzing` \| `api_fuzzing` \| `cluster_image_scanning` \| `generic`) | | Filter by scan/report type (e.g. secret_detection, sast, dast) |
31+
| `first` | integer | | Number of vulnerabilities to return (max: 100, default: 20) |
32+
| `after` | string | | Cursor for pagination; use the endCursor from a previous response |
33+
34+
### `get_vulnerability`
35+
36+
*📖 Read-only*
37+
38+
Get full details of a specific vulnerability
39+
40+
**Parameters**
41+
42+
| Parameter | Type | Required | Description |
43+
|---|---|:-:|---|
44+
| `vulnerability_id` | string || The vulnerability ID (numeric or GraphQL global ID) |
45+
46+
### `dismiss_vulnerability`
47+
48+
*✏️ Writes*
49+
50+
Dismiss a vulnerability with a reason (acceptable_risk, false_positive, used_in_tests, mitigating_control, not_applicable) and optional comment
51+
52+
**Parameters**
53+
54+
| Parameter | Type | Required | Description |
55+
|---|---|:-:|---|
56+
| `vulnerability_id` | string || The ID of the vulnerability to dismiss (numeric or GraphQL global ID) |
57+
| `reason` | enum (`acceptable_risk` \| `false_positive` \| `used_in_tests` \| `mitigating_control` \| `not_applicable`) || Reason for dismissal |
58+
| `comment` | string | | Optional comment explaining the dismissal |
59+
60+
### `confirm_vulnerability`
61+
62+
*✏️ Writes*
63+
64+
Confirm a vulnerability as a real finding requiring remediation
65+
66+
**Parameters**
67+
68+
| Parameter | Type | Required | Description |
69+
|---|---|:-:|---|
70+
| `vulnerability_id` | string || The ID of the vulnerability to confirm (numeric or GraphQL global ID) |
71+
| `comment` | string | | Optional comment explaining the confirmation |

0 commit comments

Comments
 (0)