{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "46885859-F93E-463E-9C0D-81A929797F73",
    "name": "BreachSpider: nightly fleet re-check"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -70,
        "y": -360,
        "zoom": 1
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Runs on a nightly schedule. Reads the device inventory in Google Sheets with the result hash, status hash and status facts kept from the last check, and asks BreachSpider which devices changed, 200 per call, without fetching their CVEs again. Only the devices BreachSpider lists as changed, plus rows that were never checked, go back through Check Devices; their rows get the new counts, top fix and hashes. One summary to Slack lists what changed and why, and names any device that needs review.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "On a nightly schedule, reads the device inventory in Google Sheets with the result and status hashes kept from the last check, asks BreachSpider which devices changed (200 per call) without fetching their CVEs again, runs only the changed and never-checked devices back through Check Devices, updates their rows, and posts one summary of what changed and why to Slack.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the nightly summary Result"
          },
          "position": {
            "x": 809,
            "y": 579
          }
        },
        "flowElementId": "3C6AB249-4CC7-4409-93D7-C9F6EF278609",
        "groupId": null,
        "id": "313AFDAD-9DD5-417C-8D3E-5217F8C00CD2",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "summary",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Re-check - summary",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Re-check.summary",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Re-check",
                        "optional": false
                      },
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "total",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "compared",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "compared",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "firstTimeCount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "firstTimeCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "skipped",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "skipped",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const lines = Array.isArray(summary) ? summary : [];\nconst n = Number(total) || 0;\nconst comparedCount = Number(compared) || 0;\nconst first = Number(firstTimeCount) || 0;\nconst skippedList = Array.isArray(skipped) ? skipped : [];\nconst s = k => (k === 1 ? '' : 's');\nconst header = `*Nightly BreachSpider re-check: ${comparedCount} device${s(comparedCount)} compared, ${lines.length} re-checked*`;\nconst body = lines.length\n  ? lines.slice(0, 40).map(l => `• ${l}`).join('\\n') + (lines.length > 40 ? `\\nand ${lines.length - 40} more, see the inventory sheet` : '')\n  : 'Nothing changed since the last check. Every row keeps its result.';\nconst notes = [];\nif (first) notes.push(`${first} device${s(first)} had no earlier result and got a first check.`);\nif (skippedList.length) notes.push(`Skipped: ${skippedList.join('; ')}.`);\nconst blocks = [\n  { type: 'section', text: { type: 'mrkdwn', text: header } },\n  { type: 'section', text: { type: 'mrkdwn', text: body.slice(0, 2900) } },\n];\nif (notes.length) blocks.push({ type: 'context', elements: [{ type: 'mrkdwn', text: notes.join(' ') }] });\nreturn { text: `Nightly BreachSpider re-check: ${lines.length} of ${n} device${s(n)} re-checked`, blocks };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Summary card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the nightly summary",
        "nextElementIds": [
          "9F74815E-1956-4359-AC84-9C4F7D0964E6"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Collect the changed devices Result"
          },
          "position": {
            "x": 455,
            "y": 49
          }
        },
        "flowElementId": "379600EE-69A5-49A4-B6C1-712CB8742E92",
        "groupId": "B77C210F-B3D8-4747-8A69-DA1FFE1E0605",
        "id": "73360274-25E8-4910-B702-22CABFDB6405",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "changed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Re-check - changed",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Re-check.changed",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Re-check",
                        "optional": false
                      },
                      {
                        "key": "changed",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "results",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change check",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4C34CDF5-8BE1-4A7F-9986-B9225B15D656"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowsByAsset",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Re-check - rowsByAsset",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Re-check.rowsByAsset",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Re-check",
                        "optional": false
                      },
                      {
                        "key": "rowsByAsset",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const prev = Array.isArray(changed) ? changed : [];\nconst res = results && Array.isArray(results.results) ? results.results : [];\nconst map = rowsByAsset || {};\nconst have = new Set(prev.map(p => p.assetId));\nconst out = prev.slice();\nconst describe = x => (typeof x === 'string' ? x : (x && (x.reason || x.message || x.code)) || JSON.stringify(x));\nconst add = (assetId, reason) => {\n  const entry = map[assetId];\n  if (!entry || have.has(assetId)) return;\n  out.push(Object.assign({}, entry, { reason }));\n  have.add(assetId);\n};\nfor (const r of res) {\n  if (!r) continue;\n  if (!(r.changed === true || r.status_changed === true || r.findings_changed === true)) continue;\n  const reasons = Array.isArray(r.reasons) && r.reasons.length ? r.reasons.map(describe) : [r.reason || 'findings changed'];\n  add(r.asset_id, reasons.join('; '));\n}\nfor (const c of [].concat(results && results.changed || [], results && results.status_changed || [])) {\n  const id = typeof c === 'string' ? c : (c && c.asset_id);\n  if (id) add(id, typeof c === 'object' && c && c.reason ? describe(c) : 'listed as changed by BreachSpider');\n}\nreturn out;"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Changed so far",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Collect the changed devices",
        "nextElementIds": [
          "A29A7829-17FA-43AF-B8E6-003B071D3A63"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the result Result"
          },
          "position": {
            "x": 500,
            "y": 229
          }
        },
        "flowElementId": "A4EF0D76-1CE1-45BB-B5AE-29E288519193",
        "groupId": "6A3B40CD-196A-452B-8950-43ADA4B73526",
        "id": "64A1C151-3172-406E-B5AC-93CCB4316556",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "result",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Device check",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "42E756E0-C452-478F-9822-B346291C5079"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "assetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "assetId",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "vendor",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "vendor",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "product",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "product",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "version",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "version",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "why",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "reason",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "summary",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Re-check - summary",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Re-check.summary",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Re-check",
                        "optional": false
                      },
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "checkedAt",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "GET_CURRENT_DATE",
                    "label": null,
                    "type": "GET_CURRENT_DATE_TIME",
                    "value": null
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const lines = Array.isArray(summary) ? summary.slice() : [];\nconst r = (result && Array.isArray(result.results) && result.results[0]) || null;\nconst s = n => (n === 1 ? '' : 's');\nconst label = `${vendor || '?'} ${product || '?'} (${assetId || 'no asset ID'}), firmware ${version || 'not given'}`;\nif (!r) {\n  lines.push(`${label}: Needs review, BreachSpider returned no result. Why re-checked: ${why || 'changed'}`);\n  return {\n    status: 'Needs review', hasConfirmed: false, needsReview: true, confirmed: 0, total: 0, kev: 0, topFix: '', label, summary: lines,\n    rowData: { Status: 'Needs review', CVEs: '', Confirmed: '', Exploited: '', Fix: '', ResultHash: '', StatusHash: '', StatusFacts: '', Checked: checkedAt },\n  };\n}\nconst warnings = (r.warnings || []).map(w => (typeof w === 'string' ? w : (w && (w.code || w.message)) || JSON.stringify(w)));\nconst resolution = r.resolution || {};\nconst resolved = resolution.status === 'resolved';\nconst needsReview = r.needs_review === true || !resolved || warnings.length > 0;\nconst cves = Array.isArray(r.cves) ? r.cves : [];\nconst total = r.cves_page && typeof r.cves_page.total === 'number' ? r.cves_page.total : cves.length;\nconst confirmedCves = cves.filter(c => c.applicability === 'CONFIRMED_AFFECTED');\nconst confirmed = confirmedCves.length;\nconst kevFromCves = cves.filter(c => c.exploitation && c.exploitation.kev_flagged).length;\nconst kevFromFacts = r.status_facts && Array.isArray(r.status_facts.known_exploited) ? r.status_facts.known_exploited.length : 0;\nconst kev = Math.max(kevFromCves, kevFromFacts);\nconst plan = r.fix_plan || {};\nconst allFix = plan.to_clear_all_fixable || null;\nconst kevFix = plan.to_clear_known_exploited || null;\nconst firstGroup = Array.isArray(r.fix_groups) && r.fix_groups[0] ? r.fix_groups[0] : null;\nconst topFix = (allFix && allFix.fix) || (kevFix && kevFix.fix) || (firstGroup && firstGroup.fix) || '';\nconst reasons = [];\nif (!resolved) reasons.push(`BreachSpider could not resolve the product (${resolution.status || 'no status'})`);\nif (r.needs_review === true && resolved) reasons.push('BreachSpider flagged the match for review');\nif (warnings.length) reasons.push(`warnings: ${warnings.join(', ')}`);\nconst reason = reasons.join('; ');\nconst hasConfirmed = confirmed > 0;\nlet status;\nif (hasConfirmed) status = `${confirmed} confirmed CVE${s(confirmed)}${kev ? `, ${kev} known-exploited` : ''}${needsReview ? ', needs review' : ''}`;\nelse if (needsReview) status = 'Needs review';\nelse if (total > 0) status = `${total} product-level CVE${s(total)}, none confirmed for ${version || 'this version'}`;\nelse status = `No CVEs matched firmware ${version || 'given'}`;\nlines.push(`${label}: ${status}${needsReview && reason ? ' (' + reason + ')' : ''}${topFix ? '. Fix: ' + topFix : ''}. Why re-checked: ${why || 'changed'}`);\nreturn {\n  status, hasConfirmed, needsReview, confirmed, total, kev, topFix, reason, label, summary: lines,\n  rowData: {\n    Status: status, CVEs: total, Confirmed: confirmed, Exploited: kev, Fix: topFix,\n    ResultHash: r.result_hash || '', StatusHash: r.status_hash || '',\n    StatusFacts: r.status_facts ? JSON.stringify(r.status_facts) : '', Checked: checkedAt,\n  },\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Read the result",
        "nextElementIds": [
          "29ECF76E-C6B6-4B55-B53E-8E1F0AF0283B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "A cheap repeat check: tells, per device, whether anything changed since an earlier Check Devices result, without returning the CVEs again. Send each device with the `result_hash` you kept (and its `status_hash` and `status_facts` to also learn about known-exploited, lifecycle and firmware changes). Each device comes back with `changed`, `current_hash` and a reason, and `data.changed` lists the devices to run through Check Devices again. Up to 200 devices per call.",
          "elementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevicesForChanges",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check devices for changes Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevicesForChanges",
          "legacyElementId": null,
          "methodName": "checkDevicesForChanges",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "E1146259-ADE7-4CC4-AA5E-6829E0EF865B",
        "groupId": "B77C210F-B3D8-4747-8A69-DA1FFE1E0605",
        "id": "4C34CDF5-8BE1-4A7F-9986-B9225B15D656",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "assets",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "B77C210F-B3D8-4747-8A69-DA1FFE1E0605"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minConfidence",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "checkDevicesForChanges",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Change check",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "breachspider",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check devices for changes",
        "nextElementIds": [
          "73360274-25E8-4910-B702-22CABFDB6405"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Group the devices for the re-check Result"
          },
          "position": {
            "x": 410,
            "y": 409
          }
        },
        "flowElementId": "C22704B8-D326-4258-833C-E307E3F7B5B1",
        "groupId": null,
        "id": "71CFBE2E-858A-40D6-83EB-245C023F2B67",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "rows",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Inventory",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "F903A54B-022B-4CE4-A3D2-FC204D5D89F3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(rows) ? rows : [];\nconst get = (d, k) => (d && d[k] != null ? String(d[k]).trim() : '');\nconst items = [];\nconst skipped = [];\nconst firstTime = [];\nconst rowsByAsset = {};\nfor (const row of list) {\n  const d = row && row.rowData ? row.rowData : (row || {});\n  const rowNumber = row && typeof row.rowNumber === 'number' ? row.rowNumber : null;\n  const vendor = get(d, 'Vendor');\n  const product = get(d, 'Product');\n  const version = get(d, 'Firmware');\n  if (!vendor || !product) {\n    if (rowNumber) skipped.push(`row ${rowNumber}: vendor or product missing`);\n    continue;\n  }\n  const assetId = (get(d, 'Asset') || `row-${rowNumber}`).slice(0, 64);\n  const asset = { asset_id: assetId, vendor, product };\n  if (version) asset.version = version;\n  const entry = { rowNumber, assetId, vendor, product, version, assets: [asset] };\n  rowsByAsset[assetId] = entry;\n  const resultHash = get(d, 'ResultHash');\n  if (!resultHash) {\n    firstTime.push(Object.assign({}, entry, { reason: 'first check, no earlier result on the row' }));\n    continue;\n  }\n  const check = Object.assign({}, asset, { result_hash: resultHash });\n  const statusHash = get(d, 'StatusHash');\n  if (/^sha256:[0-9a-f]{64}$/.test(statusHash)) check.status_hash = statusHash;\n  const facts = get(d, 'StatusFacts');\n  if (facts) { try { check.status_facts = JSON.parse(facts); } catch (e) { /* kept out */ } }\n  items.push(check);\n}\nconst batches = [];\nfor (let i = 0; i < items.length; i += 200) batches.push(items.slice(i, i + 200));\nreturn {\n  batches, firstTime, rowsByAsset,\n  total: items.length + firstTime.length, compared: items.length, firstTimeCount: firstTime.length,\n  skipped, batchCount: batches.length,\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Re-check plan",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Group the devices for the re-check",
        "nextElementIds": [
          "55DA0EA5-59FE-4603-905B-5F559DDF6FD2"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Post the summary to Slack Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 438,
            "y": 570
          }
        },
        "flowElementId": "2E0EB80E-D1F4-4ACE-8BC8-49548268A878",
        "groupId": null,
        "id": "9F74815E-1956-4359-AC84-9C4F7D0964E6",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Summary card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "313AFDAD-9DD5-417C-8D3E-5217F8C00CD2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Summary card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "313AFDAD-9DD5-417C-8D3E-5217F8C00CD2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Summary post",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Post the summary to Slack",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "changed": "1bb17c9b-1f92-4a37-8e07-20cfbaeb6000"
          },
          "position": {
            "x": 809,
            "y": 49
          }
        },
        "flowElementId": "D3787FA6-ADE2-4F05-9B52-7C1C0F127FA7",
        "groupId": "B77C210F-B3D8-4747-8A69-DA1FFE1E0605",
        "id": "A29A7829-17FA-43AF-B8E6-003B071D3A63",
        "metaInfo": {
          "bucketName": "Re-check",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "changed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Changed so far",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "73360274-25E8-4910-B702-22CABFDB6405"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Remember changed",
          "storeResult": true
        },
        "name": "Remember the changed devices",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "summary": "6af91cd6-d2da-498d-a41c-4ea2b8758c0e"
          },
          "position": {
            "x": 1100,
            "y": 229
          }
        },
        "flowElementId": "F642ACF4-5489-46FD-A4A4-26A5EAD47B8D",
        "groupId": "6A3B40CD-196A-452B-8950-43ADA4B73526",
        "id": "7C68EF95-7B07-45B1-8954-981C12CDE8C7",
        "metaInfo": {
          "bucketName": "Re-check",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "summary",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "64A1C151-3172-406E-B5AC-93CCB4316556"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Remember summary",
          "storeResult": true
        },
        "name": "Add it to the summary",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Update the row Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 800,
            "y": 220
          }
        },
        "flowElementId": "92722987-2D39-43AC-BEAC-8A2B19B31931",
        "groupId": "6A3B40CD-196A-452B-8950-43ADA4B73526",
        "id": "29ECF76E-C6B6-4B55-B53E-8E1F0AF0283B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "rowData",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "64A1C151-3172-406E-B5AC-93CCB4316556"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Update the row', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Row update",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Update the row",
        "nextElementIds": [
          "7C68EF95-7B07-45B1-8954-981C12CDE8C7"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves data from Google Sheets for AI agents to analyze spreadsheet content, process existing data, or extract information for automated workflows. Perfect for reading user submissions, analyzing data trends, or importing data for further processing.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::getRows",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the inventory Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::getRows",
          "legacyElementId": "JS###v1###GoogleSheets###getRows",
          "methodName": "getRows",
          "position": {
            "x": 110,
            "y": 400
          }
        },
        "flowElementId": "5C4FB056-40DE-4FEC-8FE1-E6ABA313E8F7",
        "groupId": null,
        "id": "F903A54B-022B-4CE4-A3D2-FC204D5D89F3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "withRowNumbers",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Read the inventory', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getRows",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Inventory",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the inventory",
        "nextElementIds": [
          "71CFBE2E-858A-40D6-83EB-245C023F2B67"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "changed": "920b24fa-a663-49f7-8232-08823859c8a1",
            "summary": "adeb134f-3e04-49be-b0a2-90553fab04ea",
            "rowsByAsset": "0560bca6-8a28-4e2e-8b10-111d2d0a0c88"
          },
          "position": {
            "x": 826,
            "y": 409
          }
        },
        "flowElementId": "CD48F3C8-EE9F-4299-8AAF-E47DFC2E9DD9",
        "groupId": null,
        "id": "55DA0EA5-59FE-4603-905B-5F559DDF6FD2",
        "metaInfo": {
          "bucketName": "Re-check",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "changed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "firstTime",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "summary",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_LIST",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "arrays.create()"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowsByAsset",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Re-check plan",
                    "subPathSegments": [
                      {
                        "key": "rowsByAsset",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Changed devices",
          "storeResult": true
        },
        "name": "Start the changed list",
        "nextElementIds": [],
        "nextGroupIds": [
          "B77C210F-B3D8-4747-8A69-DA1FFE1E0605"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Checks up to 200 devices (25 on a trial key) against the CVEs that affect their exact version, without storing anything. For each device it returns the catalog product it resolved to and how confident that match is, its CVEs ranked fix-first with the source and the fix behind each, the fix groups, the single upgrade that clears them, and a `result_hash` and `status_hash` to send to Check Devices for Changes later. An empty CVE list is never a clean result on its own: read `needs_review`, `resolution.status` and `warnings` (for example NO_CPE_DATA or PRODUCT_UNRESOLVED). Each device's CVE list is paged (250 per page by default): when `cves_page.has_more` is true, run it again with the next CVE Page.",
          "elementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevices",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check the device in BreachSpider Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevices",
          "legacyElementId": null,
          "methodName": "checkDevices",
          "position": {
            "x": 110,
            "y": 220
          }
        },
        "flowElementId": "14401942-D01F-4B67-8650-F7EC0B08B9A8",
        "groupId": "6A3B40CD-196A-452B-8950-43ADA4B73526",
        "id": "42E756E0-C452-478F-9822-B346291C5079",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "assets",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "assets",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "6A3B40CD-196A-452B-8950-43ADA4B73526"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minConfidence",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sort",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "confirmedOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "knownExploitedOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fixAvailableOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeCapec",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cvePage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cvePageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "checkDevices",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Device check",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "breachspider",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check the device in BreachSpider",
        "nextElementIds": [
          "64A1C151-3172-406E-B5AC-93CCB4316556"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "F903A54B-022B-4CE4-A3D2-FC204D5D89F3",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -180,
            "zoom": 1
          },
          "position": {
            "x": 1150,
            "y": 579
          }
        },
        "flowElementId": "6F3D7F89-BB5E-4C0A-A6F6-07ABDFA93B98",
        "groupId": null,
        "id": "6A3B40CD-196A-452B-8950-43ADA4B73526",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Check each changed device', Error: Children have error",
            "valid": false
          },
          "enabled": true,
          "firstElementId": "42E756E0-C452-478F-9822-B346291C5079",
          "list": {
            "expression": [
              {
                "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                "label": "Re-check - changed",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_PATH",
                "value": "executionContext.dataBuckets.Re-check.changed",
                "valueSegments": [
                  {
                    "key": "executionContext",
                    "optional": false
                  },
                  {
                    "key": "dataBuckets",
                    "optional": false
                  },
                  {
                    "key": "Re-check",
                    "optional": false
                  },
                  {
                    "key": "changed",
                    "optional": false
                  }
                ]
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Changed loop",
          "storeResult": true
        },
        "name": "Check each changed device",
        "nextElementIds": [
          "313AFDAD-9DD5-417C-8D3E-5217F8C00CD2"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      },
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": 0,
            "zoom": 1
          },
          "position": {
            "x": 1173,
            "y": 409
          }
        },
        "flowElementId": "67BB7F26-A7CF-4C42-9F39-9C17B1394A54",
        "groupId": null,
        "id": "B77C210F-B3D8-4747-8A69-DA1FFE1E0605",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "4C34CDF5-8BE1-4A7F-9986-B9225B15D656",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Re-check plan",
                "subPathSegments": [
                  {
                    "key": "batches",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "71CFBE2E-858A-40D6-83EB-245C023F2B67"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Batches",
          "storeResult": true
        },
        "name": "Re-check each batch",
        "nextElementIds": [],
        "nextGroupIds": [
          "6A3B40CD-196A-452B-8950-43ADA4B73526"
        ],
        "type": "LOOP"
      }
    ],
    "id": "60107856-7593-4861-A5F6-B245793186FF",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-12-02T08:44:01.030Z"
}
