Skip to content

Adding wildcard "*" allow rule adds random strings in executables->allowed rules #535

@venkateshjayagopal

Description

@venkateshjayagopal

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- OS: Ubuntu
- Architecture: x86
- Cluster: v1.35.2+rke2r1

Issue Description

  • Expected behavior: Adding wildcard "*" allow policy should not add random strings in the allowed rules.
  • Current behavior: Random strings are added in allowed executables when adding wildcard "*" policy.
  • Steps to reproduce:
    Execute kubectl-runtime_enforcer policy allow deploy-ubuntu-deployment ubuntu *
ubuntu@master-node-01 21:01:09:~$ kubectl-runtime_enforcer policy allow deploy-ubuntu-deployment ubuntu *
Successfully updated executables for WorkloadPolicy "deploy-ubuntu-deployment" in namespace "default".
ubuntu@master-node-01 21:03:27:~$ kubectl get wp deploy-ubuntu-deployment -o yaml | less
apiVersion: security.rancher.io/v1alpha1
kind: WorkloadPolicy
metadata:
  creationTimestamp: "2026-04-01T16:04:24Z"
  generation: 31
  labels:
    workloadpolicy.security.rancher.io/promoted-from: deploy-ubuntu-deployment
  name: deploy-ubuntu-deployment
  namespace: default
  resourceVersion: "8557457"
  uid: 97253fc4-d167-4e69-99b0-5b4b51cf9049
spec:
  mode: protect
  rulesByContainer:
    ubuntu:
      executables:
        allowed:
        - get_helm.sh
        - go
        - metrics
        - runtime-enforcer
        - snap
        - ubuntu-deployment.yaml
        - ubuntu-deployment_1.yaml
        - ubuntu-deployment_2.yaml
        - ubuntu-deployment_3.yaml
        - ubuntu-deployment_4.yaml
        - ubuntu-deployment_5.yaml
status:
  observedGeneration: 31
  phase: Active
  successfulNodes: 3
  totalNodes: 3
  violations:
  - action: protect
    containerName: ubuntu
    executablePath: /usr/bin/sleep

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions