Skip to content

Commit

Permalink
fix: rename policy apiVersion and kind
Browse files Browse the repository at this point in the history
  • Loading branch information
josedonizetti committed Sep 21, 2023
1 parent 44b93e2 commit 4d1f60e
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 85 deletions.
4 changes: 2 additions & 2 deletions deploy/helm/tracee/templates/tracee-policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
{{- include "tracee.labels" . | nindent 4 }}
data:
signatures.yaml: |-
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: signature-events
annotations:
Expand Down
4 changes: 2 additions & 2 deletions deploy/kubernetes/tracee/tracee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ metadata:
name: tracee-policies
data:
signatures.yaml: |-
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: signature-events
annotations:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/events/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Tracing `execve` events with [policies]:

```
cat <<EOF >sample_policy.yaml
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: sample-policy
annotations:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/policies/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ You can load multiple (up to 64) policies into Tracee using the --policy flag pr
Following is a sample policy:

```yaml
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: overview-policy
annotations:
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/policies/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ spec:
Context is data which is collected along the event. They can be filtered like:

```yaml
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: sample-context-filter
annotations:
Expand Down Expand Up @@ -245,8 +245,8 @@ filters:
Events have arguments, which can be filtered.
```yaml
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: sample-argument-filter
annotations:
Expand Down Expand Up @@ -275,8 +275,8 @@ tracee -e security_file_open --output json
Return values can also be filtered.

```yaml
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: sample-return-value
annotations:
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/k8s-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Data
====
signatures.yaml:
----
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: signature-events
annotations:
Expand Down Expand Up @@ -113,8 +113,8 @@ To add a new policy for tracking execve events, add the following YAML block bef
```yaml
data:
events.yaml: |-
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: execve-event
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/container_dns_events.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: container-dns-events
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/context_comm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: context-comm
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/dig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: dig
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/new_containers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: new-containers
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/new_pids.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: new-pids
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/not_containers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: not-containers
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/openat_args_pahtname.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: openat-args-pathname
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/pid_equal.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: pid-equal
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/scope_comm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: comm-strace
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/signature_events.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: signature-events
annotations:
Expand Down
4 changes: 2 additions & 2 deletions examples/policies/uid_higher_than_or_equal_to_zero.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: aquasecurity.github.io/v1beta1
kind: TraceePolicy
apiVersion: tracee.aquasec.com/v1beta1
kind: Policy
metadata:
name: uid-higher-than-or-equal-to-zero
annotations:
Expand Down
4 changes: 2 additions & 2 deletions pkg/policy/v1beta1/policy_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func (p PolicyFile) Validate() error {
return errfmt.Errorf("policy name %s is invalid: %s", p.Name(), err)
}

if p.APIVersion != "aquasecurity.github.io/v1beta1" {
if p.APIVersion != "tracee.aquasec.com/v1beta1" {
return errfmt.Errorf("policy %s, apiVersion not supported", p.Name())
}

if p.Kind != "TraceePolicy" {
if p.Kind != "Policy" {
return errfmt.Errorf("policy %s, kind not supported", p.Name())
}

Expand Down
Loading

0 comments on commit 4d1f60e

Please sign in to comment.