GitLab API

GitlabTool

Actions1000

Overview

This node interacts with the GitLab API to perform a quick security audit on npm packages. It is useful for developers and DevOps teams who want to quickly check the security status of npm packages used in their projects by leveraging GitLab's security audit capabilities.

Use Case Examples

  1. A developer wants to ensure that the npm packages used in their project do not have known vulnerabilities before deployment.
  2. A DevOps engineer integrates this node into a CI/CD pipeline to automatically run security audits on npm dependencies during the build process.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to GET but can be POST, PUT, DELETE, HEAD, or PATCH.

Output

JSON

  • status - HTTP response status code from the GitLab API.
  • data - The JSON response body containing the results of the npm package security audit.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has the necessary permissions to access the npm package security audit endpoint.
  • Verify the baseUrl is correctly set to the GitLab instance URL, especially if using a self-hosted GitLab instance.
  • Check that the HTTP method is set appropriately; for this operation, POST is typically required.
  • If authentication is skipped, ensure the endpoint allows unauthenticated access, otherwise the request will fail with an authentication error.

Links

Discussion