Skip to content

Commit bad0a9c

Browse files
feat(securitycenter): update the API
#### securitycenter:v1beta2 The following keys were added: - schemas.AzureResourceGroup.properties.id.description - schemas.AzureResourceGroup.properties.id.type - schemas.CelPolicySpec.description - schemas.CelPolicySpec.id - schemas.CelPolicySpec.properties.spec.description - schemas.CelPolicySpec.properties.spec.type - schemas.CelPolicySpec.type - schemas.GoogleCloudSecuritycenterV1CustomConfig.properties.celPolicy.$ref - schemas.GoogleCloudSecuritycenterV1CustomConfig.properties.celPolicy.description - schemas.GoogleCloudSecuritycenterV2AzureResourceGroup.properties.id.description - schemas.GoogleCloudSecuritycenterV2AzureResourceGroup.properties.id.type
1 parent 98170a9 commit bad0a9c

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

discovery/securitycenter-v1beta2.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@
19931993
}
19941994
}
19951995
},
1996-
"revision": "20240927",
1996+
"revision": "20241004",
19971997
"rootUrl": "https://securitycenter.googleapis.com/",
19981998
"schemas": {
19991999
"Access": {
@@ -2291,6 +2291,10 @@
22912291
"description": "Represents an Azure resource group.",
22922292
"id": "AzureResourceGroup",
22932293
"properties": {
2294+
"id": {
2295+
"description": "The ID of the Azure resource group.",
2296+
"type": "string"
2297+
},
22942298
"name": {
22952299
"description": "The name of the Azure resource group. This is not a UUID.",
22962300
"type": "string"
@@ -2385,6 +2389,17 @@
23852389
},
23862390
"type": "object"
23872391
},
2392+
"CelPolicySpec": {
2393+
"description": "YAML-based rule that uses CEL, which supports the declaration of variables and a filtering predicate. A vulnerable resource is emitted if the evaluation is false. Given: 1) the resource types as: - resource_types: \"compute.googleapis.com/Instance\" - resource_types: \"compute.googleapis.com/Firewall\" 2) the CEL policy spec as: name: bad_instance resource_filters: - name: instance resource_type: compute.googleapis.com/Instance filter: > instance.status == 'RUNNING' && 'public' in instance.tags.items - name: firewall resource_type: compute.googleapis.com/Firewall filter: > firewall.direction == 'INGRESS' && !firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii() in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11-256'))) rule: match: - predicate: > instance.networkInterfaces.exists(net, firewall.network == net.network) output: > {'message': 'Compute instance with publicly accessible ports', 'instance': instance.name} Users are able to join resource types together using the exact format as Kubernetes Validating Admission policies.",
2394+
"id": "CelPolicySpec",
2395+
"properties": {
2396+
"spec": {
2397+
"description": "The CEL policy to evaluate to produce findings. A finding is generated when the policy validation evaluates to false.",
2398+
"type": "string"
2399+
}
2400+
},
2401+
"type": "object"
2402+
},
23882403
"CloudArmor": {
23892404
"description": "Fields related to Google Cloud Armor findings.",
23902405
"id": "CloudArmor",
@@ -3782,6 +3797,10 @@
37823797
"description": "Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.",
37833798
"id": "GoogleCloudSecuritycenterV1CustomConfig",
37843799
"properties": {
3800+
"celPolicy": {
3801+
"$ref": "CelPolicySpec",
3802+
"description": "The CEL policy spec attached to the custom module."
3803+
},
37853804
"customOutput": {
37863805
"$ref": "GoogleCloudSecuritycenterV1CustomOutputSpec",
37873806
"description": "Custom output properties."
@@ -4864,6 +4883,10 @@
48644883
"description": "Represents an Azure resource group.",
48654884
"id": "GoogleCloudSecuritycenterV2AzureResourceGroup",
48664885
"properties": {
4886+
"id": {
4887+
"description": "The ID of the Azure resource group.",
4888+
"type": "string"
4889+
},
48674890
"name": {
48684891
"description": "The name of the Azure resource group. This is not a UUID.",
48694892
"type": "string"

src/apis/securitycenter/v1beta2.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ export namespace securitycenter_v1beta2 {
372372
* Represents an Azure resource group.
373373
*/
374374
export interface Schema$AzureResourceGroup {
375+
/**
376+
* The ID of the Azure resource group.
377+
*/
378+
id?: string | null;
375379
/**
376380
* The name of the Azure resource group. This is not a UUID.
377381
*/
@@ -448,6 +452,15 @@ export namespace securitycenter_v1beta2 {
448452
*/
449453
storagePool?: string | null;
450454
}
455+
/**
456+
* YAML-based rule that uses CEL, which supports the declaration of variables and a filtering predicate. A vulnerable resource is emitted if the evaluation is false. Given: 1) the resource types as: - resource_types: "compute.googleapis.com/Instance" - resource_types: "compute.googleapis.com/Firewall" 2) the CEL policy spec as: name: bad_instance resource_filters: - name: instance resource_type: compute.googleapis.com/Instance filter: \> instance.status == 'RUNNING' && 'public' in instance.tags.items - name: firewall resource_type: compute.googleapis.com/Firewall filter: \> firewall.direction == 'INGRESS' && !firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii() in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11-256'))) rule: match: - predicate: \> instance.networkInterfaces.exists(net, firewall.network == net.network) output: \> {'message': 'Compute instance with publicly accessible ports', 'instance': instance.name\} Users are able to join resource types together using the exact format as Kubernetes Validating Admission policies.
457+
*/
458+
export interface Schema$CelPolicySpec {
459+
/**
460+
* The CEL policy to evaluate to produce findings. A finding is generated when the policy validation evaluates to false.
461+
*/
462+
spec?: string | null;
463+
}
451464
/**
452465
* Fields related to Google Cloud Armor findings.
453466
*/
@@ -1372,6 +1385,10 @@ export namespace securitycenter_v1beta2 {
13721385
* Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.
13731386
*/
13741387
export interface Schema$GoogleCloudSecuritycenterV1CustomConfig {
1388+
/**
1389+
* The CEL policy spec attached to the custom module.
1390+
*/
1391+
celPolicy?: Schema$CelPolicySpec;
13751392
/**
13761393
* Custom output properties.
13771394
*/
@@ -2119,6 +2136,10 @@ export namespace securitycenter_v1beta2 {
21192136
* Represents an Azure resource group.
21202137
*/
21212138
export interface Schema$GoogleCloudSecuritycenterV2AzureResourceGroup {
2139+
/**
2140+
* The ID of the Azure resource group.
2141+
*/
2142+
id?: string | null;
21222143
/**
21232144
* The name of the Azure resource group. This is not a UUID.
21242145
*/

0 commit comments

Comments
 (0)