@socketsecurity/cli 0.9.0 → 0.10.0

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.
Files changed (38) hide show
  1. package/README.md +5 -0
  2. package/cli.js +12 -1
  3. package/lib/commands/audit-log/index.js +162 -0
  4. package/lib/commands/cdxgen/index.js +211 -0
  5. package/lib/commands/dependencies/index.js +150 -0
  6. package/lib/commands/index.js +11 -3
  7. package/lib/commands/info/index.js +123 -81
  8. package/lib/commands/login/index.js +1 -1
  9. package/lib/commands/logout/index.js +1 -1
  10. package/lib/commands/npm/index.js +8 -3
  11. package/lib/commands/npx/index.js +1 -1
  12. package/lib/commands/raw-npm/index.js +59 -0
  13. package/lib/commands/raw-npx/index.js +59 -0
  14. package/lib/commands/report/create.js +1 -1
  15. package/lib/commands/report/index.js +1 -1
  16. package/lib/commands/report/view.js +1 -1
  17. package/lib/commands/repos/create.js +166 -0
  18. package/lib/commands/repos/delete.js +93 -0
  19. package/lib/commands/repos/index.js +30 -0
  20. package/lib/commands/repos/list.js +170 -0
  21. package/lib/commands/repos/update.js +166 -0
  22. package/lib/commands/repos/view.js +128 -0
  23. package/lib/commands/scan/create.js +245 -0
  24. package/lib/commands/scan/delete.js +112 -0
  25. package/lib/commands/scan/index.js +30 -0
  26. package/lib/commands/scan/list.js +192 -0
  27. package/lib/commands/scan/metadata.js +113 -0
  28. package/lib/commands/scan/stream.js +115 -0
  29. package/lib/commands/wrapper/index.js +199 -0
  30. package/lib/flags/command.js +14 -0
  31. package/lib/flags/index.js +1 -0
  32. package/lib/shadow/npm-injection.cjs +11 -1
  33. package/lib/utils/format-issues.js +28 -1
  34. package/lib/utils/meow-with-subcommands.js +1 -2
  35. package/lib/utils/misc.js +0 -1
  36. package/lib/utils/path-resolve.js +31 -6
  37. package/lib/utils/sdk.js +0 -3
  38. package/package.json +79 -62
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "CLI tool for Socket.dev",
5
5
  "homepage": "http://github.com/SocketDev/socket-cli-js",
6
6
  "repository": {
@@ -14,9 +14,6 @@
14
14
  "url": "https://socket.dev"
15
15
  },
16
16
  "license": "MIT",
17
- "engines": {
18
- "node": "^16.13.0 || >=18.0.0"
19
- },
20
17
  "type": "module",
21
18
  "bin": {
22
19
  "socket": "cli.js",
@@ -30,8 +27,83 @@
30
27
  "lib/**/*.cjs",
31
28
  "lib/shadow/**"
32
29
  ],
