instruction
stringlengths
54
6.73k
output
stringlengths
73
4.06k
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/var/log/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. specifies a rule that matches a specific directory path '/dev/log/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /var/log/ recursive: true readOnly: true - dir: /dev/log/ recursive: true readOnly: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/usr/lib/x86_64-linux-gnu/libcrypt.so'. '/usr/lib/x86_64-linux-gnu/libc.so'. '/usr/lib/x86_64-linux-gnu/libcurl.so'. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /usr/lib/x86_64-linux-gnu/libcrypt.so - path: /usr/lib/x86_64-linux-gnu/libc.so - path: /usr/lib/x86_64-linux-gnu/libcurl.so action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. applies the rule to files with the '/**/initial.php' pattern, Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file. defines rules related to processes running in the selected pods. applies the rule to processes with the '/**/curl' pattern. '/**/bash' pattern. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPatterns: - pattern: /**/initial.php process: matchPatterns: - pattern: /**/curl - pattern: /**/bash action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. applies the rule to files with the '/**/*' pattern, similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/app/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source specifies a rule that matches a specific directory path '/usr/sbin/addgroup', specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source specifies a rule that matches a specific directory path '/usr/sbin/adduser', Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file. defines rules related to processes running in the selected pods. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/app/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/opt/java/openjdk/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/usr/local/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/usr/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/usr/glibc-compat/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies the action to take when rules match, in which case the 'Allow' action allows the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPatterns: - pattern: /**/* process: matchDirectories: - dir: /app/ recursive: true - dir: /opt/java/openjdk/bin/ recursive: true - dir: /bin/ recursive: true - dir: /usr/local/bin/ recursive: true - dir: /usr/bin/ recursive: true - dir: /usr/glibc-compat/bin/ recursive: true file: matchDirectories: - dir: /app/ recursive: true - dir: /etc/ recursive: true fromSource: - path: /usr/sbin/addgroup - dir: /etc/ recursive: true fromSource: - path: /usr/sbin/adduser action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file. defines rules related to processes running in the selected pods. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/usr/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/usr/local/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, the action is only applied to source processes in the path '/usr/sbin/apache2'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchDirectories: - dir: /usr/bin/ recursive: true - dir: /usr/local/bin/ recursive: true - dir: /bin/ recursive: true fromSource: - path: /usr/sbin/apache2 file: matchDirectories: - dir: /etc/ recursive: true action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/etc/hostname'. '/etc/hosts.allow'. '/etc/hosts'. '/etc/lsb-release'. '/etc/networks'. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /etc/hostname - path: /etc/hosts.allow - path: /etc/hosts - path: /etc/lsb-release - path: /etc/networks action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. applies the rule to files with the '/*/*/*/*/urls.py*' pattern, '/*/*/*/urls.py*' pattern, '/*/*/urls.py*' pattern, '/*/urls.py*' pattern, Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPatterns: - pattern: /*/*/*/*/urls.py* - pattern: /*/*/*/urls.py* - pattern: /*/*/urls.py* - pattern: /*/urls.py* action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/mgmt/tm/util/bash'. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /mgmt/tm/util/bash action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/bin/sleep'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /bin/sleep action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/home/user1/secret_data1.txt'. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source '/bin/cat'. Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /home/user1/secret_data1.txt ownerOnly: true fromSource: - path: /bin/cat action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/home/user1/secret_data1.txt'. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source '/bin/cat'. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /home/user1/secret_data1.txt ownerOnly: true fromSource: - path: /bin/cat action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/sbin/iptables'. '/sbin/iptables'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/sbin/iptables - path: /sbin/iptables action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/root/.bashrc'. '/etc/skel/.bashrc'. '/etc/skel/.bash_logout'. '/root/.inputrc'. '/root/.profile'. '/etc/skel/.profile'. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /root/.bashrc - path: /etc/skel/.bashrc - path: /etc/skel/.bash_logout - path: /root/.inputrc - path: /root/.profile - path: /etc/skel/.profile action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/var/log/auth.log'. '/var/log/daemon.log'. '/var/log/debug'. '/var/log/debug'. '/var/log/syslog'. '/var/log/faillog'. '/var/log/lastlog'. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /var/log/auth.log - path: /var/log/daemon.log - path: /var/log/debug - path: /var/log/debug - path: /var/log/syslog - path: /var/log/faillog - path: /var/log/lastlog action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /etc/ recursive: true ownerOnly: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/var/log/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source specifies a rule that matches a specific directory path '/usr/bin/rm', specifies a rule that matches a specific directory path '/bin/rm', specifies a rule that matches a specific directory path '/usr/bin/rmdir', specifies a rule that matches a specific directory path '/bin/rmdir', specifies a rule that matches a specific directory path '/usr/bin/unlink', specifies a rule that matches a specific directory path '/bin/unlink', Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /var/log/ recursive: true fromSource: - path: /usr/bin/rm - path: /bin/rm - path: /usr/bin/rmdir - path: /bin/rmdir - path: /usr/bin/unlink - path: /bin/unlink action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/var/log/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /var/log/ recursive: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the network-related policies. In this case, rule applies to UDP network traffic. Specifies what to do when rules match, which means relevant network activities will be logged.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo network: matchProtocols: - protocol: udp action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/bin/apt'. '/usr/bin/wget'. '/usr/bin/curl'. '/usr/bin/http'. '/usr/bin/shell'. '/usr/bin/zypp'. '/usr/bin/yum'. '/usr/bin/zypper'. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/bin/apt - path: /usr/bin/wget - path: /usr/bin/curl - path: /usr/bin/http - path: /usr/bin/shell - path: /usr/bin/zypp - path: /usr/bin/yum - path: /usr/bin/zypper ownerOnly: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/bin/apt'. '/usr/bin/apt-get'. '/bin/apt-get'. '/bin/apt'. '/sbin/apk'. '/usr/bin/dpkg'. '/bin/dpkg'. '/usr/bin/gdebi'. '/bin/gdebi'. '/usr/bin/make'. '/bin/make'. '/usr/bin/yum'. '/bin/yum'. '/usr/bin/rpm'. '/bin/rpm'. '/usr/bin/dnf'. '/bin/dnf'. '/usr/bin/pacman'. '/usr/sbin/pacman'. '/bin/pacman'. '/sbin/pacman'. '/usr/bin/makepkg'. '/usr/sbin/makepkg'. '/bin/makepkg'. '/sbin/makepkg'. '/usr/bin/yaourt'. '/usr/sbin/yaourt'. '/bin/yaourt'. '/sbin/yaourt'. '/usr/bin/zypper'. '/bin/zypper'. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/bin/apt - path: /usr/bin/apt-get - path: /bin/apt-get - path: /bin/apt - path: /sbin/apk - path: /usr/bin/dpkg - path: /bin/dpkg - path: /usr/bin/gdebi - path: /bin/gdebi - path: /usr/bin/make - path: /bin/make - path: /usr/bin/yum - path: /bin/yum - path: /usr/bin/rpm - path: /bin/rpm - path: /usr/bin/dnf - path: /bin/dnf - path: /usr/bin/pacman - path: /usr/sbin/pacman - path: /bin/pacman - path: /sbin/pacman - path: /usr/bin/makepkg - path: /usr/sbin/makepkg - path: /bin/makepkg - path: /sbin/makepkg - path: /usr/bin/yaourt - path: /usr/sbin/yaourt - path: /bin/yaourt - path: /sbin/yaourt - path: /usr/bin/zypper - path: /bin/zypper action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. applies the rule to processes with the '/*/apt-get install *' pattern. '/*/*/apt-get install *' pattern. '/*/apt install *' pattern. '/*/*/apt install *' pattern. '/*/apt install fwupd #new firmware installation' pattern. '/*/*/apt install fwupd' pattern. '/*/apt-get install fwupd' pattern. '/*/*/apt-get install fwupd' pattern. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/dev/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPatterns: - pattern: /*/apt-get install * - pattern: /*/*/apt-get install * - pattern: /*/apt install * - pattern: /*/*/apt install * - pattern: /*/apt install fwupd #new firmware installation - pattern: /*/*/apt install fwupd - pattern: /*/apt-get install fwupd - pattern: /*/*/apt-get install fwupd matchDirectories: - dir: /dev/ recursive: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/etc/ld.so.preload'. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /etc/ld.so.preload action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/usr/local/lib/python3.10/site-packages/PIL/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file. defines rules related to processes running in the selected pods. applies the rule to processes with the '/*/*/*/python -m pip install Pillow*' pattern. '/*/*/python -m pip install Pillow*' pattern. '/*/python -m pip install Pillow*' pattern. '/*/*/*/pip install Pillow*' pattern. '/*/*/pip install Pillow*' pattern. '/*/pip install Pillow*' pattern. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPatterns: - pattern: /*/*/*/python -m pip install Pillow* - pattern: /*/*/python -m pip install Pillow* - pattern: /*/python -m pip install Pillow* - pattern: /*/*/*/pip install Pillow* - pattern: /*/*/pip install Pillow* - pattern: /*/pip install Pillow* file: matchDirectories: - dir: /usr/local/lib/python3.10/site-packages/PIL/ recursive: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/usr/local/lib/python3.10/site-packages/requests/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file. defines rules related to processes running in the selected pods. applies the rule to processes with the '/*/*/*/python -m pip install requests*' pattern. '/*/*/python -m pip install requests*' pattern. '/*/python -m pip install requests*' pattern. '/*/*/*/pip install requests*' pattern. '/*/*/pip install requests*' pattern. '/*/pip install requests*' pattern. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPatterns: - pattern: /*/*/*/python -m pip install requests* - pattern: /*/*/python -m pip install requests* - pattern: /*/python -m pip install requests* - pattern: /*/*/*/pip install requests* - pattern: /*/*/pip install requests* - pattern: /*/pip install requests* file: matchDirectories: - dir: /usr/local/lib/python3.10/site-packages/requests/ recursive: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/bin/scp'. '/usr/bin/sftp'. '/usr/bin/rsync'. '/usr/bin/ftp'. '/usr/bin/readlink'. Specifies the action to take when rules match, in which case the 'Audit' action logs the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/bin/scp - path: /usr/bin/sftp - path: /usr/bin/rsync - path: /usr/bin/ftp - path: /usr/bin/readlink action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/proc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/bin/uname'. '/usr/bin/lshw'. '/usr/bin/lscpu'. '/bin/lsblk'. '/usr/bin/lspci'. '/sbin/fdisk'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /proc/ recursive: true process: matchPaths: - path: /bin/uname - path: /usr/bin/lshw - path: /usr/bin/lscpu - path: /bin/lsblk - path: /usr/bin/lspci - path: /sbin/fdisk action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/root/.bashrc'. '/root/.bash_history'. '/home/user1/.profile'. '/home/user1/.bashrc'. '/run/utmp'. '/dev/tty'. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/home/user1/', ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/proc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file. defines rules related to processes running in the selected pods. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. '/usr/bin/'. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies the action to take when rules match, in which case the 'Allow' action allows the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchDirectories: - dir: /bin/ recursive: true - dir: /usr/bin/ recursive: true file: matchPaths: - path: /root/.bashrc - path: /root/.bash_history - path: /home/user1/.profile - path: /home/user1/.bashrc - path: /run/utmp - path: /dev/tty matchDirectories: - dir: /home/user1/ ownerOnly: true readOnly: true - dir: /etc/ recursive: true - dir: /proc/ recursive: true action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/credentials/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source specifies a rule that matches a specific directory path '/bin/cat', Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo - WARNING file: matchDirectories: - dir: /credentials/ recursive: true fromSource: - path: /bin/cat action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/credentials/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source specifies a rule that matches a specific directory path '/bin/cat', Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo - WARNING file: matchDirectories: - dir: /credentials/ recursive: true fromSource: - path: /bin/cat action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/home/user1/secret_data1.txt'. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. Specifies what to do when rules match, in which case the action 'Audit' monitorings access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /home/user1/secret_data1.txt ownerOnly: true action: Audit
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/root/.bashrc'. '/root/.bash_history'. '/dev/tty'. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/credentials/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. specifies a rule that matches a specific directory path '/etc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/proc/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file. defines rules related to processes running in the selected pods. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/bin/'. Specifies the action to take when rules match, in which case the 'Allow' action allows the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchDirectories: - dir: /bin/ file: matchPaths: - path: /root/.bashrc - path: /root/.bash_history - path: /dev/tty matchDirectories: - dir: /credentials/ recursive: true readOnly: true - dir: /etc/ recursive: true - dir: /proc/ recursive: true action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/home/user1/secret_data1.txt'. If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. ownerOnly is enabled, so only the owner of the executable defined by matchPaths and matchDirectories can run. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source '/readwrite'. Specifies what to do when rules match, in which case the action 'Allow' allows access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /home/user1/secret_data1.txt readOnly: true ownerOnly: true fromSource: - path: /readwrite action: Allow
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '"/etc/ssl/"', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '"/etc/pki/"', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '"/usr/local/share/ca-certificates/"', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo action: Block file: matchDirectories: - dir: "/etc/ssl/" recursive: true - dir: "/etc/pki/" recursive: true - dir: "/usr/local/share/ca-certificates/" recursive: true
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/run/secrets/kubernetes.io/serviceaccount/', recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /run/secrets/kubernetes.io/serviceaccount/ recursive: true action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source Specifies a rule that matches a specific file absolute path '/usr/bin/shred'. '/usr/bin/rm'. '/bin/mv'. '/bin/rm'. '/usr/bin/mv'. Specifies a rule that matches a specific file absolute path '/root/*_history'. When the 'fromSource' field is defined, access to the file is controlled exclusively for the specified source. In this case, working rules are established for the specified source '/usr/bin/shred'. '/usr/bin/rm'. '/bin/rm'. '/bin/mv'. '/usr/bin/mv'. Specifies a rule that matches a specific file absolute path '/home/*/*_history'. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - fromSource: - path: /usr/bin/shred - path: /usr/bin/rm - path: /bin/mv - path: /bin/rm - path: /usr/bin/mv path: /root/*_history - fromSource: - path: /usr/bin/shred - path: /usr/bin/rm - path: /bin/rm - path: /bin/mv - path: /usr/bin/mv path: /home/*/*_history action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. Specifies a rule that matches a specific file absolute path '/root/.bashrc'. '/root/.bash_history'. '/home/user1/.profile'. '/home/user1/.bashrc'. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchPaths: - path: /root/.bashrc - path: /root/.bash_history - path: /home/user1/.profile - path: /home/user1/.bashrc action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/sbin/'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchDirectories: - dir: /sbin/ action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/bin/chmod'. '/usr/bin/chown'. '/bin/chmod'. '/bin/chown'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/bin/chmod - path: /usr/bin/chown - path: /bin/chmod - path: /bin/chown action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines the policy related to file access. similar to matchpath, but for dictionaries, specifies a rule that matches a specific directory path '/sbin/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/usr/bin/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/usr/lib/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/usr/sbin/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/bin/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. specifies a rule that matches a specific directory path '/boot/', If readOnly is enabled, the read operation will be only allowed, and any other operations (e.g., write) will be blocked. recursive is enabled, so the coverage will extend to the subdirectories of the directory defined with matchDirectories. Specifies what to do when rules match, in which case the action 'Block' blocks access to the matching file.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo file: matchDirectories: - dir: /sbin/ readOnly: true recursive: true - dir: /usr/bin/ readOnly: true recursive: true - dir: /usr/lib/ readOnly: true recursive: true - dir: /usr/sbin/ readOnly: true recursive: true - dir: /bin/ readOnly: true recursive: true - dir: /boot/ readOnly: true recursive: true action: Block
Create a KubeArmorPolicy for a kubernetes environment. Selects the Kubernetes pods to which this policy will apply. In this case, it selects pods with the label 'app.kubernetes.io/name: silly-demo'. defines rules related to processes running in the selected pods. apply rules to the executable processes at paths '/usr/local/bin/kubectl'. '/usr/bin/kubectl'. '/usr/local/bin/docker'. '/usr/bin/docker'. '/usr/local/bin/crictl'. '/usr/bin/crictl'. Specifies the action to take when rules match, in which case the 'Block' action blocks the execution of the matching process.
kind: KubeArmorPolicy spec: selector: matchLabels: app.kubernetes.io/name: silly-demo process: matchPaths: - path: /usr/local/bin/kubectl - path: /usr/bin/kubectl - path: /usr/local/bin/docker - path: /usr/bin/docker - path: /usr/local/bin/crictl - path: /usr/bin/crictl action: Block