regscale-cli 6.20.9.1__py3-none-any.whl → 6.21.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of regscale-cli might be problematic. Click here for more details.

Files changed (56) hide show
  1. regscale/_version.py +1 -1
  2. regscale/core/app/application.py +12 -5
  3. regscale/core/app/internal/set_permissions.py +58 -27
  4. regscale/integrations/commercial/defender.py +9 -0
  5. regscale/integrations/commercial/nessus/scanner.py +2 -0
  6. regscale/integrations/commercial/sonarcloud.py +35 -36
  7. regscale/integrations/commercial/synqly/ticketing.py +51 -0
  8. regscale/integrations/commercial/wizv2/async_client.py +325 -0
  9. regscale/integrations/commercial/wizv2/constants.py +756 -0
  10. regscale/integrations/commercial/wizv2/scanner.py +1301 -89
  11. regscale/integrations/commercial/wizv2/utils.py +280 -36
  12. regscale/integrations/commercial/wizv2/variables.py +2 -10
  13. regscale/integrations/integration_override.py +15 -6
  14. regscale/integrations/scanner_integration.py +221 -37
  15. regscale/integrations/variables.py +1 -0
  16. regscale/models/integration_models/amazon_models/inspector_scan.py +32 -57
  17. regscale/models/integration_models/aqua.py +92 -78
  18. regscale/models/integration_models/cisa_kev_data.json +47 -4
  19. regscale/models/integration_models/defenderimport.py +64 -59
  20. regscale/models/integration_models/ecr_models/ecr.py +100 -147
  21. regscale/models/integration_models/flat_file_importer/__init__.py +52 -38
  22. regscale/models/integration_models/ibm.py +29 -47
  23. regscale/models/integration_models/nexpose.py +156 -68
  24. regscale/models/integration_models/prisma.py +46 -66
  25. regscale/models/integration_models/qualys.py +99 -93
  26. regscale/models/integration_models/snyk.py +229 -158
  27. regscale/models/integration_models/synqly_models/capabilities.json +1 -1
  28. regscale/models/integration_models/veracode.py +15 -20
  29. regscale/models/integration_models/xray.py +276 -82
  30. regscale/models/regscale_models/__init__.py +13 -0
  31. regscale/models/regscale_models/classification.py +23 -0
  32. regscale/models/regscale_models/control_implementation.py +14 -12
  33. regscale/models/regscale_models/cryptography.py +56 -0
  34. regscale/models/regscale_models/deviation.py +4 -4
  35. regscale/models/regscale_models/group.py +3 -2
  36. regscale/models/regscale_models/interconnection.py +1 -1
  37. regscale/models/regscale_models/issue.py +140 -41
  38. regscale/models/regscale_models/milestone.py +40 -0
  39. regscale/models/regscale_models/property.py +0 -1
  40. regscale/models/regscale_models/rbac.py +22 -0
  41. regscale/models/regscale_models/regscale_model.py +29 -18
  42. regscale/models/regscale_models/team.py +55 -0
  43. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/METADATA +1 -1
  44. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/RECORD +56 -49
  45. tests/fixtures/test_fixture.py +58 -2
  46. tests/regscale/core/test_app.py +5 -3
  47. tests/regscale/integrations/test_integration_mapping.py +522 -40
  48. tests/regscale/integrations/test_issue_due_date.py +1 -1
  49. tests/regscale/integrations/test_property_and_milestone_creation.py +684 -0
  50. tests/regscale/integrations/test_update_finding_dates.py +336 -0
  51. tests/regscale/models/test_asset.py +406 -50
  52. tests/regscale/models/test_report.py +105 -29
  53. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/LICENSE +0 -0
  54. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/WHEEL +0 -0
  55. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/entry_points.txt +0 -0
  56. {regscale_cli-6.20.9.1.dist-info → regscale_cli-6.21.0.0.dist-info}/top_level.txt +0 -0
