Skip to content

Feature Request: Set max string length for "reason" flag when using "kubectl-runtime_enforcer policy ack" command #759

Description

@venkateshjayagopal

Is your feature request related to a problem?

Today when using "kubectl-runtime_enforcer policy ack" command we can add "--reason" flag to provide a reason to acknowledge the violation for user references.

status:
  acknowledgedViolations:
  - acknowledgedAt: "2026-07-17T17:19:03Z"
    reason: 1234567890nknknknknknnnnlnnlnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    violation:
      action: protect
      containerName: ubuntu
      executablePath: /usr/lib/cargo/bin/coreutils/dircolors
      id: 0
      nodeName: susesecurity-worker-02
      podName: ubuntu-deployment-1-67c858dbcb-mj8kh
      timestamp: "2026-07-17T16:07:35Z"
      workloadKind: Deployment
      workloadName: ubuntu-deployment-1


Solution you'd like

. It would be great to provide a min and max length for this field to have a meaningful data under "acknowledgedViolations".

                reason:
                  type: string
                  minLength: 3
                  maxLength: 63
                  pattern: "^[a-z0-9]+$"

Alternatives you've considered

Non

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions