Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugins/k8saudit/rules) add detection for portforwarding #375

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions plugins/k8saudit/rules/k8s_audit_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,18 @@
source: k8s_audit
tags: [k8s]

- macro: user_known_portforward_activities
condition: (k8s_audit_never_true)

- rule: port-forward
desc: >
Detect any attempt to portforward
condition: ka.target.subresource in (portforward) and not user_known_portforward_activities
output: Portforward to pod (user=%ka.user.name pod=%ka.target.name ns=%ka.target.namespace action=%ka.target.subresource )
priority: NOTICE
source: k8s_audit
tags: [k8s]

- macro: user_known_pod_debug_activities
condition: (k8s_audit_never_true)

Expand Down
Loading