@corellium/corellium-cli 1.2.3 → 1.2.4
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/coverage/cobertura-coverage.xml +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/package.json +1 -1
- package/src/commands/mast/download-report.js +1 -1
- package/src/commands/mast/get-assessment.js +0 -1
- package/src/commands/mast/get-assessments.js +44 -0
- package/src/commands/mast/index.js +1 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" ?>
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
3
|
-
<coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="
|
3
|
+
<coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="1713906557236" complexity="0" version="0.1">
|
4
4
|
<sources>
|
5
5
|
<source>/builds/middleware/corellium-cli</source>
|
6
6
|
</sources>
|
@@ -86,7 +86,7 @@
|
|
86
86
|
<div class='footer quiet pad2 space-top1 center small'>
|
87
87
|
Code coverage generated by
|
88
88
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
89
|
-
at 2024-04-
|
89
|
+
at 2024-04-23T21:09:17.243Z
|
90
90
|
</div>
|
91
91
|
<script src="prettify.js"></script>
|
92
92
|
<script>
|
package/package.json
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
const Client = require('../../clients/Client')
|
2
|
+
const { handleError } = require('../../error')
|
3
|
+
const { MAST_API_BASE_PATH } = require('./constants')
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Get assessments for an instance via corellium-mast API.
|
7
|
+
*
|
8
|
+
* @param yargs
|
9
|
+
* @returns {Promise<void>}
|
10
|
+
*/
|
11
|
+
async function builder (yargs) {
|
12
|
+
yargs
|
13
|
+
.option('instance', {
|
14
|
+
alias: 'i',
|
15
|
+
type: 'string',
|
16
|
+
demandOption: true,
|
17
|
+
describe: 'virtual device id',
|
18
|
+
default: process.env.INSTANCE
|
19
|
+
})
|
20
|
+
.option('verbose', {
|
21
|
+
alias: 'v',
|
22
|
+
type: 'boolean',
|
23
|
+
describe: 'console will receive verbose error output',
|
24
|
+
default: false
|
25
|
+
})
|
26
|
+
}
|
27
|
+
|
28
|
+
async function handler (argv) {
|
29
|
+
const { instance, verbose } = argv
|
30
|
+
const client = new Client(argv)
|
31
|
+
try {
|
32
|
+
const res = await client._fetch('GET', `${MAST_API_BASE_PATH}/${instance}/instances/${instance}/assessments`)
|
33
|
+
console.log(JSON.stringify(res))
|
34
|
+
} catch (error) {
|
35
|
+
handleError(error, 'get-assessments failed', verbose)
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
module.exports = {
|
40
|
+
builder,
|
41
|
+
handler,
|
42
|
+
command: 'get-assessments',
|
43
|
+
describe: 'Get all MAST assessments for a given instance'
|
44
|
+
}
|