|
1 | 1 | resource "sysdig_secure_rule_container" "sample" { |
2 | | - name = "Other example of Policy" |
| 2 | + name = "Other example of Policy" |
3 | 3 | description = "this is other example of policy" |
4 | | - tags = ["container", "cis"] |
| 4 | + tags = ["container", "cis"] |
5 | 5 |
|
6 | | - matching = true // default |
| 6 | + matching = true // default |
7 | 7 | containers = ["foo", "foo:bar"] |
8 | 8 | } |
9 | 9 |
|
10 | | -resource "sysdig_secure_rule_filesystem" "foo" { |
11 | | - name = "Other example of Policy" |
| 10 | +resource "sysdig_secure_rule_filesystem" "foo" { |
| 11 | + name = "Other example of Policy" |
12 | 12 | description = "this is other example of policy" |
13 | | - tags = ["filesystem", "cis"] |
| 13 | + tags = ["filesystem", "cis"] |
14 | 14 |
|
15 | 15 | read_only { |
16 | 16 | matching = true // default |
17 | | - paths = ["/etc"] |
| 17 | + paths = ["/etc"] |
18 | 18 | } |
19 | 19 |
|
20 | 20 | read_write { |
21 | 21 | matching = true // default |
22 | | - paths = ["/tmp"] |
| 22 | + paths = ["/tmp"] |
23 | 23 | } |
24 | 24 | } |
25 | 25 |
|
26 | 26 | resource "sysdig_secure_rule_network" "foo" { |
27 | | - name = "Other example of Policy" // ID |
| 27 | + name = "Other example of Policy" // ID |
28 | 28 | description = "this is other example of policy" |
29 | | - tags = ["network", "cis"] |
| 29 | + tags = ["network", "cis"] |
30 | 30 |
|
31 | | - block_inbound = true |
| 31 | + block_inbound = true |
32 | 32 | block_outbound = true |
33 | 33 |
|
34 | 34 | tcp { |
35 | 35 | matching = true // default |
36 | | - ports = [80, 443] |
| 36 | + ports = [80, 443] |
37 | 37 | } |
38 | 38 |
|
39 | 39 | udp { |
40 | 40 | matching = true // default |
41 | | - ports = [80, 443] |
| 41 | + ports = [80, 443] |
42 | 42 | } |
43 | 43 | } |
44 | 44 |
|
45 | 45 | resource "sysdig_secure_rule_process" "foo" { |
46 | | - name = "Other example of Policy" // ID |
| 46 | + name = "Other example of Policy" // ID |
47 | 47 | description = "this is other example of policy" |
48 | 48 |
|
49 | | - matching = true // default |
| 49 | + matching = true // default |
50 | 50 | processes = ["bash"] |
51 | 51 | } |
52 | 52 |
|
53 | 53 | resource "sysdig_secure_rule_syscall" "foo" { |
54 | | - name = "Other example of Policy" // ID |
| 54 | + name = "Other example of Policy" // ID |
55 | 55 | description = "this is other example of policy" |
56 | 56 |
|
57 | 57 | matching = true // default |
58 | 58 | syscalls = ["open", "execve"] |
59 | 59 | } |
60 | 60 |
|
61 | 61 | resource "sysdig_secure_rule_falco" "foo" { |
62 | | - name = "Other example of Policy" // ID |
| 62 | + name = "Other example of Policy" // ID |
63 | 63 | description = "this is other example of policy" |
64 | | - tags = ["container", "shell", "mitre_execution"] |
| 64 | + tags = ["container", "shell", "mitre_execution"] |
65 | 65 |
|
66 | 66 | condition = "spawned_process and container and shell_procs and proc.tty != 0 and container_entrypoint" |
67 | | - output = "A shell was spawned in a container with an attached terminal (user=%user.name %container.info shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository)" |
68 | | - priority = "notice" |
69 | | - source = "syscall" // syscall or k8s_audit |
| 67 | + output = "A shell was spawned in a container with an attached terminal (user=%user.name %container.info shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository)" |
| 68 | + priority = "notice" |
| 69 | + source = "syscall" // syscall or k8s_audit |
70 | 70 | } |
0 commit comments