<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Vulnerabilities API > 原文:[https://docs.gitlab.com/ee/api/vulnerabilities.html](https://docs.gitlab.com/ee/api/vulnerabilities.html) * [Single vulnerability](#single-vulnerability) * [Confirm vulnerability](#confirm-vulnerability) * [Resolve vulnerability](#resolve-vulnerability) * [Dismiss vulnerability](#dismiss-vulnerability) # Vulnerabilities API[](#vulnerabilities-api-ultimate "Permalink") [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10242) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.6. **注意:**以前的 Vulnerabilities API 已重命名為 Vulnerability Findings API,其文檔已移至[其他位置](vulnerability_findings.html) . 現在,本文描述了新的漏洞 API,該 API 提供對[獨立漏洞的](https://gitlab.com/groups/gitlab-org/-/epics/634)訪問.**警告:**此 API 處于 alpha 階段,被認為是不穩定的. 響應有效載荷可能會在 GitLab 版本之間發生更改或損壞. 每個對漏洞的 API 調用都必須經過[身份驗證](README.html#authentication) . 漏洞權限從其項目繼承權限. 如果項目是私有項目,并且用戶不是該漏洞所屬項目的成員,則對該項目的請求將返回`404 Not Found`狀態代碼. ## Single vulnerability[](#single-vulnerability "Permalink") 獲得一個漏洞 ``` GET /vulnerabilities/:id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 要獲取的漏洞的 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/vulnerabilities/1" ``` 響應示例: ``` { "id": 1, "title": "Predictable pseudorandom number generator", "description": null, "state": "opened", "severity": "medium", "confidence": "medium", "report_type": "sast", "project": { "id": 32, "name": "security-reports", "full_path": "/gitlab-examples/security/security-reports", "full_name": "gitlab-examples / security / security-reports" }, "author_id": 1, "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "last_edited_at": null, "closed_at": null } ``` ## Confirm vulnerability[](#confirm-vulnerability "Permalink") 確認給定漏洞. 如果已經確認該漏洞,則返回狀態碼`304` . 如果經過身份驗證的用戶無權[確認漏洞](../user/permissions.html#project-members-permissions) ,則此請求將導致`403`狀態代碼. ``` POST /vulnerabilities/:id/confirm ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 確認漏洞的 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/vulnerabilities/5/confirm" ``` 響應示例: ``` { "id": 2, "title": "Predictable pseudorandom number generator", "description": null, "state": "confirmed", "severity": "medium", "confidence": "medium", "report_type": "sast", "project": { "id": 32, "name": "security-reports", "full_path": "/gitlab-examples/security/security-reports", "full_name": "gitlab-examples / security / security-reports" }, "author_id": 1, "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "last_edited_at": null, "closed_at": null } ``` ## Resolve vulnerability[](#resolve-vulnerability "Permalink") 解決給定漏洞. 如果漏洞已解決,則返回狀態碼`304` . 如果經過身份驗證的用戶無權[解決漏洞](../user/permissions.html#project-members-permissions) ,則此請求將導致`403`狀態代碼. ``` POST /vulnerabilities/:id/resolve ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 解決的漏洞的 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/vulnerabilities/5/resolve" ``` 響應示例: ``` { "id": 2, "title": "Predictable pseudorandom number generator", "description": null, "state": "resolved", "severity": "medium", "confidence": "medium", "report_type": "sast", "project": { "id": 32, "name": "security-reports", "full_path": "/gitlab-examples/security/security-reports", "full_name": "gitlab-examples / security / security-reports" }, "author_id": 1, "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "last_edited_at": null, "closed_at": null } ``` ## Dismiss vulnerability[](#dismiss-vulnerability "Permalink") 消除給定的漏洞. 如果漏洞已被`304`則返回狀態碼`304` . If an authenticated user does not have permission to [dismiss vulnerabilities](../user/permissions.html#project-members-permissions), this request will result in a `403` status code. ``` POST /vulnerabilities/:id/dismiss ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 消除漏洞的 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/vulnerabilities/5/dismiss" ``` 響應示例: ``` { "id": 2, "title": "Predictable pseudorandom number generator", "description": null, "state": "closed", "severity": "medium", "confidence": "medium", "report_type": "sast", "project": { "id": 32, "name": "security-reports", "full_path": "/gitlab-examples/security/security-reports", "full_name": "gitlab-examples / security / security-reports" }, "author_id": 1, "updated_by_id": null, "last_edited_by_id": null, "closed_by_id": null, "start_date": null, "due_date": null, "created_at": "2019-10-13T15:08:40.219Z", "updated_at": "2019-10-13T15:09:40.382Z", "last_edited_at": null, "closed_at": null } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看