Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,038
    • Issues 38,038
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,345
    • Merge requests 1,345
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !30397

Merged
Created Apr 24, 2020 by Mehmet Emin INAC@minacDeveloper7 of 13 tasks completed7/13 tasks

Instance level exportable security reports api changes

  • Overview 39
  • Commits 6
  • Pipelines 16
  • Changes 13

Why this MR?

This MR is related to issue #213014 (closed).

What does this MR do?

This MR is adding /security namespace for the existing vulnerability export endpoints and removing the /project/:project_id namespace from the existing lookup endpoints as we are going to use the same endpoint for all type of exports and also introducing a new endpoint to create instance level exports.

Old Endpoint New Endpoint
POST /projects/:project_id/vulnerability_exports POST /security/projects/:project_id/vulnerability_exports
N/A POST /security/vulnerability_exports
GET /projects/:project_id/vulnerability_exports/:export_id GET /security/vulnerability_exports/:export_id
GET /projects/:project_id/vulnerability_exports/:export_id/download GET /security/vulnerability_exports/:export_id/download

Note: The response payload is the same as before.

Creating an instance level export

Example HTTP request;

curl --request POST '${BASE_URL}/api/v4/security/vulnerability_exports' \
     --header 'PRIVATE_TOKEN: ${TOKEN}'

Example response payload;

{
    "id": 2,
    "created_at": "2020-04-27T12:45:41.133Z",
    "project_id": null,
    "format": "csv",
    "status": "created",
    "started_at": null,
    "finished_at": null,
    "_links": {
        "self": "http://gitlab.local:3000/api/v4/security/vulnerability_exports/2",
        "download": "http://gitlab.local:3000/api/v4/security/vulnerability_exports/2/download"
    }
}

Does this MR meet the acceptance criteria?

Conformity

  • Changelog entry
  • Documentation (if required)
  • Code review guidelines
  • Merge request performance guidelines
  • Style guides
  • Database guides
  • Separation of EE specific content

Availability and Testing

  • Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
  • Tested in all supported browsers
  • Informed Infrastructure department of a default or new setting change, if applicable per definition of done

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited Apr 30, 2020 by Mehmet Emin INAC
Assignee
Assign to
Reviewer
Request review from
13.0
Milestone
13.0 (Past due)
Assign milestone
Time tracking
Source branch: 213014_instance_level_exportable_security_reports_api_changes