@appland/scanner 1.38.0 → 1.39.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.
package/README.md
CHANGED
|
@@ -4,8 +4,6 @@ Code scanning, linting, assertions and alerts.
|
|
|
4
4
|
|
|
5
5
|
Provides consistent ways to filter (include and exclude) the AppMap events and property values.
|
|
6
6
|
|
|
7
|
-
# Rule configuration
|
|
8
|
-
|
|
9
7
|
## Event filters
|
|
10
8
|
|
|
11
9
|
Two standard event filters are provided that can be used with every rule: `include` and `exclude`.
|
|
@@ -63,6 +61,262 @@ The configuration YAML is validated against the rule schema before the scan is r
|
|
|
63
61
|
the configuration are reported, and must be fixed before the scan can continue. Consult the
|
|
64
62
|
documentation for each rule to see it's pattern filters and other configurable properties.
|
|
65
63
|
|
|
64
|
+
## Finding hash
|
|
65
|
+
|
|
66
|
+
To enable de-duplication of findings, a hash is calculated for each finding. The hash is the
|
|
67
|
+
`sha256` digest of a canonical content string for the finding. The canonical content string combines
|
|
68
|
+
stable data from the finding, such as the rule id, normalized event, etc. See
|
|
69
|
+
[appmap-js/packages/models/src/event/hash.js](https://github.com/applandinc/appmap-js/blob/959a8c93c9be37d40a8f4a0e7d44ee211730641e/packages/models/src/event/hash.js)
|
|
70
|
+
for details.
|
|
71
|
+
|
|
72
|
+
## Findings output file
|
|
73
|
+
|
|
74
|
+
### `summary`
|
|
75
|
+
|
|
76
|
+
Summarizes key information about the scan, including: number of AppMaps scanned, number of checks
|
|
77
|
+
performed, list of rules utilized, list of labels utilized, number of findings, and an enumeration
|
|
78
|
+
of all the distinct values in AppMap metadata.
|
|
79
|
+
|
|
80
|
+
_Example_
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
"summary": {
|
|
84
|
+
"numAppMaps": 507,
|
|
85
|
+
"numChecks": 8112,
|
|
86
|
+
"rules": [
|
|
87
|
+
"authz-before-authn",
|
|
88
|
+
...
|
|
89
|
+
"update-in-get-request"
|
|
90
|
+
],
|
|
91
|
+
"ruleLabels": [
|
|
92
|
+
"audit",
|
|
93
|
+
...
|
|
94
|
+
"security.logout"
|
|
95
|
+
],
|
|
96
|
+
"numFindings": 91,
|
|
97
|
+
"appMapMetadata": {
|
|
98
|
+
"labels": [],
|
|
99
|
+
"apps": [
|
|
100
|
+
"appland/appmap-server"
|
|
101
|
+
],
|
|
102
|
+
"clients": [
|
|
103
|
+
{
|
|
104
|
+
"name": "appmap",
|
|
105
|
+
"url": "https://github.com/applandinc/appmap-ruby",
|
|
106
|
+
"version": "0.70.2"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"frameworks": [
|
|
110
|
+
{
|
|
111
|
+
"name": "rails",
|
|
112
|
+
"version": "6.1.4.1"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "rspec",
|
|
116
|
+
"version": "3.10.1"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"git": [
|
|
120
|
+
{
|
|
121
|
+
"repository": "git@github.com:applandinc/appmap-server.git",
|
|
122
|
+
"branch": "master",
|
|
123
|
+
"commit": "3b028018ec1f84e2c351d01d1dac45aeeae887b6"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"repository": "git@github.com:applandinc/appmap-server.git",
|
|
127
|
+
"branch": "master",
|
|
128
|
+
"commit": "3b028018ec1f84e2c351d01d1dac45aeeae887b6",
|
|
129
|
+
"status": [
|
|
130
|
+
"D .npmrc",
|
|
131
|
+
"M appmap.yml",
|
|
132
|
+
"M package-lock.json",
|
|
133
|
+
"M package.json"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"languages": [
|
|
138
|
+
{
|
|
139
|
+
"name": "ruby",
|
|
140
|
+
"engine": "ruby",
|
|
141
|
+
"version": "3.0.1"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"recorders": [
|
|
145
|
+
{
|
|
146
|
+
"name": "rspec"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"testStatuses": [],
|
|
150
|
+
"exceptions": []
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### `configuration`
|
|
156
|
+
|
|
157
|
+
Provides the configuration file, as JSON, that was used to configure the scanner.
|
|
158
|
+
|
|
159
|
+
_Example_
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
"configuration": {
|
|
163
|
+
"checks": [
|
|
164
|
+
{
|
|
165
|
+
"rule": "authzBeforeAuthn"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"rule": "circularDependency",
|
|
169
|
+
"properties": {
|
|
170
|
+
"ignoredPackages": [
|
|
171
|
+
{
|
|
172
|
+
"equal": "app/models/concerns"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"equal": "app/controllers/concerns"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"rule": "http500"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### `appMapMetadata`
|
|
188
|
+
|
|
189
|
+
Contains the metadata for each AppMap that was scanned. `appMapMetadata` is a JSON object, whose
|
|
190
|
+
keys are AppMap file names, and values are AppMap metadata objects. Each metadata object contains
|
|
191
|
+
all the metadata values, _except_ for those values which are the same across all AppMaps. Those
|
|
192
|
+
values can be found in `summary.appMapMetadata`. For example, using the `summary` example given
|
|
193
|
+
above, the `app`, `labels`, `languages`, `recorders`, `testStatuses` and `exceptions` will all be
|
|
194
|
+
omitted from `appMapMetadata`.
|
|
195
|
+
|
|
196
|
+
_Example_
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
"appMapMetadata": {
|
|
200
|
+
"tmp/appmap/rspec/API_APIKeysController_create_a_new_api_key.appmap.json": {
|
|
201
|
+
"client": {
|
|
202
|
+
"name": "appmap",
|
|
203
|
+
"url": "https://github.com/applandinc/appmap-ruby",
|
|
204
|
+
"version": "0.70.1"
|
|
205
|
+
},
|
|
206
|
+
"git": {
|
|
207
|
+
"repository": "git@github.com:applandinc/appmap-server.git",
|
|
208
|
+
"branch": "master",
|
|
209
|
+
"commit": "3b028018ec1f84e2c351d01d1dac45aeeae887b6"
|
|
210
|
+
},
|
|
211
|
+
"name": "API::APIKeysController create a new api key",
|
|
212
|
+
"source_location": "spec/requests/api_api_keys_spec.rb",
|
|
213
|
+
"test_status": "succeeded",
|
|
214
|
+
...
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### `checks`
|
|
220
|
+
|
|
221
|
+
Lists the configured checks that were performed on each AppMap. Each entry is a Check object that
|
|
222
|
+
includes the properties of the check as configured by the `configuration`.
|
|
223
|
+
|
|
224
|
+
_Example_
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
"checks": [
|
|
228
|
+
{
|
|
229
|
+
"rule": {
|
|
230
|
+
"id": "authz-before-authn",
|
|
231
|
+
"title": "Authorization performed before authentication",
|
|
232
|
+
"labels": [
|
|
233
|
+
"security.authorization",
|
|
234
|
+
"security.authentication"
|
|
235
|
+
],
|
|
236
|
+
"scope": "http_server_request",
|
|
237
|
+
"impactDomain": "Security",
|
|
238
|
+
"enumerateScope": false,
|
|
239
|
+
"references": {
|
|
240
|
+
"CWE-863": "https://cwe.mitre.org/data/definitions/863.html"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"id": "authz-before-authn",
|
|
244
|
+
"options": {},
|
|
245
|
+
"scope": "http_server_request",
|
|
246
|
+
"includeScope": [],
|
|
247
|
+
"excludeScope": [],
|
|
248
|
+
"includeEvent": [],
|
|
249
|
+
"excludeEvent": []
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"rule": {
|
|
253
|
+
"id": "circular-dependency",
|
|
254
|
+
"title": "Circular package dependency",
|
|
255
|
+
"scope": "command",
|
|
256
|
+
"impactDomain": "Maintainability",
|
|
257
|
+
"references": {
|
|
258
|
+
"CWE-1047": "https://cwe.mitre.org/data/definitions/1047.html"
|
|
259
|
+
},
|
|
260
|
+
"enumerateScope": false
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### `findings`
|
|
267
|
+
|
|
268
|
+
Lists the findings that are reported by this scan. Findings are de-duplicated by comparing their
|
|
269
|
+
`hash` values. Therefore, each unique finding hash is only reported once.
|
|
270
|
+
|
|
271
|
+
Note that the `appMapFile` of each finding will be available in the `appMapMetadata` section of the
|
|
272
|
+
findings JSON document. Similarly, details of the `checkId` can be obtained from the `checks`
|
|
273
|
+
section.
|
|
274
|
+
|
|
275
|
+
_Example_
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
"findings": [
|
|
279
|
+
{
|
|
280
|
+
"appMapFile": "tmp/appmap/rspec/API_ScannerJobsController_create_logged_in_uploads_a_scanner_job_from_a_tarball.appmap.json",
|
|
281
|
+
"checkId": "slow-function-call",
|
|
282
|
+
"ruleId": "slow-function-call",
|
|
283
|
+
"ruleTitle": "Slow function call",
|
|
284
|
+
"event": {
|
|
285
|
+
"id": 125,
|
|
286
|
+
"event": "call",
|
|
287
|
+
"thread_id": 76340,
|
|
288
|
+
"defined_class": "Scanner",
|
|
289
|
+
"method_id": "publish_from_upload",
|
|
290
|
+
"path": "app/models/scanner.rb",
|
|
291
|
+
"lineno": 397,
|
|
292
|
+
"static": true,
|
|
293
|
+
"receiver": {
|
|
294
|
+
"class": "Module",
|
|
295
|
+
"object_id": 1380300,
|
|
296
|
+
"value": "Scanner"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"hash": "a2bfc16512fadf8536355610fcaa63b391596dc0f60d7ef7f885a4eb6ec8f7c1",
|
|
300
|
+
"scope": {
|
|
301
|
+
"id": 29,
|
|
302
|
+
"event": "call",
|
|
303
|
+
"thread_id": 76340,
|
|
304
|
+
"http_server_request": {
|
|
305
|
+
"request_method": "POST",
|
|
306
|
+
"path_info": "/api/scanner_jobs",
|
|
307
|
+
"normalized_path_info": "/api/scanner_jobs",
|
|
308
|
+
"headers": {
|
|
309
|
+
"Host": "www.example.com",
|
|
310
|
+
"Accept": "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
|
|
311
|
+
"Authorization": "Bearer YWRtaW46NzM4NzVmOWYtMmQ4Ni00YWIwLTk5OWEtMWUwNjc2NGE5NTUw"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"message": "Slow app/models/Scanner.publish_from_upload call (0.538877ms)"
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
```
|
|
319
|
+
|
|
66
320
|
## Development
|
|
67
321
|
|
|
68
322
|
We use `yarn` for package management. Run `yarn` to install dependencies and `yarn build` to emit
|
|
@@ -30,6 +30,10 @@ function default_1(findings, appMapMetadata, ide) {
|
|
|
30
30
|
writeln("\tAppMap name:\t" + appMapMetadata[finding.appMapFile].name);
|
|
31
31
|
writeln(eventMsg);
|
|
32
32
|
writeln("\tScope:\t" + finding.scope.id + " - " + finding.scope.toString());
|
|
33
|
+
if (finding.stack.length > 0) {
|
|
34
|
+
writeln("\tStack trace:");
|
|
35
|
+
finding.stack.forEach(function (frame) { return console.log("\t\t" + frame); });
|
|
36
|
+
}
|
|
33
37
|
writeln();
|
|
34
38
|
});
|
|
35
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findingsReport.js","sourceRoot":"","sources":["../../src/report/findingsReport.ts"],"names":[],"mappings":";;;;;AACA,gDAA0B;AAC1B,0CAA4C;AAG5C,SAAS,OAAO,CAAC,IAAS;IAAT,qBAAA,EAAA,SAAS;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC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ACtE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAClB,OAAO,CAAC,eAAa,OAAO,CAAC,KAAK,CAAC,EAAE,WAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAI,CAAC,CAAC;QACvE,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5B,OAAO,CAAC,gBAAgB,CAAC,CAAC;YAC1B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,KAAK,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,SAAO,KAAO,CAAC,EAA3B,CAA2B,CAAC,CAAC;SAC/D;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,4BAgCC"}
|
package/built/ruleChecker.js
CHANGED
|
@@ -46,6 +46,31 @@ var __values = (this && this.__values) || function(o) {
|
|
|
46
46
|
};
|
|
47
47
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48
48
|
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
65
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
66
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
67
|
+
if (ar || !(i in from)) {
|
|
68
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
69
|
+
ar[i] = from[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
73
|
+
};
|
|
49
74
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
75
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
76
|
};
|
|
@@ -202,6 +227,9 @@ var RuleChecker = /** @class */ (function () {
|
|
|
202
227
|
// at hashEvent (/Users/kgilpin/source/appland/scanner/node_modules/@appland/models/dist/index.cjs:1714:14)
|
|
203
228
|
// at Event.get hash [as hash] (/Users/kgilpin/source/appland/scanner/node_modules/@appland/models/dist/index.cjs:3325:27)
|
|
204
229
|
findingEvent.message || (findingEvent.message = []);
|
|
230
|
+
var stack = __spreadArray([
|
|
231
|
+
findingEvent.codeObject.location
|
|
232
|
+
], __read(findingEvent.ancestors().map(function (ancestor) { return ancestor.codeObject.location; })), false).filter(Boolean);
|
|
205
233
|
return {
|
|
206
234
|
appMapFile: appMapFile,
|
|
207
235
|
checkId: checkInstance.checkId,
|
|
@@ -209,6 +237,7 @@ var RuleChecker = /** @class */ (function () {
|
|
|
209
237
|
ruleTitle: checkInstance.title,
|
|
210
238
|
event: findingEvent,
|
|
211
239
|
hash: findingEvent.hash,
|
|
240
|
+
stack: stack,
|
|
212
241
|
scope: scope,
|
|
213
242
|
message: message || checkInstance.title,
|
|
214
243
|
groupMessage: groupMessage,
|
package/built/ruleChecker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleChecker.js","sourceRoot":"","sources":["../src/ruleChecker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ruleChecker.js","sourceRoot":"","sources":["../src/ruleChecker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mCAAsC;AAEtC,yCAA2C;AAE3C,gEAA0C;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Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var url_1 = require("url");
|
|
4
4
|
function build() {
|
|
5
5
|
return {
|
|
6
|
-
matcher: function (e) {
|
|
7
|
-
return e.httpServerResponse.status >= 500 && e.httpServerResponse.status < 600;
|
|
8
|
-
},
|
|
6
|
+
matcher: function (e) { return e.httpServerResponse.status === 500; },
|
|
9
7
|
where: function (e) { return !!e.httpServerResponse; },
|
|
10
8
|
};
|
|
11
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http500.js","sourceRoot":"","sources":["../../src/rules/http500.ts"],"names":[],"mappings":";;AACA,2BAA0B;AAG1B,SAAS,KAAK;IACZ,OAAO;QACL,OAAO,EAAE,UAAC,CAAQ
|
|
1
|
+
{"version":3,"file":"http500.js","sourceRoot":"","sources":["../../src/rules/http500.ts"],"names":[],"mappings":";;AACA,2BAA0B;AAG1B,SAAS,KAAK;IACZ,OAAO;QACL,OAAO,EAAE,UAAC,CAAQ,IAAK,OAAA,CAAC,CAAC,kBAAmB,CAAC,MAAM,KAAK,GAAG,EAApC,CAAoC;QAC3D,KAAK,EAAE,UAAC,CAAQ,IAAK,OAAA,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAtB,CAAsB;KAC5C,CAAC;AACJ,CAAC;AAED,kBAAe;IACb,EAAE,EAAE,UAAU;IACd,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,qBAAqB;IAC5B,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE;QACV,SAAS,EAAE,IAAI,SAAG,CAAC,iDAAiD,CAAC;KACtE;IACD,KAAK,OAAA;CACE,CAAC"}
|