Skip to content

Commit 0d26827

Browse files
author
Michael Chmielewski
committed
Reduce general capabilities required to run the agent.
Added in the apparmor annotation, see comment in values.yaml to remove it (at loss of some agent functionality).
1 parent c21c7b3 commit 0d26827

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

templates/daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
name: {{ include "threatstack-agent.name" . }}-config-args
100100
key: config-args
101101
securityContext:
102-
privileged: true
102+
privileged: false
103103
capabilities:
104104
add: {{ .Values.capabilities | trim }}
105105
{{- if .Values.daemonset.resources }}

values.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ rbac:
4949
# additionalConfig :: Additional parameters to configure the running agent
5050
# capabilities :: Docker capabilites required for the proper operation of the agent
5151
capabilities: |
52-
["AUDIT_CONTROL", "SYS_CHROOT", "CHOWN","DAC_OVERRIDE", "DAC_READ_SEARCH", "FOWNER", "FSETID", "SETGID", "SETUID", "SYS_ADMIN", "SYS_PTRACE"]
52+
["AUDIT_CONTROL", "SYS_ADMIN", "SYS_PTRACE"]
5353
5454
#####
5555
# WARNING!
@@ -197,9 +197,15 @@ daemonset:
197197

198198
## Annotations to add to the threatstack daemonset pod(s)
199199
#
200+
# To remove the apparmor annotation, add a comment as the attribute value,
201+
# Example:
202+
# podAnnotations
203+
# # This comment triggers REMOVING any podAnnotations!
204+
#
200205
# podAnnotations:
201206
# key: "value"
202-
podAnnotations: {}
207+
podAnnotations:
208+
container.apparmor.security.beta.kubernetes.io/threatstack-agent: unconfined
203209

204210
# Override this to provide custom audit rules to the agent.
205211
# Make sure to use | to ensure the custom rules data is

0 commit comments

Comments
 (0)