@@ -12,6 +12,11 @@ VULNERABILITY_FILE_PATH = "artifacts/wiz_vulnerabilities.json"
12
12
  CLOUD_CONFIG_FINDINGS_FILE_PATH = "artifacts/wiz_cloud_config_findings.json"
13
13
  HOST_VULNERABILITY_FILE_PATH = "artifacts/wiz_host_vulnerabilities.json"
14
14
  DATA_FINDINGS_FILE_PATH = "artifacts/wiz_data_findings.json"
15
+ SECRET_FINDINGS_FILE_PATH = "artifacts/wiz_secret_findings.json"
16
+ NETWORK_EXPOSURE_FILE_PATH = "artifacts/wiz_network_exposures.json"
17
+ END_OF_LIFE_FILE_PATH = "artifacts/wiz_end_of_life.json"
18
+ EXTERNAL_ATTACK_SURFACE_FILE_PATH = "artifacts/wiz_external_attack_surface.json"
19
+ EXCESSIVE_ACCESS_FILE_PATH = "artifacts/wiz_excessive_access.json"
15
20
  CONTENT_TYPE = "application/json"
16
21
  RATE_LIMIT_MSG = "Rate limit exceeded"
17
22
  PROVIDER = "Provider ID"
@@ -102,6 +107,80 @@ ASSET_TYPE_MAPPING = {
102
107
  "DATA_WORKFLOW": "Other",
103
108
  }
104
109
 
110
+ RECOMMENDED_WIZ_INVENTORY_TYPES = [
111
+ # Compute resources
112
+ "CONTAINER",
113
+ "CONTAINER_GROUP",
114
+ "CONTAINER_IMAGE",
115
+ "POD",
116
+ "SERVERLESS",
117
+ "SERVERLESS_PACKAGE",
118
+ "VIRTUAL_DESKTOP",
119
+ "VIRTUAL_MACHINE",
120
+ "VIRTUAL_MACHINE_IMAGE",
121
+ # Network and exposure
122
+ "API_GATEWAY",
123
+ "CDN",
124
+ "CERTIFICATE",
125
+ "DNS_RECORD",
126
+ "ENDPOINT",
127
+ "FIREWALL",
128
+ "GATEWAY",
129
+ "LOAD_BALANCER",
130
+ "MANAGED_CERTIFICATE",
131
+ "NETWORK_ADDRESS",
132
+ "NETWORK_INTERFACE",
133
+ "PRIVATE_ENDPOINT",
134
+ "PRIVATE_LINK",
135
+ "PROXY",
136
+ "WEB_SERVICE",
137
+ # Storage and data
138
+ "BACKUP_SERVICE",
139
+ "BUCKET",
140
+ "DATABASE",
141
+ "DATA_WORKLOAD",
142
+ "DB_SERVER",
143
+ "FILE_SYSTEM_SERVICE",
144
+ "SECRET",
145
+ "SECRET_CONTAINER",
146
+ "STORAGE_ACCOUNT",
147
+ "VOLUME",
148
+ # Identity and access management
149
+ "ACCESS_ROLE",
150
+ # "ACCESS_ROLE_BINDING",
151
+ "AUTHENTICATION_CONFIGURATION",
152
+ "IAM_BINDING",
153
+ "RAW_ACCESS_POLICY",
154
+ "SERVICE_ACCOUNT",
155
+ # Development and CI/CD
156
+ "APPLICATION",
157
+ "CICD_SERVICE",
158
+ "CONFIG_MAP",
159
+ "CONTAINER_REGISTRY",
160
+ "CONTAINER_SERVICE",
161
+ # Kubernetes resources
162
+ "CONTROLLER_REVISION",
163
+ "KUBERNETES_CLUSTER",
164
+ "KUBERNETES_INGRESS",
165
+ "KUBERNETES_NODE",
166
+ "KUBERNETES_SERVICE",
167
+ "NAMESPACE",
168
+ # Infrastructure and management
169
+ "CLOUD_LOG_CONFIGURATION",
170
+ "CLOUD_ORGANIZATION",
171
+ "DOMAIN",
172
+ "EMAIL_SERVICE",
173
+ "ENCRYPTION_KEY",
174
+ "MANAGEMENT_SERVICE",
175
+ "MESSAGING_SERVICE",
176
+ "REGISTERED_DOMAIN",
177
+ "RESOURCE_GROUP",
178
+ "SERVICE_CONFIGURATION",
179
+ "SUBNET",
180
+ "SUBSCRIPTION",
181
+ "VIRTUAL_NETWORK",
182
+ ]
183
+
105
184
  INVENTORY_QUERY = """
106
185
  query CloudResourceSearch(
107
186
  $filterBy: CloudResourceFilters
@@ -926,6 +1005,11 @@ class WizVulnerabilityType(Enum):
926
1005
  DATA_FINDING = "data_finding"
927
1006
  VULNERABILITY = "vulnerability"
928
1007
  CONFIGURATION = "configuration_finding"
1008
+ SECRET_FINDING = "secret_finding"
1009
+ END_OF_LIFE_FINDING = "end_of_life_finding"
1010
+ NETWORK_EXPOSURE_FINDING = "network_exposure_finding"
1011
+ EXTERNAL_ATTACH_SURFACE = "external_attack_surface"
1012
+ EXCESSIVE_ACCESS_FINDING = "excessive_access_finding"
929
1013
  ISSUE = "issue"
930
1014
 
931
1015
 
@@ -995,6 +1079,73 @@ def get_wiz_vulnerability_queries(project_id: str, filter_by: Optional[dict] = N
995
1079
  "groupBy": "GRAPH_ENTITY",
996
1080
  },
997
1081
  },
1082
+ {
1083
+ "type": WizVulnerabilityType.SECRET_FINDING,
1084
+ "query": SECRET_FINDINGS_QUERY,
1085
+ "topic_key": "secretInstances",
1086
+ "file_path": SECRET_FINDINGS_FILE_PATH,
1087
+ "asset_lookup": "resource",
1088
+ "variables": {
1089
+ "first": 200,
1090
+ "fetchTotalCount": True,
1091
+ "filterBy": {"projectId": [project_id]},
1092
+ "orderBy": {"field": "RELATED_ISSUE_SEVERITY", "direction": "DESC"},
1093
+ },
1094
+ },
1095
+ {
1096
+ "type": WizVulnerabilityType.NETWORK_EXPOSURE_FINDING,
1097
+ "query": NETWORK_EXPOSURE_QUERY,
1098
+ "topic_key": "networkExposures",
1099
+ "file_path": NETWORK_EXPOSURE_FILE_PATH,
1100
+ "asset_lookup": "exposedEntity",
1101
+ "variables": {
1102
+ "first": 200,
1103
+ "filterBy": {
1104
+ "type": ["PUBLIC_INTERNET"],
1105
+ },
1106
+ },
1107
+ },
1108
+ {
1109
+ "type": WizVulnerabilityType.END_OF_LIFE_FINDING,
1110
+ "query": END_OF_LIFE_QUERY,
1111
+ "topic_key": "vulnerabilityFindings",
1112
+ "file_path": END_OF_LIFE_FILE_PATH,
1113
+ "asset_lookup": "vulnerableAsset",
1114
+ "variables": {
1115
+ "first": 200,
1116
+ "orderBy": {"field": "TECHNOLOGY_END_OF_LIFE_DATE", "direction": "DESC"},
1117
+ "includeRelatedIssueAnalytics": True,
1118
+ "filterBy": {"isEndOfLife": True, "projectId": [project_id]},
1119
+ },
1120
+ },
1121
+ {
1122
+ "type": WizVulnerabilityType.EXTERNAL_ATTACH_SURFACE,
1123
+ "query": EXTERNAL_ATTACK_SURFACE_QUERY,
1124
+ "topic_key": "networkExposures",
1125
+ "file_path": EXTERNAL_ATTACK_SURFACE_FILE_PATH,
1126
+ "asset_lookup": "exposedEntity",
1127
+ "variables": {
1128
+ "first": 200,
1129
+ "filterBy": {
1130
+ "type": ["PUBLIC_INTERNET"],
1131
+ },
1132
+ },
1133
+ },
1134
+ {
1135
+ "type": WizVulnerabilityType.EXCESSIVE_ACCESS_FINDING,
1136
+ "query": EXCESSIVE_ACCESS_QUERY,
1137
+ "topic_key": "excessiveAccessFindings",
1138
+ "file_path": EXCESSIVE_ACCESS_FILE_PATH,
1139
+ "asset_lookup": "scope",
1140
+ "variables": {
1141
+ "first": 200,
1142
+ "filterBy": {
1143
+ "status": {"equals": ["OPEN"]},
1144
+ },
1145
+ },
1146
+ },
1147
+ # Note: EXCESSIVE_ACCESS_FINDING temporarily disabled due to 422 Unprocessable Entity error
1148
+ # This may indicate the feature is not available for all Wiz tenants or requires different permissions
998
1149
  ]
999
1150
 
1000
1151
 
@@ -1031,3 +1182,608 @@ def get_wiz_issue_queries(project_id: str, filter_by: Optional[dict] = None) ->
1031
1182
  },
1032
1183
  },
1033
1184
  ]
1185
+
1186
+
1187
+ SECRET_FINDINGS_QUERY = """query SecretFindingsTable($after: String, $first: Int, $filterBy: SecretInstanceFilters, $orderBy: SecretInstanceOrder, $fetchTotalCount: Boolean = true) {
1188
+ secretInstances(
1189
+ filterBy: $filterBy
1190
+ first: $first
1191
+ after: $after
1192
+ orderBy: $orderBy
1193
+ ) {
1194
+ nodes {
1195
+ id
1196
+ name
1197
+ type
1198
+ confidence
1199
+ severity
1200
+ isEncrypted
1201
+ isManaged
1202
+ externalId
1203
+ status
1204
+ firstSeenAt
1205
+ lastSeenAt
1206
+ lastModifiedAt
1207
+ lastUpdatedAt
1208
+ resolvedAt
1209
+ validationStatus
1210
+ passwordDetails {
1211
+ isComplex
1212
+ length
1213
+ entropy
1214
+ }
1215
+ rule {
1216
+ id
1217
+ name
1218
+ type
1219
+ validityCheckSupported
1220
+ isAiPowered
1221
+ }
1222
+ projects {
1223
+ id
1224
+ name
1225
+ slug
1226
+ isFolder
1227
+ }
1228
+ secretDataEntities {
1229
+ id
1230
+ name
1231
+ type
1232
+ properties
1233
+ }
1234
+ relatedIssueAnalytics {
1235
+ issueCount
1236
+ informationalSeverityCount
1237
+ lowSeverityCount
1238
+ mediumSeverityCount
1239
+ highSeverityCount
1240
+ criticalSeverityCount
1241
+ }
1242
+ resource {
1243
+ ...SecretFindingResourceDetails
1244
+ cloudAccount {
1245
+ id
1246
+ externalId
1247
+ name
1248
+ cloudProvider
1249
+ }
1250
+ tags {
1251
+ key
1252
+ value
1253
+ }
1254
+ }
1255
+ }
1256
+ pageInfo {
1257
+ hasNextPage
1258
+ endCursor
1259
+ }
1260
+ totalCount @include(if: $fetchTotalCount)
1261
+ }
1262
+ }
1263
+
1264
+ fragment SecretFindingResourceDetails on SecretInstanceResource {
1265
+ id
1266
+ name
1267
+ type
1268
+ externalId
1269
+ status
1270
+ nativeType
1271
+ region
1272
+ typedProperties {
1273
+ ... on SecretInstanceResourceRepositoryBranch {
1274
+ repository {
1275
+ id
1276
+ name
1277
+ }
1278
+ }
1279
+ }
1280
+ }
1281
+
1282
+ # variables:
1283
+ # {
1284
+ # "fetchTotalCount": true,
1285
+ # "first": 20,
1286
+ # "filterBy": {},
1287
+ # "orderBy": {
1288
+ # "field": "RELATED_ISSUE_SEVERITY",
1289
+ # "direction": "DESC"
1290
+ # }
1291
+ # }
1292
+ """
1293
+
1294
+
1295
+ NETWORK_EXPOSURE_QUERY = """query NetworkExposuresTable($filterBy: NetworkExposureFilters, $first: Int, $after: String) {
1296
+ networkExposures(filterBy: $filterBy, first: $first, after: $after) {
1297
+ nodes {
1298
+ id
1299
+ exposedEntity {
1300
+ id
1301
+ name
1302
+ type
1303
+ properties
1304
+ }
1305
+ accessibleFrom {
1306
+ id
1307
+ name
1308
+ type
1309
+ properties
1310
+ }
1311
+ sourceIpRange
1312
+ destinationIpRange
1313
+ portRange
1314
+ appProtocols
1315
+ networkProtocols
1316
+ path {
1317
+ id
1318
+ name
1319
+ type
1320
+ properties
1321
+ }
1322
+ customIPRanges {
1323
+ id
1324
+ name
1325
+ ipRanges
1326
+ }
1327
+ firstSeenAt
1328
+ applicationEndpoints {
1329
+ id
1330
+ name
1331
+ type
1332
+ properties
1333
+ }
1334
+ type
1335
+ }
1336
+ pageInfo {
1337
+ hasNextPage
1338
+ endCursor
1339
+ }
1340
+ totalCount
1341
+ }
1342
+ }
1343
+
1344
+ # variables:
1345
+ # {
1346
+ # "first": 20,
1347
+ # "filterBy": {
1348
+ # "type": [
1349
+ # "PUBLIC_INTERNET"
1350
+ # ],
1351
+ # "publicInternetExposureFilters": {}
1352
+ # }
1353
+ # }
1354
+ """
1355
+
1356
+ END_OF_LIFE_QUERY = """query EndOfLifeFindingsTable($filterBy: VulnerabilityFindingFilters, $first: Int, $after: String, $orderBy: VulnerabilityFindingOrder = {direction: DESC, field: CREATED_AT}, $includeRelatedIssueAnalytics: Boolean = false) {
1357
+ vulnerabilityFindings(
1358
+ filterBy: $filterBy
1359
+ first: $first
1360
+ after: $after
1361
+ orderBy: $orderBy
1362
+ ) {
1363
+ nodes {
1364
+ ...VulnerabilityFindingFragment
1365
+ technologyEndOfLifeAt
1366
+ relatedIssueAnalytics @include(if: $includeRelatedIssueAnalytics) {
1367
+ ...VulnerabilityFindingRelatedIssueAnalyticsFragment
1368
+ }
1369
+ }
1370
+ pageInfo {
1371
+ hasNextPage
1372
+ endCursor
1373
+ }
1374
+ }
1375
+ }
1376
+
1377
+ fragment VulnerabilityFindingFragment on VulnerabilityFinding {
1378
+ id
1379
+ name
1380
+ detailedName
1381
+ description
1382
+ severity
1383
+ status
1384
+ fixedVersion
1385
+ detectionMethod
1386
+ firstDetectedAt
1387
+ lastDetectedAt
1388
+ resolvedAt
1389
+ validatedInRuntime
1390
+ hasTriggerableRemediation
1391
+ dataSourceName
1392
+ fixDate
1393
+ fixDateBefore
1394
+ publishedDate
1395
+ version
1396
+ isOperatingSystemEndOfLife
1397
+ recommendedVersion
1398
+ locationPath
1399
+ artifactType {
1400
+ ...SBOMArtifactTypeFragment
1401
+ }
1402
+ projects {
1403
+ id
1404
+ name
1405
+ slug
1406
+ isFolder
1407
+ }
1408
+ ignoreRules {
1409
+ id
1410
+ }
1411
+ layerMetadata {
1412
+ id
1413
+ details
1414
+ isBaseLayer
1415
+ }
1416
+ vulnerableAsset {
1417
+ ... on VulnerableAssetBase {
1418
+ id
1419
+ type
1420
+ name
1421
+ cloudPlatform
1422
+ subscriptionName
1423
+ subscriptionExternalId
1424
+ subscriptionId
1425
+ tags
1426
+ hasLimitedInternetExposure
1427
+ hasWideInternetExposure
1428
+ isAccessibleFromVPN
1429
+ isAccessibleFromOtherVnets
1430
+ isAccessibleFromOtherSubscriptions
1431
+ nativeType
1432
+ externalId
1433
+ providerUniqueId
1434
+ }
1435
+ ... on VulnerableAssetVirtualMachine {
1436
+ id
1437
+ type
1438
+ name
1439
+ cloudPlatform
1440
+ subscriptionName
1441
+ subscriptionExternalId
1442
+ subscriptionId
1443
+ tags
1444
+ operatingSystem
1445
+ imageName
1446
+ imageId
1447
+ imageNativeType
1448
+ hasLimitedInternetExposure
1449
+ hasWideInternetExposure
1450
+ isAccessibleFromVPN
1451
+ isAccessibleFromOtherVnets
1452
+ isAccessibleFromOtherSubscriptions
1453
+ computeInstanceGroup {
1454
+ id
1455
+ externalId
1456
+ name
1457
+ replicaCount
1458
+ tags
1459
+ }
1460
+ nativeType
1461
+ }
1462
+ ... on VulnerableAssetServerless {
1463
+ id
1464
+ type
1465
+ name
1466
+ cloudPlatform
1467
+ subscriptionName
1468
+ subscriptionExternalId
1469
+ subscriptionId
1470
+ tags
1471
+ hasLimitedInternetExposure
1472
+ hasWideInternetExposure
1473
+ isAccessibleFromVPN
1474
+ isAccessibleFromOtherVnets
1475
+ isAccessibleFromOtherSubscriptions
1476
+ nativeType
1477
+ }
1478
+ ... on VulnerableAssetContainerImage {
1479
+ id
1480
+ type
1481
+ name
1482
+ cloudPlatform
1483
+ subscriptionName
1484
+ subscriptionExternalId
1485
+ subscriptionId
1486
+ tags
1487
+ hasLimitedInternetExposure
1488
+ hasWideInternetExposure
1489
+ isAccessibleFromVPN
1490
+ isAccessibleFromOtherVnets
1491
+ isAccessibleFromOtherSubscriptions
1492
+ repository {
1493
+ vertexId
1494
+ name
1495
+ }
1496
+ registry {
1497
+ vertexId
1498
+ name
1499
+ }
1500
+ scanSource
1501
+ executionControllers {
1502
+ ...VulnerableAssetExecutionControllerDetails
1503
+ }
1504
+ nativeType
1505
+ tagReferences
1506
+ }
1507
+ ... on VulnerableAssetContainer {
1508
+ id
1509
+ type
1510
+ name
1511
+ cloudPlatform
1512
+ subscriptionName
1513
+ subscriptionExternalId
1514
+ subscriptionId
1515
+ tags
1516
+ hasLimitedInternetExposure
1517
+ hasWideInternetExposure
1518
+ isAccessibleFromVPN
1519
+ isAccessibleFromOtherVnets
1520
+ isAccessibleFromOtherSubscriptions
1521
+ executionControllers {
1522
+ ...VulnerableAssetExecutionControllerDetails
1523
+ }
1524
+ nativeType
1525
+ }
1526
+ ... on VulnerableAssetRepositoryBranch {
1527
+ id
1528
+ type
1529
+ name
1530
+ cloudPlatform
1531
+ repositoryId
1532
+ repositoryName
1533
+ nativeType
1534
+ }
1535
+ ... on VulnerableAssetEndpoint {
1536
+ id
1537
+ type
1538
+ name
1539
+ cloudPlatform
1540
+ subscriptionName
1541
+ subscriptionExternalId
1542
+ subscriptionId
1543
+ tags
1544
+ hasLimitedInternetExposure
1545
+ hasWideInternetExposure
1546
+ isAccessibleFromVPN
1547
+ isAccessibleFromOtherVnets
1548
+ isAccessibleFromOtherSubscriptions
1549
+ nativeType
1550
+ }
1551
+ ... on VulnerableAssetPaaSResource {
1552
+ id
1553
+ type
1554
+ name
1555
+ cloudPlatform
1556
+ subscriptionName
1557
+ subscriptionExternalId
1558
+ subscriptionId
1559
+ tags
1560
+ nativeType
1561
+ }
1562
+ ... on VulnerableAssetVirtualMachineImage {
1563
+ id
1564
+ type
1565
+ name
1566
+ cloudPlatform
1567
+ subscriptionName
1568
+ subscriptionExternalId
1569
+ subscriptionId
1570
+ tags
1571
+ hasLimitedInternetExposure
1572
+ hasWideInternetExposure
1573
+ isAccessibleFromVPN
1574
+ isAccessibleFromOtherVnets
1575
+ isAccessibleFromOtherSubscriptions
1576
+ nativeType
1577
+ }
1578
+ ... on VulnerableAssetNetworkAddress {
1579
+ subscriptionId
1580
+ subscriptionName
1581
+ subscriptionExternalId
1582
+ tags
1583
+ address
1584
+ addressType
1585
+ }
1586
+ ... on VulnerableAssetCommon {
1587
+ id
1588
+ type
1589
+ name
1590
+ cloudPlatform
1591
+ subscriptionName
1592
+ subscriptionExternalId
1593
+ subscriptionId
1594
+ tags
1595
+ nativeType
1596
+ }
1597
+ }
1598
+ }
1599
+
1600
+
1601
+ fragment SBOMArtifactTypeFragment on SBOMArtifactType {
1602
+ group
1603
+ codeLibraryLanguage
1604
+ osPackageManager
1605
+ hostedTechnology {
1606
+ id
1607
+ name
1608
+ icon
1609
+ }
1610
+ plugin
1611
+ custom
1612
+ }
1613
+
1614
+
1615
+ fragment VulnerableAssetExecutionControllerDetails on VulnerableAssetExecutionController {
1616
+ id
1617
+ entityType
1618
+ externalId
1619
+ providerUniqueId
1620
+ name
1621
+ subscriptionExternalId
1622
+ subscriptionId
1623
+ subscriptionName
1624
+ ancestors {
1625
+ id
1626
+ name
1627
+ entityType
1628
+ externalId
1629
+ providerUniqueId
1630
+ }
1631
+ }
1632
+
1633
+
1634
+ fragment VulnerabilityFindingRelatedIssueAnalyticsFragment on VulnerabilityFindingRelatedIssueAnalytics {
1635
+ issueCount
1636
+ informationalSeverityCount
1637
+ lowSeverityCount
1638
+ mediumSeverityCount
1639
+ highSeverityCount
1640
+ criticalSeverityCount
1641
+ }
1642
+
1643
+ # variables:
1644
+ # {
1645
+ # "orderBy": {
1646
+ # "field": "TECHNOLOGY_END_OF_LIFE_DATE",
1647
+ # "direction": "DESC"
1648
+ # },
1649
+ # "includeRelatedIssueAnalytics": true,
1650
+ # "first": 30,
1651
+ # "filterBy": {
1652
+ # "isEndOfLife": true
1653
+ # }
1654
+ # }
1655
+ """
1656
+
1657
+ EXTERNAL_ATTACK_SURFACE_QUERY = """query NetworkExposuresTable($filterBy: NetworkExposureFilters, $first: Int, $after: String) {
1658
+ networkExposures(filterBy: $filterBy, first: $first, after: $after) {
1659
+ nodes {
1660
+ id
1661
+ exposedEntity {
1662
+ id
1663
+ name
1664
+ type
1665
+ properties
1666
+ }
1667
+ accessibleFrom {
1668
+ id
1669
+ name
1670
+ type
1671
+ properties
1672
+ }
1673
+ sourceIpRange
1674
+ destinationIpRange
1675
+ portRange
1676
+ appProtocols
1677
+ networkProtocols
1678
+ path {
1679
+ id
1680
+ name
1681
+ type
1682
+ properties
1683
+ }
1684
+ customIPRanges {
1685
+ id
1686
+ name
1687
+ ipRanges
1688
+ }
1689
+ firstSeenAt
1690
+ applicationEndpoints {
1691
+ id
1692
+ name
1693
+ type
1694
+ properties
1695
+ }
1696
+ type
1697
+ }
1698
+ pageInfo {
1699
+ hasNextPage
1700
+ endCursor
1701
+ }
1702
+ totalCount
1703
+ }
1704
+ }"""
1705
+
1706
+ EXCESSIVE_ACCESS_QUERY = """query ExcessiveAccessFindingsTable($filterBy: ExcessiveAccessFindingFilters, $first: Int, $after: String) {
1707
+ excessiveAccessFindings(filterBy: $filterBy, first: $first, after: $after) {
1708
+ nodes {
1709
+ ...ExcessiveAccessFindingDetails
1710
+ }
1711
+ pageInfo {
1712
+ hasNextPage
1713
+ endCursor
1714
+ }
1715
+ totalCount
1716
+ }
1717
+ }
1718
+
1719
+ fragment ExcessiveAccessFindingDetails on ExcessiveAccessFinding {
1720
+ id
1721
+ projects {
1722
+ id
1723
+ name
1724
+ slug
1725
+ isFolder
1726
+ }
1727
+ name
1728
+ status
1729
+ severity
1730
+ remediationType
1731
+ excessiveServices
1732
+ hasUnusedAdminPermissions
1733
+ hasUnusedHighPermissions
1734
+ hasUnusedDataPermissions
1735
+ builtInPolicyRemediationName
1736
+ scope {
1737
+ graphEntity {
1738
+ id
1739
+ name
1740
+ type
1741
+ properties
1742
+ }
1743
+ }
1744
+ description
1745
+ documentationUrl
1746
+ remediationInstructions
1747
+ principal {
1748
+ graphEntity {
1749
+ id
1750
+ name
1751
+ type
1752
+ properties
1753
+ }
1754
+ cloudAccount {
1755
+ id
1756
+ name
1757
+ externalId
1758
+ cloudProvider
1759
+ }
1760
+ }
1761
+ context {
1762
+ graphEntity {
1763
+ id
1764
+ name
1765
+ type
1766
+ properties
1767
+ }
1768
+ }
1769
+ relatedIssueAnalytics {
1770
+ issueCount
1771
+ criticalSeverityCount
1772
+ highSeverityCount
1773
+ mediumSeverityCount
1774
+ lowSeverityCount
1775
+ }
1776
+ }
1777
+
1778
+ # variables:
1779
+ # {
1780
+ # "first": 20,
1781
+ # "filterBy": {
1782
+ # "status": {
1783
+ # "equals": [
1784
+ # "OPEN"
1785
+ # ]
1786
+ # }
1787
+ # }
1788
+ # }
1789
+ """