30
+ "dependencies": {
31
+ "@apideck/better-ajv-errors": "^0.3.6",
32
+ "@cyclonedx/cdxgen": "^10.7.0",
33
+ "@inquirer/select": "^2.3.5",
34
+ "@socketsecurity/config": "^2.1.3",
35
+ "@socketsecurity/sdk": "^1.2.0",
36
+ "chalk": "^5.3.0",
37
+ "chalk-table": "^1.0.2",
38
+ "execa": "^9.1.0",
39
+ "globby": "^14.0.1",
40
+ "hpagent": "^1.2.0",
41
+ "ignore": "^5.3.1",
42
+ "ignore-by-default": "^2.1.0",
43
+ "inquirer": "^9.2.23",
44
+ "is-interactive": "^2.0.0",
45
+ "is-unicode-supported": "^2.0.0",
46
+ "meow": "^13.2.0",
47
+ "open": "^10.1.0",
48
+ "ora": "^8.0.1",
49
+ "pony-cause": "^2.1.11",
50
+ "prompts": "^2.4.2",
51
+ "synp": "^1.9.13",
52
+ "terminal-link": "^3.0.0",
53
+ "update-notifier": "^7.0.0",
54
+ "which": "^4.0.0",
55
+ "yargs-parser": "^21.1.1"
56
+ },
57
+ "devDependencies": {
58
+ "@socketsecurity/eslint-config": "^5.0.1",
59
+ "@tsconfig/node20": "^20.1.4",
60
+ "@types/chai": "^4.3.16",
61
+ "@types/chai-as-promised": "^7.1.8",
62
+ "@types/inquirer": "^9.0.7",
63
+ "@types/micromatch": "^4.0.7",
64
+ "@types/mocha": "^10.0.6",
65
+ "@types/mock-fs": "^4.13.4",
66
+ "@types/node": "^20.12.13",
67
+ "@types/npm": "^7.19.3",
68
+ "@types/npmcli__arborist": "^5.6.6",
69
+ "@types/prompts": "^2.4.9",
70
+ "@types/update-notifier": "^6.0.8",
71
+ "@types/which": "^3.0.4",
72
+ "@types/yargs-parser": "^21.0.3",
73
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
74
+ "@typescript-eslint/parser": "7.10.0",
75
+ "c8": "^10.1.2",
76
+ "dependency-check": "^5.0.0-7",
77
+ "eslint": "^8.56.0",
78
+ "eslint-config-standard": "^17.1.0",
79
+ "eslint-config-standard-jsx": "^11.0.0",
80
+ "eslint-import-resolver-typescript": "^3.6.1",
81
+ "eslint-plugin-import": "^2.29.1",
82
+ "eslint-plugin-jsdoc": "^48.2.7",
83
+ "eslint-plugin-n": "^16.6.2",
84
+ "eslint-plugin-promise": "^6.2.0",
85
+ "eslint-plugin-react": "^7.34.2",
86
+ "eslint-plugin-react-hooks": "^4.6.2",
87
+ "eslint-plugin-unicorn": "^48.0.1",
88
+ "husky": "^9.0.11",
89
+ "installed-check": "^9.3.0",
90
+ "mock-fs": "^5.2.0",
91
+ "nock": "^13.5.4",
92
+ "npm-run-all2": "^6.2.0",
93
+ "type-coverage": "^2.29.0",
94
+ "typescript": "~5.5.2"
95
+ },
96
+ "overrides": {
97
+ "@cyclonedx/cdxgen": {
98
+ "packageurl-js": "https://registry.npmjs.org/@jdalton/packageurl-js/-/packageurl-js-1.2.7.tgz"
99
+ }
100
+ },
101
+ "engines": {
102
+ "node": "^20.9.0 || >=21.1.0"
103
+ },
104
+
33
105
  "scripts": {
34
- "check:dependency-check": "dependency-check '*.js' 'lib/shadow/*.cjs' '*.mjs' 'test/**/*.js' --no-dev --ignore-module node:test --ignore-module node:assert/strict",
106
+ "check:dependency-check": "dependency-check '*.js' 'lib/shadow/*.cjs' '*.mjs' 'test/**/*.js' --no-dev --ignore-module node:* --ignore-module @cyclonedx/* --ignore-module synp",
35
107
  "check:installed-check": "installed-check -i eslint-plugin-jsdoc",
36
108
  "check:lint": "eslint --report-unused-disable-directives .",
37
109
  "check:tsc": "tsc",
@@ -40,62 +112,7 @@
40
112
  "prepare": "husky install",
41
113
  "test:unit": "c8 --reporter=lcov --reporter text node --test",
42
114
  "test-ci": "run-s test:*",
43
- "test": "run-s check test:*"
44
- },
45
- "devDependencies": {
46
- "@socketsecurity/eslint-config": "^3.0.1",
47
- "@tsconfig/node14": "^14.1.0",
48
- "@types/chai": "^4.3.3",
49
- "@types/chai-as-promised": "^7.1.5",
50
- "@types/micromatch": "^4.0.2",
51
- "@types/mocha": "^10.0.1",
52
- "@types/mock-fs": "^4.13.1",
53
- "@types/node": "^20.4.2",
54
- "@types/npm": "^7.19.0",
55
- "@types/npmcli__arborist": "^5.6.1",
56
- "@types/prompts": "^2.4.1",
57
- "@types/update-notifier": "^6.0.2",
58
- "@types/which": "^3.0.0",
59
- "@typescript-eslint/eslint-plugin": "^5.51.0",
60
- "@typescript-eslint/parser": "^5.51.0",
61
- "c8": "^8.0.0",
62
- "dependency-check": "^5.0.0-7",
63
- "eslint": "^8.34.0",
64
- "eslint-config-standard": "^17.0.0",
65
- "eslint-config-standard-jsx": "^11.0.0",
66
- "eslint-import-resolver-typescript": "^3.5.3",
67
- "eslint-plugin-import": "^2.27.5",
68
- "eslint-plugin-jsdoc": "^40.0.0",
69
- "eslint-plugin-n": "^15.6.1",
70
- "eslint-plugin-promise": "^6.1.1",
71
- "eslint-plugin-react": "^7.32.2",
72
- "eslint-plugin-react-hooks": "^4.6.0",
73
- "eslint-plugin-unicorn": "^45.0.2",
74
- "husky": "^8.0.1",
75
- "installed-check": "^6.0.5",
76
- "mock-fs": "^5.2.0",
77
- "nock": "^13.3.0",
78
- "npm-run-all2": "^6.0.2",
79
- "type-coverage": "^2.24.1",
80
- "typescript": "~5.1.6"
81
- },
82
- "dependencies": {
83
- "@apideck/better-ajv-errors": "^0.3.6",
84
- "@socketsecurity/config": "^2.0.0",
85
- "@socketsecurity/sdk": "^0.7.3",
86
- "chalk": "^5.1.2",
87
- "globby": "^13.1.3",
88
- "hpagent": "^1.2.0",
89
- "ignore": "^5.2.1",
90
- "ignore-by-default": "^2.1.0",
91
- "is-interactive": "^2.0.0",
92
- "is-unicode-supported": "^1.3.0",
93
- "meow": "^12.0.1",
94
- "ora": "^6.1.2",
95
- "pony-cause": "^2.1.8",
96
- "prompts": "^2.4.2",
97
- "terminal-link": "^3.0.0",
98
- "update-notifier": "^6.0.2",
99
- "which": "^3.0.0"
115
+ "test": "run-s check test:*",
116
+ "//postinstall": "node ./cli.js wrapper --postinstall"
100
117
  }
101
118
  }