diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..e470065e9 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +//.npmrc +registry=https://registry.npmjs.org \ No newline at end of file diff --git a/README.md b/README.md index bfc3d5998..c1fa12267 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,7 @@ Runners Services Tags Triggers +VulnerabilityFindings // Users Users @@ -300,6 +301,7 @@ Services Tags Todos Triggers +VulnerabilityFindings ``` 2. UsersBundle which includes: @@ -492,7 +494,7 @@ If your Gitlab server is running via HTTPS, the proper way to pass in your certi For responses such as file data that may be returned from the API, the data is exposed as a buffer. For example, when trying to write a file, this can be done like: ```javascript -let bufferedData = await api.Jobs.downloadLatestArtifactFile(project.id, "test", "job_test); +let bufferedData = await api.Jobs.downloadLatestArtifactFile(project.id, "test", "job_test"); fs.writeFileSync("test.zip", bufferedData); diff --git a/src/core/index.ts b/src/core/index.ts index 7cf402c96..171fef675 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -81,6 +81,7 @@ export const ProjectsBundle = bundler({ Services: APIServices.Services, Tags: APIServices.Tags, Triggers: APIServices.Triggers, + VulnerabilityFindings: APIServices.VulnerabilityFindings, }); // All initialized diff --git a/src/core/services/VulnerabilityFindings.ts b/src/core/services/VulnerabilityFindings.ts new file mode 100644 index 000000000..ea9e4f89e --- /dev/null +++ b/src/core/services/VulnerabilityFindings.ts @@ -0,0 +1,19 @@ +import { BaseService, PaginatedRequestOptions, RequestHelper } from '../infrastructure'; + +export class VulnerabilityFindings extends BaseService { + all( + projectId: string | number, + options?: { + id: string | number; + reportType: string[]; + scope: string; + severity: string[]; + confidence: string[]; + pipelineId: string | number; + } & PaginatedRequestOptions, + ) { + const pId = encodeURIComponent(projectId); + + return RequestHelper.get(this, `projects/${pId}/vulnerability_findings`, options); + } +} diff --git a/src/core/services/index.ts b/src/core/services/index.ts index a6636f494..52e459531 100644 --- a/src/core/services/index.ts +++ b/src/core/services/index.ts @@ -71,6 +71,7 @@ export * from './Services'; export * from './Tags'; export * from './Todos'; export * from './Triggers'; +export * from './VulnerabilityFindings'; // General export * from './ApplicationSettings';