@appland/scanner 1.33.1

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 (196) hide show
  1. package/LICENSE.txt +25 -0
  2. package/README.md +122 -0
  3. package/built/algorithms/dataStructures/graph/Graph.js +155 -0
  4. package/built/algorithms/dataStructures/graph/Graph.js.map +1 -0
  5. package/built/algorithms/dataStructures/graph/GraphEdge.js +27 -0
  6. package/built/algorithms/dataStructures/graph/GraphEdge.js.map +1 -0
  7. package/built/algorithms/dataStructures/graph/GraphVertex.js +79 -0
  8. package/built/algorithms/dataStructures/graph/GraphVertex.js.map +1 -0
  9. package/built/algorithms/dataStructures/linked-list/LinkedList.js +134 -0
  10. package/built/algorithms/dataStructures/linked-list/LinkedList.js.map +1 -0
  11. package/built/algorithms/dataStructures/linked-list/LinkedListNode.js +16 -0
  12. package/built/algorithms/dataStructures/linked-list/LinkedListNode.js.map +1 -0
  13. package/built/algorithms/graph/depth-first-search/index.js +49 -0
  14. package/built/algorithms/graph/depth-first-search/index.js.map +1 -0
  15. package/built/algorithms/graph/detect-cycle/index.js +77 -0
  16. package/built/algorithms/graph/detect-cycle/index.js.map +1 -0
  17. package/built/algorithms/utils/Comparator.js +35 -0
  18. package/built/algorithms/utils/Comparator.js.map +1 -0
  19. package/built/analyzer/recordSecrets.js +17 -0
  20. package/built/analyzer/recordSecrets.js.map +1 -0
  21. package/built/analyzer/secretsRegexes.js +13 -0
  22. package/built/analyzer/secretsRegexes.js.map +1 -0
  23. package/built/analyzer/secretsRegexesData.json +51 -0
  24. package/built/check.js +47 -0
  25. package/built/check.js.map +1 -0
  26. package/built/checkInstance.js +69 -0
  27. package/built/checkInstance.js.map +1 -0
  28. package/built/cli/ci/command.js +183 -0
  29. package/built/cli/ci/command.js.map +1 -0
  30. package/built/cli/ci/options.js +3 -0
  31. package/built/cli/ci/options.js.map +1 -0
  32. package/built/cli/exitCode.js +11 -0
  33. package/built/cli/exitCode.js.map +1 -0
  34. package/built/cli/progressReporter.js +16 -0
  35. package/built/cli/progressReporter.js.map +1 -0
  36. package/built/cli/resolveAppId.js +83 -0
  37. package/built/cli/resolveAppId.js.map +1 -0
  38. package/built/cli/scan/command.js +174 -0
  39. package/built/cli/scan/command.js.map +1 -0
  40. package/built/cli/scan/options.js +3 -0
  41. package/built/cli/scan/options.js.map +1 -0
  42. package/built/cli/scan/scanner.js +154 -0
  43. package/built/cli/scan/scanner.js.map +1 -0
  44. package/built/cli/scan.js +103 -0
  45. package/built/cli/scan.js.map +1 -0
  46. package/built/cli/scanArgs.js +26 -0
  47. package/built/cli/scanArgs.js.map +1 -0
  48. package/built/cli/scanOptions.js +3 -0
  49. package/built/cli/scanOptions.js.map +1 -0
  50. package/built/cli/upload/command.js +95 -0
  51. package/built/cli/upload/command.js.map +1 -0
  52. package/built/cli/upload/options.js +3 -0
  53. package/built/cli/upload/options.js.map +1 -0
  54. package/built/cli/validateFile.js +66 -0
  55. package/built/cli/validateFile.js.map +1 -0
  56. package/built/cli.js +32 -0
  57. package/built/cli.js.map +1 -0
  58. package/built/configuration/configurationProvider.js +169 -0
  59. package/built/configuration/configurationProvider.js.map +1 -0
  60. package/built/configuration/schema/match-pattern-config.json +32 -0
  61. package/built/configuration/schema/options.json +193 -0
  62. package/built/configuration/types/checkConfig.js +3 -0
  63. package/built/configuration/types/checkConfig.js.map +1 -0
  64. package/built/configuration/types/configuration.js +3 -0
  65. package/built/configuration/types/configuration.js.map +1 -0
  66. package/built/configuration/types/matchEventConfig.js +3 -0
  67. package/built/configuration/types/matchEventConfig.js.map +1 -0
  68. package/built/configuration/types/matchPatternConfig.js +3 -0
  69. package/built/configuration/types/matchPatternConfig.js.map +1 -0
  70. package/built/database/index.js +259 -0
  71. package/built/database/index.js.map +1 -0
  72. package/built/database/visit.js +80 -0
  73. package/built/database/visit.js.map +1 -0
  74. package/built/errors.js +35 -0
  75. package/built/errors.js.map +1 -0
  76. package/built/findings.js +15 -0
  77. package/built/findings.js.map +1 -0
  78. package/built/integration/appland/fetchStatus.js +51 -0
  79. package/built/integration/appland/fetchStatus.js.map +1 -0
  80. package/built/integration/appland/upload.js +193 -0
  81. package/built/integration/appland/upload.js.map +1 -0
  82. package/built/integration/github/commitStatus.js +19 -0
  83. package/built/integration/github/commitStatus.js.map +1 -0
  84. package/built/integration/vars.js +68 -0
  85. package/built/integration/vars.js.map +1 -0
  86. package/built/openapi/index.js +100 -0
  87. package/built/openapi/index.js.map +1 -0
  88. package/built/openapi/method.js +120 -0
  89. package/built/openapi/method.js.map +1 -0
  90. package/built/openapi/model.js +49 -0
  91. package/built/openapi/model.js.map +1 -0
  92. package/built/openapi/path.js +36 -0
  93. package/built/openapi/path.js.map +1 -0
  94. package/built/openapi/provider.js +133 -0
  95. package/built/openapi/provider.js.map +1 -0
  96. package/built/openapi/response.js +59 -0
  97. package/built/openapi/response.js.map +1 -0
  98. package/built/openapi/rpcRequest.js +130 -0
  99. package/built/openapi/rpcRequest.js.map +1 -0
  100. package/built/openapi/schema.js +42 -0
  101. package/built/openapi/schema.js.map +1 -0
  102. package/built/openapi/securitySchemes.js +32 -0
  103. package/built/openapi/securitySchemes.js.map +1 -0
  104. package/built/openapi/statusCodes.js +68 -0
  105. package/built/openapi/statusCodes.js.map +1 -0
  106. package/built/openapi/util.js +91 -0
  107. package/built/openapi/util.js.map +1 -0
  108. package/built/report/appMapMetadata.js +2 -0
  109. package/built/report/appMapMetadata.js.map +1 -0
  110. package/built/report/findingSummary.js +3 -0
  111. package/built/report/findingSummary.js.map +1 -0
  112. package/built/report/findingsReport.js +37 -0
  113. package/built/report/findingsReport.js.map +1 -0
  114. package/built/report/scanResults.js +103 -0
  115. package/built/report/scanResults.js.map +1 -0
  116. package/built/report/scanSummary.js +3 -0
  117. package/built/report/scanSummary.js.map +1 -0
  118. package/built/report/summaryReport.js +70 -0
  119. package/built/report/summaryReport.js.map +1 -0
  120. package/built/ruleChecker.js +260 -0
  121. package/built/ruleChecker.js.map +1 -0
  122. package/built/rules/authzBeforeAuthn.js +82 -0
  123. package/built/rules/authzBeforeAuthn.js.map +1 -0
  124. package/built/rules/circularDependency.js +227 -0
  125. package/built/rules/circularDependency.js.map +1 -0
  126. package/built/rules/http500.js +18 -0
  127. package/built/rules/http500.js.map +1 -0
  128. package/built/rules/illegalPackageDependency.js +38 -0
  129. package/built/rules/illegalPackageDependency.js.map +1 -0
  130. package/built/rules/incompatibleHttpClientRequest.js +96 -0
  131. package/built/rules/incompatibleHttpClientRequest.js.map +1 -0
  132. package/built/rules/insecureCompare.js +59 -0
  133. package/built/rules/insecureCompare.js.map +1 -0
  134. package/built/rules/jobNotCancelled.js +72 -0
  135. package/built/rules/jobNotCancelled.js.map +1 -0
  136. package/built/rules/lib/hasParameterOrReceiver.js +11 -0
  137. package/built/rules/lib/hasParameterOrReceiver.js.map +1 -0
  138. package/built/rules/lib/matchEvent.js +32 -0
  139. package/built/rules/lib/matchEvent.js.map +1 -0
  140. package/built/rules/lib/matchPattern.js +28 -0
  141. package/built/rules/lib/matchPattern.js.map +1 -0
  142. package/built/rules/lib/rpcWithoutProtection.js +40 -0
  143. package/built/rules/lib/rpcWithoutProtection.js.map +1 -0
  144. package/built/rules/missingAuthentication.js +65 -0
  145. package/built/rules/missingAuthentication.js.map +1 -0
  146. package/built/rules/missingContentType.js +27 -0
  147. package/built/rules/missingContentType.js.map +1 -0
  148. package/built/rules/nPlusOneQuery.js +84 -0
  149. package/built/rules/nPlusOneQuery.js.map +1 -0
  150. package/built/rules/queryFromInvalidPackage.js +37 -0
  151. package/built/rules/queryFromInvalidPackage.js.map +1 -0
  152. package/built/rules/queryFromView.js +29 -0
  153. package/built/rules/queryFromView.js.map +1 -0
  154. package/built/rules/rpcWithoutCircuitBreaker.js +97 -0
  155. package/built/rules/rpcWithoutCircuitBreaker.js.map +1 -0
  156. package/built/rules/saveWithoutValidation.js +27 -0
  157. package/built/rules/saveWithoutValidation.js.map +1 -0
  158. package/built/rules/secretInLog.js +76 -0
  159. package/built/rules/secretInLog.js.map +1 -0
  160. package/built/rules/slowFunctionCall.js +37 -0
  161. package/built/rules/slowFunctionCall.js.map +1 -0
  162. package/built/rules/slowHttpServerRequest.js +24 -0
  163. package/built/rules/slowHttpServerRequest.js.map +1 -0
  164. package/built/rules/slowQuery.js +23 -0
  165. package/built/rules/slowQuery.js.map +1 -0
  166. package/built/rules/tooManyJoins.js +77 -0
  167. package/built/rules/tooManyJoins.js.map +1 -0
  168. package/built/rules/tooManyUpdates.js +143 -0
  169. package/built/rules/tooManyUpdates.js.map +1 -0
  170. package/built/rules/unbatchedMaterializedQuery.js +65 -0
  171. package/built/rules/unbatchedMaterializedQuery.js.map +1 -0
  172. package/built/rules/updateInGetRequest.js +66 -0
  173. package/built/rules/updateInGetRequest.js.map +1 -0
  174. package/built/rules/util.js +102 -0
  175. package/built/rules/util.js.map +1 -0
  176. package/built/sampleConfig/bike_index.yml +10 -0
  177. package/built/sampleConfig/default.yml +19 -0
  178. package/built/sampleConfig/railsSampleApp6thEd.yml +29 -0
  179. package/built/sampleConfig/solidus.yml +31 -0
  180. package/built/scope/commandScope.js +156 -0
  181. package/built/scope/commandScope.js.map +1 -0
  182. package/built/scope/httpClientRequestScope.js +105 -0
  183. package/built/scope/httpClientRequestScope.js.map +1 -0
  184. package/built/scope/httpServerRequestScope.js +105 -0
  185. package/built/scope/httpServerRequestScope.js.map +1 -0
  186. package/built/scope/rootScope.js +105 -0
  187. package/built/scope/rootScope.js.map +1 -0
  188. package/built/scope/scopeImpl.js +88 -0
  189. package/built/scope/scopeImpl.js.map +1 -0
  190. package/built/scope/scopeIterator.js +21 -0
  191. package/built/scope/scopeIterator.js.map +1 -0
  192. package/built/scope/sqlTransactionScope.js +175 -0
  193. package/built/scope/sqlTransactionScope.js.map +1 -0
  194. package/built/wellKnownLabels.js +9 -0
  195. package/built/wellKnownLabels.js.map +1 -0
  196. package/package.json +89 -0
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var promises_1 = require("fs/promises");
43
+ var upload_1 = __importDefault(require("../../integration/appland/upload"));
44
+ var util_1 = require("../../rules/util");
45
+ var validateFile_1 = __importDefault(require("../validateFile"));
46
+ var resolveAppId_1 = __importDefault(require("../resolveAppId"));
47
+ exports.default = {
48
+ command: 'upload',
49
+ describe: 'Upload Findings to the AppMap Server',
50
+ builder: function (args) {
51
+ args.option('appmap-dir', {
52
+ describe: 'base directory of AppMaps',
53
+ alias: 'd',
54
+ });
55
+ args.option('report-file', {
56
+ describe: 'file containing the findings report',
57
+ default: 'appland-findings.json',
58
+ });
59
+ args.option('app', {
60
+ describe: 'name of the app to publish the findings for. By default, this is determined by looking in appmap.yml',
61
+ });
62
+ return args.strict();
63
+ },
64
+ handler: function (options) {
65
+ return __awaiter(this, void 0, void 0, function () {
66
+ var _a, isVerbose, reportFile, appmapDir, appIdArg, appId, scanResults, _b, _c;
67
+ return __generator(this, function (_d) {
68
+ switch (_d.label) {
69
+ case 0:
70
+ _a = options, isVerbose = _a.verbose, reportFile = _a.reportFile, appmapDir = _a.appmapDir, appIdArg = _a.app;
71
+ if (isVerbose) {
72
+ (0, util_1.verbose)(true);
73
+ }
74
+ if (!appmapDir) return [3 /*break*/, 2];
75
+ return [4 /*yield*/, (0, validateFile_1.default)('directory', appmapDir)];
76
+ case 1:
77
+ _d.sent();
78
+ _d.label = 2;
79
+ case 2: return [4 /*yield*/, (0, resolveAppId_1.default)(appIdArg, appmapDir)];
80
+ case 3:
81
+ appId = _d.sent();
82
+ _c = (_b = JSON).parse;
83
+ return [4 /*yield*/, (0, promises_1.readFile)(reportFile)];
84
+ case 4:
85
+ scanResults = _c.apply(_b, [(_d.sent()).toString()]);
86
+ return [4 /*yield*/, (0, upload_1.default)(scanResults, appId)];
87
+ case 5:
88
+ _d.sent();
89
+ return [2 /*return*/];
90
+ }
91
+ });
92
+ });
93
+ },
94
+ };
95
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/cli/upload/command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAuC;AAEvC,4EAAsD;AAEtD,yCAA2C;AAE3C,iEAA2C;AAG3C,iEAA2C;AAE3C,kBAAe;IACb,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,sCAAsC;IAChD,OAAO,EAAP,UAAQ,IAAU;QAChB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;YACxB,QAAQ,EAAE,2BAA2B;YACrC,KAAK,EAAE,GAAG;SACX,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,QAAQ,EAAE,qCAAqC;YAC/C,OAAO,EAAE,uBAAuB;SACjC,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;YACjB,QAAQ,EACN,sGAAsG;SACzG,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IACK,OAAO,EAAb,UAAc,OAAkB;;;;;;wBACxB,KAKF,OAAoC,EAJ7B,SAAS,aAAA,EAClB,UAAU,gBAAA,EACV,SAAS,eAAA,EACJ,QAAQ,SAAA,CAC0B;wBAEzC,IAAI,SAAS,EAAE;4BACb,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC;yBACf;6BAEG,SAAS,EAAT,wBAAS;wBAAE,qBAAM,IAAA,sBAAY,EAAC,WAAW,EAAE,SAAU,CAAC,EAAA;;wBAA3C,SAA2C,CAAC;;4BAC7C,qBAAM,IAAA,sBAAY,EAAC,QAAQ,EAAE,SAAS,CAAC,EAAA;;wBAA/C,KAAK,GAAG,SAAuC;wBAEjC,KAAA,CAAA,KAAA,IAAI,CAAA,CAAC,KAAK,CAAA;wBAAE,qBAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,EAAA;;wBAApD,WAAW,GAAG,cAAW,CAAC,SAA0B,CAAC,CAAC,QAAQ,EAAE,EAAgB;wBACtF,qBAAM,IAAA,gBAAM,EAAC,WAAW,EAAE,KAAK,CAAC,EAAA;;wBAAhC,SAAgC,CAAC;;;;;KAClC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/cli/upload/options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var chalk_1 = __importDefault(require("chalk"));
43
+ var fs_1 = require("fs");
44
+ var promises_1 = require("fs/promises");
45
+ var errors_1 = require("../errors");
46
+ function default_1(kind, path) {
47
+ return __awaiter(this, void 0, void 0, function () {
48
+ var _a;
49
+ return __generator(this, function (_b) {
50
+ switch (_b.label) {
51
+ case 0:
52
+ _b.trys.push([0, 2, , 3]);
53
+ return [4 /*yield*/, (0, promises_1.access)(path, fs_1.constants.R_OK)];
54
+ case 1:
55
+ _b.sent();
56
+ return [3 /*break*/, 3];
57
+ case 2:
58
+ _a = _b.sent();
59
+ throw new errors_1.ValidationError("AppMap " + kind + " " + chalk_1.default.red(path) + " does not exist, or is not readable.");
60
+ case 3: return [2 /*return*/];
61
+ }
62
+ });
63
+ });
64
+ }
65
+ exports.default = default_1;
66
+ //# sourceMappingURL=validateFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateFile.js","sourceRoot":"","sources":["../../src/cli/validateFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,yBAAwD;AACxD,wCAAqC;AACrC,oCAA4C;AAE5C,mBAA+B,IAAY,EAAE,IAAY;;;;;;;oBAErD,qBAAM,IAAA,iBAAM,EAAC,IAAgB,EAAE,cAAW,CAAC,IAAI,CAAC,EAAA;;oBAAhD,SAAgD,CAAC;;;;oBAEjD,MAAM,IAAI,wBAAe,CACvB,YAAU,IAAI,SAAI,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,yCAAsC,CACxE,CAAC;;;;;CAEL;AARD,4BAQC"}
package/built/cli.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var yargs_1 = __importDefault(require("yargs"));
8
+ var command_1 = __importDefault(require("./cli/scan/command"));
9
+ var command_2 = __importDefault(require("./cli/upload/command"));
10
+ var command_3 = __importDefault(require("./cli/ci/command"));
11
+ (0, yargs_1.default)(process.argv.slice(2))
12
+ .option('verbose', {
13
+ describe: 'Show verbose output',
14
+ alias: 'v',
15
+ })
16
+ .command(command_1.default)
17
+ .command(command_2.default)
18
+ .command(command_3.default)
19
+ .fail(function (msg, err, yargs) {
20
+ if (msg) {
21
+ console.log(yargs.help());
22
+ console.log(msg);
23
+ }
24
+ else if (err) {
25
+ console.error(err);
26
+ }
27
+ process.exit(1);
28
+ })
29
+ .strict()
30
+ .demandCommand()
31
+ .help().argv;
32
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,gDAA0B;AAC1B,+DAA6C;AAC7C,iEAAiD;AACjD,6DAAyC;AAEzC,IAAA,eAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACzB,MAAM,CAAC,SAAS,EAAE;IACjB,QAAQ,EAAE,qBAAqB;IAC/B,KAAK,EAAE,GAAG;CACX,CAAC;KACD,OAAO,CAAC,iBAAW,CAAC;KACpB,OAAO,CAAC,iBAAa,CAAC;KACtB,OAAO,CAAC,iBAAS,CAAC;KAClB,IAAI,CAAC,UAAC,GAAG,EAAE,GAAG,EAAE,KAAK;IACpB,IAAI,GAAG,EAAE;QACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAClB;SAAM,IAAI,GAAG,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACpB;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;KACD,MAAM,EAAE;KACR,aAAa,EAAE;KACf,IAAI,EAAE,CAAC,IAAI,CAAC"}
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __generator = (this && this.__generator) || function (thisArg, body) {
31
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
33
+ function verb(n) { return function (v) { return step([n, v]); }; }
34
+ function step(op) {
35
+ if (f) throw new TypeError("Generator is already executing.");
36
+ while (_) try {
37
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
38
+ if (y = 0, t) op = [op[0] & 2, t.value];
39
+ switch (op[0]) {
40
+ case 0: case 1: t = op; break;
41
+ case 4: _.label++; return { value: op[1], done: false };
42
+ case 5: _.label++; y = op[1]; op = [0]; continue;
43
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
44
+ default:
45
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
46
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
47
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
48
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
49
+ if (t[2]) _.ops.pop();
50
+ _.trys.pop(); continue;
51
+ }
52
+ op = body.call(thisArg, _);
53
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
54
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
+ }
56
+ };
57
+ var __importDefault = (this && this.__importDefault) || function (mod) {
58
+ return (mod && mod.__esModule) ? mod : { "default": mod };
59
+ };
60
+ Object.defineProperty(exports, "__esModule", { value: true });
61
+ exports.parseConfigFile = exports.loadConfig = void 0;
62
+ var ajv_1 = __importDefault(require("ajv"));
63
+ var js_yaml_1 = __importDefault(require("js-yaml"));
64
+ var fs_1 = require("fs");
65
+ var options_json_1 = __importDefault(require("./schema/options.json"));
66
+ var match_pattern_config_json_1 = __importDefault(require("./schema/match-pattern-config.json"));
67
+ var util_1 = require("../rules/util");
68
+ var matchEvent_1 = require("../rules/lib/matchEvent");
69
+ var check_1 = __importDefault(require("../check"));
70
+ var ajv = new ajv_1.default();
71
+ ajv.addSchema(match_pattern_config_json_1.default);
72
+ function buildBuiltinCheck(config) {
73
+ return __awaiter(this, void 0, void 0, function () {
74
+ var rule, options, check;
75
+ return __generator(this, function (_a) {
76
+ switch (_a.label) {
77
+ case 0: return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require("../rules/" + config.rule)); })];
78
+ case 1:
79
+ rule = (_a.sent()).default;
80
+ if (rule.Options) {
81
+ options = new rule.Options();
82
+ }
83
+ else {
84
+ options = {};
85
+ }
86
+ if (config.properties) {
87
+ Object.keys(config.properties).forEach(function (name) {
88
+ var value = config.properties[name];
89
+ options[name] = value;
90
+ });
91
+ }
92
+ check = new check_1.default(rule, options);
93
+ if (config.scope) {
94
+ check.scope = config.scope;
95
+ }
96
+ if (config.id) {
97
+ check.id = config.id;
98
+ }
99
+ check.includeScope = (0, matchEvent_1.buildFilters)((config.include || []).filter(function (item) { return item.scope; }).map(function (item) { return item.scope; }));
100
+ check.excludeScope = (0, matchEvent_1.buildFilters)((config.exclude || []).filter(function (item) { return item.scope; }).map(function (item) { return item.scope; }));
101
+ check.includeEvent = (0, matchEvent_1.buildFilters)((config.include || []).filter(function (item) { return item.event; }).map(function (item) { return item.event; }));
102
+ check.excludeEvent = (0, matchEvent_1.buildFilters)((config.exclude || []).filter(function (item) { return item.event; }).map(function (item) { return item.event; }));
103
+ return [2 /*return*/, check];
104
+ }
105
+ });
106
+ });
107
+ }
108
+ var validate = function (validator, data, context) {
109
+ var valid = validator(data);
110
+ if (!valid) {
111
+ throw new Error(validator
112
+ .errors.map(function (err) {
113
+ var instance = err.instancePath;
114
+ if (!instance || instance === '') {
115
+ instance = context;
116
+ }
117
+ return instance + " " + err.message + " (" + err.schemaPath + ")";
118
+ })
119
+ .join(', '));
120
+ }
121
+ };
122
+ function loadConfig(config) {
123
+ return __awaiter(this, void 0, void 0, function () {
124
+ var _this = this;
125
+ return __generator(this, function (_a) {
126
+ config.checks
127
+ .filter(function (check) { return check.properties; })
128
+ .forEach(function (check) {
129
+ var ruleId = check.rule;
130
+ var schemaKey = [(0, util_1.capitalize)(ruleId), 'Options'].join('.');
131
+ if ((0, util_1.verbose)()) {
132
+ console.warn(schemaKey);
133
+ }
134
+ var propertiesSchema = options_json_1.default.definitions[schemaKey];
135
+ if (!propertiesSchema) {
136
+ return;
137
+ }
138
+ if ((0, util_1.verbose)()) {
139
+ console.warn(propertiesSchema);
140
+ console.warn(check.properties);
141
+ }
142
+ validate(ajv.compile(propertiesSchema), check.properties || {}, ruleId + " properties");
143
+ });
144
+ return [2 /*return*/, Promise.all(config.checks.map(function (c) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
145
+ return [2 /*return*/, buildBuiltinCheck(c)];
146
+ }); }); }))];
147
+ });
148
+ });
149
+ }
150
+ exports.loadConfig = loadConfig;
151
+ function parseConfigFile(configPath) {
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var yamlConfig;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0:
157
+ console.log("Using scanner configuration file " + configPath);
158
+ return [4 /*yield*/, fs_1.promises.readFile(configPath, 'utf-8')];
159
+ case 1:
160
+ yamlConfig = _a.sent();
161
+ return [2 /*return*/, js_yaml_1.default.load(yamlConfig, {
162
+ filename: configPath,
163
+ })];
164
+ }
165
+ });
166
+ });
167
+ }
168
+ exports.parseConfigFile = parseConfigFile;
169
+ //# sourceMappingURL=configurationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configurationProvider.js","sourceRoot":"","sources":["../../src/configuration/configurationProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4CAAsB;AACtB,oDAA2B;AAC3B,yBAAoC;AAEpC,uEAAmD;AACnD,iGAA6E;AAC7E,sCAAoD;AACpD,sDAAgF;AAGhF,mDAA6B;AAE7B,IAAM,GAAG,GAAG,IAAI,aAAG,EAAE,CAAC;AACtB,GAAG,CAAC,SAAS,CAAC,mCAA2B,CAAC,CAAC;AAE3C,SAAe,iBAAiB,CAAC,MAAmB;;;;;wBAC9B,sFAAa,cAAY,MAAM,CAAC,IAAM,QAAC;;oBAArD,IAAI,GAAS,CAAC,SAAuC,CAAC,CAAC,OAAO;oBAGpE,IAAI,IAAI,CAAC,OAAO,EAAE;wBAChB,OAAO,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;qBAC9B;yBAAM;wBACL,OAAO,GAAG,EAAE,CAAC;qBACd;oBACD,IAAI,MAAM,CAAC,UAAU,EAAE;wBACrB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;4BAC1C,IAAM,KAAK,GAAG,MAAM,CAAC,UAAW,CAAC,IAAI,CAAC,CAAC;4BACvC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;wBACxB,CAAC,CAAC,CAAC;qBACJ;oBAEK,KAAK,GAAG,IAAI,eAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;oBAEvC,IAAI,MAAM,CAAC,KAAK,EAAE;wBAChB,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAkB,CAAC;qBACzC;oBAED,IAAI,MAAM,CAAC,EAAE,EAAE;wBACb,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;qBACtB;oBAED,KAAK,CAAC,YAAY,GAAG,IAAA,yBAAqB,EACxC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAM,EAAX,CAAW,CAAC,CAC/E,CAAC;oBACF,KAAK,CAAC,YAAY,GAAG,IAAA,yBAAqB,EACxC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAM,EAAX,CAAW,CAAC,CAC/E,CAAC;oBACF,KAAK,CAAC,YAAY,GAAG,IAAA,yBAAqB,EACxC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAM,EAAX,CAAW,CAAC,CAC/E,CAAC;oBACF,KAAK,CAAC,YAAY,GAAG,IAAA,yBAAqB,EACxC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAV,CAAU,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAM,EAAX,CAAW,CAAC,CAC/E,CAAC;oBAEF,sBAAO,KAAK,EAAC;;;;CACd;AAED,IAAM,QAAQ,GAAG,UAAC,SAA2B,EAAE,IAAS,EAAE,OAAe;IACvE,IAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CACb,SAAS;aACN,MAAO,CAAC,GAAG,CAAC,UAAC,GAAG;YACf,IAAI,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;YAChC,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,EAAE,EAAE;gBAChC,QAAQ,GAAG,OAAO,CAAC;aACpB;YACD,OAAU,QAAQ,SAAI,GAAG,CAAC,OAAO,UAAK,GAAG,CAAC,UAAU,MAAG,CAAC;QAC1D,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CACd,CAAC;KACH;AACH,CAAC,CAAC;AAEF,SAAsB,UAAU,CAAC,MAAqB;;;;YACpD,MAAM,CAAC,MAAM;iBACV,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,CAAC;iBACnC,OAAO,CAAC,UAAC,KAAK;gBACb,IAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;gBAC1B,IAAM,SAAS,GAAG,CAAC,IAAA,iBAAU,EAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC5D,IAAI,IAAA,cAAO,GAAE,EAAE;oBACb,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACzB;gBACD,IAAM,gBAAgB,GAAI,sBAAc,CAAC,WAAmC,CAAC,SAAS,CAAC,CAAC;gBACxF,IAAI,CAAC,gBAAgB,EAAE;oBACrB,OAAO;iBACR;gBACD,IAAI,IAAA,cAAO,GAAE,EAAE;oBACb,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;oBAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;iBAChC;gBACD,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE,EAAK,MAAM,gBAAa,CAAC,CAAC;YAC1F,CAAC,CAAC,CAAC;YAEL,sBAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAO,CAAc;oBAAK,sBAAA,iBAAiB,CAAC,CAAC,CAAC,EAAA;yBAAA,CAAC,CAAC,EAAC;;;CACvF;AArBD,gCAqBC;AAED,SAAsB,eAAe,CAAC,UAAkB;;;;;;oBACtD,OAAO,CAAC,GAAG,CAAC,sCAAoC,UAAY,CAAC,CAAC;oBAC3C,qBAAM,aAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA;;oBAAnD,UAAU,GAAG,SAAsC;oBACzD,sBAAO,iBAAI,CAAC,IAAI,CAAC,UAAU,EAAE;4BAC3B,QAAQ,EAAE,UAAU;yBACrB,CAAkB,EAAC;;;;CACrB;AAND,0CAMC"}
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://appland.com/schemas/scanner/match-pattern-config.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "additionalProperties": false,
7
+ "ignoreCase": {
8
+ "type": "boolean",
9
+ "default": false
10
+ },
11
+ "equal": {
12
+ "type": "string"
13
+ },
14
+ "include": {
15
+ "type": "string"
16
+ },
17
+ "match": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "oneOf": [
22
+ {
23
+ "required": ["match"]
24
+ },
25
+ {
26
+ "required": ["include"]
27
+ },
28
+ {
29
+ "required": ["equal"]
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,193 @@
1
+ {
2
+ "$id": "https://appland.com/schemas/scanner/options.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "CircularDependency.Options": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "depth": {
9
+ "type": "number"
10
+ },
11
+ "ignoredPackages": {
12
+ "items": {
13
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
14
+ },
15
+ "type": "array"
16
+ }
17
+ },
18
+ "type": "object"
19
+ },
20
+ "IllegalPackageDependency.Options": {
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "calleePackage": {
24
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
25
+ },
26
+ "callerPackages": {
27
+ "items": {
28
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
29
+ },
30
+ "type": "array"
31
+ }
32
+ },
33
+ "required": [
34
+ "callerPackages",
35
+ "calleePackage"
36
+ ],
37
+ "type": "object"
38
+ },
39
+ "IncompatibleHttpClientRequest.Options": {
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "schemata": {
43
+ "additionalProperties": {
44
+ "type": "string"
45
+ },
46
+ "type": "object"
47
+ }
48
+ },
49
+ "required": [
50
+ "schemata"
51
+ ],
52
+ "type": "object"
53
+ },
54
+ "MissingAuthentication.Options": {
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "excludeContentTypes": {
58
+ "items": {
59
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
60
+ },
61
+ "type": "array"
62
+ },
63
+ "includeContentTypes": {
64
+ "items": {
65
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
66
+ },
67
+ "type": "array"
68
+ }
69
+ },
70
+ "type": "object"
71
+ },
72
+ "NPlusOneQuery.Options": {
73
+ "additionalProperties": false,
74
+ "properties": {
75
+ "errorLimit": {
76
+ "type": "number"
77
+ },
78
+ "warningLimit": {
79
+ "type": "number"
80
+ }
81
+ },
82
+ "type": "object"
83
+ },
84
+ "QueryFromInvalidPackage.Options": {
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "allowedPackages": {
88
+ "items": {
89
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
90
+ },
91
+ "type": "array"
92
+ },
93
+ "allowedQueries": {
94
+ "items": {
95
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
96
+ },
97
+ "type": "array"
98
+ }
99
+ },
100
+ "required": [
101
+ "allowedPackages"
102
+ ],
103
+ "type": "object"
104
+ },
105
+ "QueryFromView.Options": {
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "forbiddenLabel": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "type": "object"
113
+ },
114
+ "RPCWithoutCircuitBreaker.Options": {
115
+ "additionalProperties": false,
116
+ "properties": {
117
+ "expectedLabel": {
118
+ "type": "string"
119
+ }
120
+ },
121
+ "type": "object"
122
+ },
123
+ "SlowFunctionCall.Options": {
124
+ "additionalProperties": false,
125
+ "properties": {
126
+ "functions": {
127
+ "items": {
128
+ "$ref": "https://appland.com/schemas/scanner/match-pattern-config.json"
129
+ },
130
+ "type": "array"
131
+ },
132
+ "timeAllowed": {
133
+ "type": "number"
134
+ }
135
+ },
136
+ "type": "object"
137
+ },
138
+ "SlowHTTPServerRequest.Options": {
139
+ "additionalProperties": false,
140
+ "properties": {
141
+ "timeAllowed": {
142
+ "type": "number"
143
+ }
144
+ },
145
+ "type": "object"
146
+ },
147
+ "SlowQuery.Options": {
148
+ "additionalProperties": false,
149
+ "properties": {
150
+ "timeAllowed": {
151
+ "type": "number"
152
+ }
153
+ },
154
+ "type": "object"
155
+ },
156
+ "TimeAllowed": {
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "timeAllowed": {
160
+ "type": "number"
161
+ }
162
+ },
163
+ "type": "object"
164
+ },
165
+ "TooManyJoins.Options": {
166
+ "additionalProperties": false,
167
+ "properties": {
168
+ "warningLimit": {
169
+ "type": "number"
170
+ }
171
+ },
172
+ "type": "object"
173
+ },
174
+ "TooManyUpdates.Options": {
175
+ "additionalProperties": false,
176
+ "properties": {
177
+ "warningLimit": {
178
+ "type": "number"
179
+ }
180
+ },
181
+ "type": "object"
182
+ },
183
+ "WarningLimit": {
184
+ "additionalProperties": false,
185
+ "properties": {
186
+ "warningLimit": {
187
+ "type": "number"
188
+ }
189
+ },
190
+ "type": "object"
191
+ }
192
+ }
193
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=checkConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkConfig.js","sourceRoot":"","sources":["../../../src/configuration/types/checkConfig.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/configuration/types/configuration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=matchEventConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchEventConfig.js","sourceRoot":"","sources":["../../../src/configuration/types/matchEventConfig.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=matchPatternConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchPatternConfig.js","sourceRoot":"","sources":["../../../src/configuration/types/matchPatternConfig.ts"],"names":[],"mappings":""}