Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ Platform usage.
A shell script for gDNS-zDNS project bulk migration.
* [GKE Billing Export](tools/gke-billing-export) - Google Kubernetes Engine
fine grained billing export.
* [GKE GPU Driver Version](tools/gke-gpu-driver-version) - A tool to find the supported GPU driver version for a given GKE cluster version and GPU type.
* [gmon](tools/gmon/) - A command-line interface (CLI) for Cloud Monitoring
written in Python.
* [Google Cloud Support Slackbot](tools/google-cloud-support-slackbot) - Slack
Expand Down
83 changes: 41 additions & 42 deletions examples/creative-studio/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/creative-studio/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"@angular/material": "^18.2.1",
"@angular/platform-browser": "^18.1.0",
"@angular/platform-browser-dynamic": "^18.1.0",
"@angular/platform-server": "^18.1.0",
"@angular/platform-server": "^18.2.14",
"@angular/router": "^18.1.0",
"@angular/ssr": "^18.1.2",
"@angular/ssr": "^18.2.21",
"express": "^4.18.2",
"file-saver": "^2.0.5",
"ngx-image-cropper": "^9.1.5",
Expand Down
1 change: 1 addition & 0 deletions tools/custom-organization-policy-library/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.terraform.tfstate*
*.out
*.bak
*.env
*/**/terraform.tfstate*
terraform/
tests/venv/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! Copyright 2024 Google LLC
#!
#! Licensed under the Apache License, Version 2.0 (the "License");
#! you may not use this file except in compliance with the License.
#! You may obtain a copy of the License at
#!
#! http://www.apache.org/licenses/LICENSE-2.0
#!
#! Unless required by applicable law or agreed to in writing, software
#! distributed under the License is distributed on an "AS IS" BASIS,
#! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#! See the License for the specific language governing permissions and
#! limitations under the License.

#@ load("@ytt:overlay", "overlay")
#@data/values-schema
---
#@overlay/match missing_ok=True
accesscontextmanager:
accesscontextmanagerDisableBridgePerimeters:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: false
cis: false
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ cloudsql:
bundles:
pci-dss: false
cis: false
cloudsqlRequirePostgreSQLDatabaseAdditionalFlags:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: true
cis: true
cloudsqlRequirePostgreSQLDatabaseFlags:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ firewall:
params:
#@schema/validation min_len=1
name_regex: ""
firewallEnforcePolicyRuleLogging:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: false
cis: false
firewallEnforceRuleLogging:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: false
cis: false
firewallRequireDescription:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
---
#@overlay/match missing_ok=True
gke:
gkeAllowedInitialClusterVersions:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: true
cis: false
params:
#@schema/validation min_len=1
initial_cluster_versions:
- ""
gkeAllowedNodePoolImages:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ iam:
bundles:
pci-dss: false
cis: true
params:
exceptions:
- ""
iamDisableBasicRoles:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
Expand All @@ -51,9 +54,21 @@ iam:
bundles:
pci-dss: true
cis: true
params:
exceptions:
- ""
iamDisablePublicBindings:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: true
cis: true
cis: true
iamDisableRedisAdminRoles:
#@schema/validation one_of=["default", "skip", "include", "skip-policy"]
generation: "default"
bundles:
pci-dss: true
cis: true
params:
exceptions:
- ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#@ load("/constraints.lib.star", "build_constraint")
#@ constraint = build_constraint("accesscontextmanagerDisableBridgePerimeters")

#@ if constraint.to_generate():
name: #@ constraint.constraint_name()
resourceTypes:
- accesscontextmanager.googleapis.com/ServicePerimeter
methodTypes:
- CREATE
- UPDATE
condition: "resource.perimeterType == 'PERIMETER_TYPE_BRIDGE'"
actionType: DENY
displayName: Deny usage of perimeter bridges
description: Ensure no perimeter bridges are used. Instead, use ingress and egress rules.
#@ end
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#@ load("/constraints.lib.star", "build_constraint")
#@ constraint = build_constraint("cloudsqlRequirePostgreSQLDatabaseAdditionalFlags")

#@ if constraint.to_generate():
name: #@ constraint.constraint_name()
resourceTypes:
- sqladmin.googleapis.com/Instance
methodTypes:
- CREATE
- UPDATE
condition: >-
resource.databaseVersion.startsWith('POSTGRES') && (
!resource.settings.databaseFlags.exists(flag, flag.name == 'log_checkpoints' && flag.value == 'on') ||
!resource.settings.databaseFlags.exists(flag, flag.name == 'log_executor_stats' && flag.value == 'off') ||
!resource.settings.databaseFlags.exists(flag, flag.name == 'log_lock_waits' && flag.value == 'on')
)
actionType: DENY
display_name: Require Cloud SQL for PostgreSQL instance database flags to be configured correctly (e.g log_checkpoints, log_executor_stats, log_lock_waits)
description: Ensure Cloud SQL for PostgreSQL instance database flags are set correctly (e.g log_checkpoints, log_executor_stats, log_lock_waits)
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#@ constraint = build_constraint("computeAllowedInstanceLabels")

#@ def condition(labels):
#@ return "resource.labels.all(label, (label in " + str(labels) + ")) == false"
#@ return "resource.labels.all(label, (label in " + str(labels) + ") || label.startsWith('goog-')) == false"
#@ end

#@ if constraint.to_generate():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
#@ constraint = build_constraint("firewallEnforceNamingConvention")

#@ def condition(name_regex):
#@ return 'resource.name.matches("' + str(name_regex) + '") == false'
#@ lines = [
#@ '(',
#@ ' resource.name.matches("' + str(name_regex) + '") == false &&',
#@ ' !resource.name.startsWith("gke-") &&',
#@ ' !resource.name.startsWith("k8s-") &&',
#@ ' !resource.name.endsWith("-hc") &&',
#@ ' !resource.name.startsWith("k8s2-") &&',
#@ ' !resource.name.startsWith("gkegw1-l7-") &&',
#@ ' !resource.name.startsWith("gkemcg1-l7-")',
#@ ')'
#@ ]
#@ return "\n".join(lines)
#@ end

#@ if constraint.to_generate():
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#@ load("/constraints.lib.star", "build_constraint")
#@ constraint = build_constraint("firewallEnforcePolicyRuleLogging")

#@ if constraint.to_generate():
name: #@ constraint.constraint_name()
resource_types:
- compute.googleapis.com/FirewallPolicy
condition: resource.rules.exists(rule, rule.action != 'goto_next' && rule.enableLogging == false)
action_type: DENY
method_types:
- CREATE
- UPDATE
display_name: Require Firewall Policy rules to have logging enabled
description: Ensure that Firewall Policy rules have logging enabled
#@ end
Loading