Skip to content

docs(#198): close remaining PR #170 guard-contract findings - #200

Merged
JohnStrunk merged 1 commit into
mainfrom
agent/198-guard-input-redirection
Sep 28, 2026
Merged

JohnStrunk merged 1 commit into
mainfrom
agent/198-guard-input-redirection

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Land the three unresolved Medium findings from PR #170's final review round.

The merged contract still had an input-redirection gap in the shared
guard's shell-syntax refusal list, an unqualified --content-file /
--impact-file absolute in the same document as the new File-source
exceptions, and an Ungoverned-edit detection completeness claim that
contradicted the recorded registry-digest fail-open gap.

Changes

  • docs/architecture/agent-harness/adapter-contract.md
    • Guard parser now refuses input redirection (<, <>) and any
      other standard-input source that is not a quoted here-document body.
    • The --content-file / --impact-file bullet forwards to
      File-source arguments and uses the same per-call / fail-open
      terminology.
    • File-source arguments states that a guard-checked - value also
      requires stdin bytes from a quoted here-document, not a redirected
      host file.
    • Guard vectors cover --content-file - < ~/.netrc,
      --content-stdin < ~/.netrc, and --impact-file - < ~/.netrc.
  • docs/architecture/git-integration.md
    • Ungoverned-edit detection now qualifies "must be rejected or
      caught" to edits that leave the registry intact, and names a
      fail-open write that also rewrites the digest in
      .protobot/project.yaml as a recorded gap.
  • docs/architecture/agent-harness/opencode.md
    • The plugin-absent fail-open list now includes input redirection,
      matching the shared contract.

Testing

  • python scripts/lint.py --files on the three changed documents
    (markdownlint, detect-secrets, end-of-file, trailing-whitespace,
    and remaining applicable hooks).
  • python scripts/lint.py --check-parity
  • Direct secret scan of the changed files and of the staged index.

pre-commit run could not fetch hook repos (HTTP 403). The
network-independent scripts/lint.py runner was used instead, as
documented in AGENTS.md.


Closes #198

Post-script verification

  • Branch is not main/master (agent/198-guard-input-redirection)
  • Secret scan passed (gitleaks — af7fce3e519b80d6ad04fa34f48b18f9454ea0ee..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

PR #170's final review left three Medium findings unaddressed.
The shared guard's shell-syntax list named output redirection,
command substitution, and variable expansion, but not input
redirection, so --content-file - < ~/.netrc still satisfied the
dash-only option check while sourcing a host file. The earlier
--content-file bullet still stated that restriction as an
unconditional absolute, and Ungoverned-edit detection still
claimed four layers must catch every ungoverned edit.

Refuse input redirection and non-here-document stdin sources in
the guard parser, add matching guard vectors, and qualify both
absolute claims with the File-source fail-open and registry-
digest recorded-gap phrasing already used in adapter-contract.md
and architecture.md.

Closes #198
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team September 28, 2026 17:50
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: redhat-et/ProtoBot/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a209d9f1-8b82-433f-84cc-f2cc7235bee5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 5:52 PM UTC

Commit: 3e5e062 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 28, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Small documentation-only fix with low metadata risk, elevated to moderate by high recent commit churn and regression history across the touched architecture specifications.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me


Labels: PR modifies Specification Toolkit architecture documentation

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge documentation Improvements or additions to documentation component:specification-toolkit Harness-agnostic skills, prompts, tool definitions, and interaction guidance. labels Sep 28, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:53 PM UTC · Completed 6:09 PM UTC

Commit: 3e5e062 · View workflow run →

Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high · Cost: $2.55

@JohnStrunk
JohnStrunk added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 0f87697 Sep 28, 2026
84 of 85 checks passed
@JohnStrunk
JohnStrunk deleted the agent/198-guard-input-redirection branch September 28, 2026 18:17
@fullsend-ai-retro

Copy link
Copy Markdown

🤖 Finished Retro · ❌ Failure (agent timed out after 30m0s without completing (timeout: 30m0s)) · Started 6:18 PM UTC · Completed 6:50 PM UTC

Commit: 3e5e062 · View workflow run →

Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high · Cost: $2.42

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

Labels

component:specification-toolkit Harness-agnostic skills, prompts, tool definitions, and interaction guidance. documentation Improvements or additions to documentation ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

1 participant