tektoncd / tektoncd/cli

Adversarial input validation for agent-generated commands

Open
#2,859 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

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

  • File path arguments are canonicalized and validated against path traversal
  • Resource names/IDs reject ?, #, %-encoded characters
  • Control characters (non-printable ASCII) stripped from inputs
  • --sanitize flag available to sanitize API response content

Context

Part of #2849 — making tkn agent-friendly.

/kind feature

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named; start by tracing the CLI argument boundary and the path from parsed inputs to the Kubernetes API, then locate API response handling for the proposed --sanitize flag. Done means the listed path, resource-ID, control-character, and response-sanitization acceptance criteria are covered without allowing malformed input through.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.