-
Notifications
You must be signed in to change notification settings - Fork 52
/
require-namespace-network-policies.yaml
65 lines (65 loc) · 2.55 KB
/
require-namespace-network-policies.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 2024 Google LLC
#
# This is “Software” that is licensed under the “General Software” section of
# the Service Specific Terms (https://cloud.google.com/terms/service-terms) for
# usage in accordance with the following “Scope of Use”: This file may only be
# used on an Anthos cluster, including any associated ci/cd use. “Anthos
# cluster” is defined as “A Cluster (of any kind) registered to a fleet project
# where the Anthos API is enabled”.
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sRequireNamespaceNetworkPolicies
metadata:
name: nist-sp-800-190-require-namespace-network-policies
labels:
policycontroller.gke.io/bundleName: nist-sp-800-190
annotations:
policycontroller.gke.io/bundleVersion: "202403.0"
policycontroller.gke.io/constraintData: |-
"{
bundleName: 'nist-sp-800-190',
bundleDisplayName: 'NIST SP 800-190',
bundleLink: 'https://cloud.google.com/anthos-config-management/docs/how-to/using-nist-sp-800-190',
bundleVersion: '202403.0',
bundleDescription: 'Use the NIST SP 800-190 policy bundle with Policy Controller to evaluate the compliance of your cluster resources against some aspects of the NIST SP 800-190 Appendix B controls.',
controlNumbers: '[AC-4,CA-9,SC-4]',
severity: 'UNSPECIFIED',
description: 'Requires that every namespace defined in the cluster has a NetworkPolicy.',
remediation: 'Cannot have a namespace in the cluster without a NetworkPolicy. Add a NetworkPolicy to your namespace. See "Network Policies" for more information: https://kubernetes.io/docs/concepts/services-networking/network-policies',
minimumTemplateLibraryVersion: '1.10.1',
constraintHash: '00c87f4b3e9fa7767959d337b4352d41c3691c501af2a94abf43c3b3eb505652'
}"
spec:
enforcementAction: dryrun
match:
excludedNamespaces:
- kube-system
- kube-node-lease
- kube-public
- gatekeeper-system
- config-management-system
- config-management-monitoring
- resource-group-system
- gke-connect
- istio-system
- asm-system
- capi-system
- vm-system
- gke-managed-metrics-server
- cert-manager
- anthos-creds
- capi-kubeadm-bootstrap-system
- gke-system
- anthos-identity-service
- gmp-system
- gmp-public
- gke-gmp-system
- gke-managed-filestorecsi
- apigee
- apigee-system
- gke-managed-system
- gke-managed-cim
kinds:
- apiGroups:
- ""
kinds:
- Namespace