forked from open-cluster-management-io/policy-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Sysdig Agent enforcement policy (open-cluster-management-io#6)
Signed-off-by: Alvaro Iradier <[email protected]>
- Loading branch information
Showing
2 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
community/SI-System-and-Information-Integrity/policy-sysdig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: Policy | ||
metadata: | ||
name: policy-sysdig | ||
annotations: | ||
policy.open-cluster-management.io/standards: NIST SP 800-53 | ||
policy.open-cluster-management.io/categories: SI System and Information Integrity | ||
policy.open-cluster-management.io/controls: SI-5 Security Alerts, Advisories, and Directives | ||
spec: | ||
remediationAction: enforce | ||
disabled: false | ||
policy-templates: | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: policy-sysdig-ns | ||
spec: | ||
remediationAction: enforce # the policy-template spec.remediationAction is overridden by the preceding parameter value for spec.remediationAction. | ||
severity: low | ||
namespaceSelector: | ||
exclude: ["kube-*"] | ||
include: ["*"] | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: sysdig-operator | ||
spec: {} | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: policy-sysdig-operatorgroup | ||
spec: | ||
remediationAction: enforce # the policy-template spec.remediationAction is overridden by the preceding parameter value for spec.remediationAction. | ||
severity: low | ||
namespaceSelector: | ||
exclude: ["kube-*"] | ||
include: ["sysdig-operator"] | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: sysdig-operatorgroup | ||
namespace: sysdig-operator | ||
spec: | ||
targetNamespaces: | ||
- sysdig-operator | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: policy-sysdig-subscription | ||
spec: | ||
remediationAction: enforce # the policy-template spec.remediationAction is overridden by the preceding parameter value for spec.remediationAction. | ||
severity: low | ||
namespaceSelector: | ||
exclude: ["kube-*"] | ||
include: ["sysdig-operator"] | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: sysdig-operator | ||
namespace: sysdig-operator | ||
spec: | ||
channel: stable | ||
installPlanApproval: Automatic | ||
name: sysdig-certified | ||
source: certified-operators | ||
sourceNamespace: openshift-marketplace | ||
startingCSV: sysdig-operator.v1.8.3 | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: policy-sysdig-installation | ||
spec: | ||
remediationAction: enforce # the policy-template spec.remediationAction is overridden by the preceding parameter value for spec.remediationAction. | ||
severity: low | ||
namespaceSelector: | ||
exclude: ["kube-*"] | ||
include: ["sysdig-operator"] | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: sysdig.com/v1 | ||
kind: SysdigAgent | ||
metadata: | ||
name: sysdigagent-enforcement | ||
namespace: sysdig-operator | ||
spec: | ||
scc: | ||
create: true | ||
sysdig: | ||
#Set access key | ||
accessKey: "<SYSDIG_AGENT_ACCESS_KEY>" | ||
--- | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: PlacementBinding | ||
metadata: | ||
name: binding-policy-sysdig | ||
placementRef: | ||
name: placement-policy-sysdig | ||
kind: PlacementRule | ||
apiGroup: apps.open-cluster-management.io | ||
subjects: | ||
- name: policy-sysdig | ||
kind: Policy | ||
apiGroup: policy.open-cluster-management.io | ||
--- | ||
apiVersion: apps.open-cluster-management.io/v1 | ||
kind: PlacementRule | ||
metadata: | ||
name: placement-policy-sysdig | ||
spec: | ||
clusterConditions: | ||
- status: "True" | ||
type: ManagedClusterConditionAvailable | ||
clusterSelector: | ||
matchExpressions: | ||
- {key: environment, operator: In, values: ["dev"]} |