Skip to content

Commit

Permalink
docs: add security considerations regarding automountServiceAccountToken
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Krupa (paulfantom) <[email protected]>
  • Loading branch information
paulfantom committed Feb 4, 2022
1 parent f1df51f commit 648a675
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ While we aim for best practices in terms of security by default, due to the natu
* Host Port is set. https://hub.armo.cloud/docs/c-0044 is not relevant since node-exporter is considered as a core platform component running as a DaemonSet.
* Host PID is set to `true`, since node-exporter requires direct access to the host namespace to gather statistics.
* Host Network is set to `true`, since node-exporter requires direct access to the host network to gather statistics.
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecar requires connection to kubernetes API server.

#### prometheus-adapter
* `automountServiceAccountToken` is set to `true` on Pod level as application requires connection to kubernetes API server.

#### blackbox-exporter
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecar requires connection to kubernetes API server.

#### kube-state-metrics
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecars requires connection to kubernetes API server.

#### prometheus-operator
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecars requires connection to kubernetes API server.
49 changes: 49 additions & 0 deletions kubescape-exceptions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
[
{
"name": "exclude-automountServiceAccountToken-checks",
"policyType": "postureExceptionPolicy",
"actions": [
"alertOnly"
],
"resources": [
{
"designatorType": "Attributes",
"attributes": {
"kind": "DaemonSet",
"name": "node-exporter"
}
},
{
"designatorType": "Attributes",
"attributes": {
"kind": "Deployment",
"name": "blackbox-exporter"
}
},
{
"designatorType": "Attributes",
"attributes": {
"kind": "Deployment",
"name": "kube-state-metrics"
}
},
{
"designatorType": "Attributes",
"attributes": {
"kind": "Deployment",
"name": "prometheus-adapter"
}
},
{
"designatorType": "Attributes",
"attributes": {
"kind": "Deployment",
"name": "prometheus-operator"
}
}
],
"posturePolicies": [
{
"controlName": "Automatic mapping of service account"
}
]
},
{
"name": "exclude-node-exporter-host-access-checks",
"policyType": "postureExceptionPolicy",
Expand Down

0 comments on commit 648a675

Please sign in to comment.