1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "assets": [
12 {
13 "clientName": "Acme Logistics",
14 "assetTag": "FW-PAR-01",
15 "vendor": "fortinet",
16 "product": "fortios",
17 "version": "7.2.4",
18 "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
19 "internetExposed": true
20 },
21 {
22 "clientName": "Cabinet Dupont",
23 "assetTag": "NAS-LYO-01",
24 "vendor": "synology",
25 "product": "diskstation_manager",
26 "version": "7.2-64570",
27 "internetExposed": false
28 },
29 {
30 "clientName": "FinTech Portal",
31 "assetTag": "WEB-LODASH",
32 "vendor": "lodash",
33 "product": "lodash",
34 "version": "4.17.20",
35 "ecosystem": "npm",
36 "internetExposed": true
37 }
38 ],
39 "presets": [],
40 "sources": [
41 "nvd",
42 "osv",
43 "github"
44 ],
45 "enrichWithKev": true,
46 "minSeverity": "medium",
47 "onlyKev": false,
48 "publishedWithinDays": 0,
49 "onlyNew": false,
50 "maxAlertsPerAsset": 25,
51 "maxItems": 100
52};
53
54
55const run = await client.actor("vesper_studio/msp-product-cve-alerts").call(input);
56
57
58console.log('Results from dataset');
59console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
60const { items } = await client.dataset(run.defaultDatasetId).listItems();
61items.forEach((item) => {
62 console.dir(item);
63});
64
65