mobbdev 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +46 -45
- package/src/index.mjs +8 -9
package/package.json
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
2
|
+
"name": "mobbdev",
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "Automated secure code remediation tool",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"lint": "prettier --check . && eslint **/*.mjs",
|
|
8
|
+
"lint:fix": "prettier --write . && eslint --fix **/*.mjs",
|
|
9
|
+
"test": "DOTENV_ME=${ENV_VAULT_CLI} dotenv-vault pull development .env && TOKEN=$(../../scripts/login_auth0.sh) NODE_OPTIONS=--experimental-vm-modules jest",
|
|
10
|
+
"prepack": "dotenv-vault pull production .env"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"mobbdev": "bin/cli.mjs"
|
|
14
|
+
},
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"colors": "1.4.0",
|
|
19
|
+
"configstore": "6.0.0",
|
|
20
|
+
"dotenv": "16.0.3",
|
|
21
|
+
"extract-zip": "2.0.1",
|
|
22
|
+
"form-data": "4.0.0",
|
|
23
|
+
"got": "12.6.0",
|
|
24
|
+
"open": "8.4.2",
|
|
25
|
+
"snyk": "1.1118.0",
|
|
26
|
+
"tmp": "0.2.1",
|
|
27
|
+
"zod": "3.21.4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@jest/globals": "29.5.0",
|
|
31
|
+
"eslint": "8.36.0",
|
|
32
|
+
"jest": "29.5.0",
|
|
33
|
+
"prettier": "2.8.4"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=8.5.0"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"bin",
|
|
40
|
+
"src",
|
|
41
|
+
"index.mjs",
|
|
42
|
+
".env",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"package.json"
|
|
46
|
+
]
|
|
47
|
+
}
|
package/src/index.mjs
CHANGED
|
@@ -54,11 +54,6 @@ export async function main(dirname, repoUrl) {
|
|
|
54
54
|
|
|
55
55
|
const report = JSON.parse(fs.readFileSync(reportPath, 'utf8'));
|
|
56
56
|
|
|
57
|
-
if ((report.runs?.at(0)?.results?.length ?? 0) === 0) {
|
|
58
|
-
console.log('Snyk has not found any vulnerabilities — nothing to fix.');
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
57
|
await uploadFile(
|
|
63
58
|
reportPath,
|
|
64
59
|
uploadData.url,
|
|
@@ -71,8 +66,12 @@ export async function main(dirname, repoUrl) {
|
|
|
71
66
|
reference
|
|
72
67
|
);
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
'
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
if ((report.runs?.at(0)?.results?.length ?? 0) === 0) {
|
|
70
|
+
console.log('Snyk has not found any vulnerabilities — nothing to fix.');
|
|
71
|
+
} else {
|
|
72
|
+
console.log(
|
|
73
|
+
'You will be redirected to our report page, please wait until the analysis is finished and enjoy your fixes.'
|
|
74
|
+
);
|
|
75
|
+
await open(`${WEB_REPORT_URL}${uploadData.fixReportId}`);
|
|
76
|
+
}
|
|
78
77
|
}
|