Summary
AI agents make different mistakes than humans — they may generate inputs containing path traversal sequences, embedded query parameters, URL encoding, or control characters. The CLI should validate and reject malformed inputs at the CLI boundary before they reach the Kubernetes API.
Proposal
- Implement path canonicalization and sandbox validation for file arguments
- Reject resource IDs containing query params (
?, #) or URL encoding (%)
- Filter non-printable ASCII control characters from all inputs
- Add
--sanitize flag for defensive filtering of API responses (prompt injection defense)
Acceptance Criteria
Context
Part of #2849 — making tkn agent-friendly.
/kind feature
Summary
AI agents make different mistakes than humans — they may generate inputs containing path traversal sequences, embedded query parameters, URL encoding, or control characters. The CLI should validate and reject malformed inputs at the CLI boundary before they reach the Kubernetes API.
Proposal
?,#) or URL encoding (%)--sanitizeflag for defensive filtering of API responses (prompt injection defense)Acceptance Criteria
?,#,%-encoded characters--sanitizeflag available to sanitize API response contentContext
Part of #2849 — making tkn agent-friendly.
/kind feature