Skip to content

Hardening: input decoding, field reading, permission rendering, file writes - #229

Merged
jothimani-rajendran merged 1 commit into
mainfrom
sr-2g-agentseam-hardening
Oct 25, 2026
Merged

jothimani-rajendran merged 1 commit into
mainfrom
sr-2g-agentseam-hardening

Conversation

@jothimani-rajendran

@jothimani-rajendran jothimani-rajendran commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Hardening across the dispatcher, adapters, permission renderer, writers and maintainer tools:

  • Input that is valid JSON but cannot be decoded here is refused (exit 2 / the deny path) in the dispatcher and the bundled runtime. String-form tool input that cannot be decoded is refused instead of read as empty.
  • Joined command/content fields normalise every candidate before joining. Copilot content joins every candidate; Copilot path keys that disagree are refused.
  • Claude Code shell rules render for PowerShell as well as Bash. The Codex renderer reports a wildcard specifier as dropped instead of rendering a rule that cannot match.
  • instructions and install/uninstall refuse repo paths that leave the repository through a symlink (in-repo links still work).
  • The capture redactor treats tool output and Cline parameters like tool input; the report printer escapes control characters.

Claim check

  • No capability claim is widened without a mechanism behind it
  • No MATRIX row changed
  • Payload shapes unchanged; permissions-capability.json shell tools now match the tools already recorded in vendors/claude_code.json

Checks

  • pytest -q passes
  • ruff check . and ruff format --check . pass
  • Runtime path is still stdlib-only
  • Commits are signed off

Notes for the reviewer

examples/generated/{claude_code,codex_cli}.md were regenerated with examples/generate.py.

…rites

- A payload or tool input that is valid JSON but cannot be decoded here is refused
  (exit 2 / the deny path) in the dispatcher and the bundled runtime, not answered with silence.
- Joined fields normalise every candidate before joining; Copilot content joins every
  candidate and conflicting path keys are refused.
- Claude Code shell rules render for PowerShell as well as Bash; the Codex renderer reports
  a wildcard specifier as dropped.
- instructions and install refuse paths that leave the repo through a symlink.
- The capture redactor and the report printer treat tool output and report text as untrusted.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review October 25, 2026 03:40
@jothimani-rajendran
jothimani-rajendran merged commit fa9a3e6 into main Oct 25, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant