Skip to content

Commit c3c6b6f

Browse files
committed
fix: remove archive:generate command to address vulnerabilities (#535)
BREAKING CHANGE: the `archive:generate` command and its associated dependencies (`request`, `request-promise`, and `capture-har`) has been removed to fix security vulnerabilities [CVE-2023-28155](GHSA-p8p7-x288-28g6) and [CVE-2023-26136](GHSA-72xf-g2v4-qvf3).
1 parent e92a9a1 commit c3c6b6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+689
-1591
lines changed

package-lock.json

Lines changed: 128 additions & 738 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,25 @@
2525
"node": ">=10 <=18"
2626
},
2727
"dependencies": {
28-
"@neuralegion/capture-har": "^0.3.4",
2928
"@neuralegion/os-service": "1.2.2",
3029
"@neuralegion/raw-socket": "1.8.2",
3130
"@sentry/node": "^7.70.0",
3231
"ajv": "^6.12.6",
3332
"amqplib": "~0.10.2",
3433
"arch": "^2.2.0",
34+
"axios": "^1.6.8",
3535
"better-ajv-errors": "^1.2.0",
3636
"chalk": "^4.1.2",
3737
"ci-info": "^3.8.0",
3838
"fast-content-type-parse": "^1.1.0",
3939
"find-up": "^5.0.0",
40+
"form-data": "^4.0.0",
4041
"http-proxy-agent": "^7.0.2",
4142
"https-proxy-agent": "^7.0.4",
4243
"iconv-lite": "^0.6.3",
4344
"js-yaml": "^4.1.0",
4445
"ms": "^2.1.3",
4546
"reflect-metadata": "^0.1.13",
46-
"request": "~2.88.2",
47-
"request-promise": "~4.2.6",
4847
"semver": "^7.6.0",
4948
"socket.io-client": "^4.7.1",
5049
"socket.io-msgpack-parser": "^3.0.2",

src/Archive/Archives.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface Spec {
1010
}
1111

1212
export enum SpecType {
13-
NEXMOCK = 'NexMock',
1413
HAR = 'HAR',
1514
OPENAPI = 'OpenAPI',
1615
POSTMAN = 'Postman'

src/Archive/HarSplitter.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/Archive/Parsers/DefaultParserFactory.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
11
import { SpecType } from '../Archives';
2-
import {
3-
HarValidator,
4-
NexMockValidator,
5-
OasValidator,
6-
PostmanValidator
7-
} from '../Validators';
2+
import { HarValidator, OasValidator, PostmanValidator } from '../Validators';
83
import { ParserFactory } from './ParserFactory';
9-
import { HarRecorder, NexMockConverter } from './NexMock';
10-
import { NexMockParser } from './NexMockParser';
114
import { BaseParser } from './BaseParser';
125
import { OasParser } from './OasParser';
136
import { Parser } from './Parser';
14-
import { inject, injectable } from 'tsyringe';
7+
import { injectable } from 'tsyringe';
158

169
@injectable()
1710
export class DefaultParserFactory implements ParserFactory {
1811
constructor(
19-
private readonly nexMockValidator: NexMockValidator,
2012
private readonly harValidator: HarValidator,
2113
private readonly oasValidator: OasValidator,
22-
private readonly postmanValidator: PostmanValidator,
23-
@inject(NexMockConverter)
24-
private readonly nexMockConverter: NexMockConverter,
25-
@inject(HarRecorder) private readonly harRecorder: HarRecorder
14+
private readonly postmanValidator: PostmanValidator
2615
) {}
2716

2817
public create(spec: SpecType): Parser | never {
2918
switch (spec) {
30-
case SpecType.NEXMOCK:
31-
return new NexMockParser(
32-
this.nexMockValidator,
33-
this.harRecorder,
34-
this.nexMockConverter
35-
);
3619
case SpecType.HAR:
3720
return new BaseParser(this.harValidator);
3821
case SpecType.OPENAPI:

src/Archive/Parsers/NexMock/BaseNexMockConverter.ts

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/Archive/Parsers/NexMock/DefaultHarRecorder.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Archive/Parsers/NexMock/HarRecorder.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)