cgagentharness-write-policy-redteam

Adversarially test CG-agent-harness write gates, git approval, and clone jail boundaries.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-write-policy-redteam-cgfixit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cgagentharness-write-policy-redteam
Source: https://github.com/cgfixit/CG-agent-harness/tree/main/.claude/skills/cgagentharness-write-policy-redteam
Command: npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-write-policy-redteam-cgfixit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hardening a local agent harness against unauthorized repository writes requires systematic adversarial testing of write gates, confirm/reason contracts, kill switches, and clone jails — ad-hoc review easily misses bypasses or accidentally loosens asserts to make tests green. ## Core Features & Use Cases - Corpus-driven redteam loop: Runs existing Rust integration tests (real_repo_loop, agentic_foundations, shim_and_agent_routes, invariant_guard) as the living adversarial suite against the write surface. - Finding classification: Buckets results into new_bypasses, known_gaps, fixed_findings, and false_greens so regressions are fixed before anything else and verification failures are detected. - Minimal gate fixes with regression tests: Maps each finding to a family (gate order, confirm+reason, kill switch, argv boundary, clone jail, approval binding) and closes it with the smallest refuse path plus a durable assert. - Use Case: After modifying the writer or git approval flow in src/agentic, run this skill to verify every hostile-argv, jail-escape, and missing-confirm attack still fails closed with exit code 4 before merging. ## Quick Start Run the write-policy redteam against my recent changes to the writer and git approval gates and report any new bypasses.

Frequently Asked Questions about cgagentharness-write-policy-redteam

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I redteam write approval gates in a Rust agent harness?▼

Run the existing integration test corpus (real_repo_loop, agentic_foundations, shim_and_agent_routes, invariant_guard) with provider API keys cleared, then classify failures into bypass buckets. Fix each new bypass with a minimal gate check plus a regression assert.

How to test that confirm and reason are never defaulted in git write flows?▼

Use the hostile-argv matrix in tests/shim_and_agent_routes.rs, which verifies a request can never carry an argv and that publish-missing-confirm causes child exit code 4. Missing confirm must always refuse, never be manufactured.

What is a false green in security test suites?▼

A false green occurs when the suite passes because confirm was defaulted, the kill switch was OR-ed instead of AND-ed, Seatbelt was skipped, or a shared listener was used. Treat it as a failure of the verification method and reproduce with an owned temp CGAGENTHARNESS_HOME and unique port.

Does this skill replace the invariant guard check before merging?▼

No. It pairs with cgagentharness-invariant-guard, which is manual-only and must be run by the operator before merging core-path diffs. Skill completion does not equal publish authorization.

When should I not close a known gap found during redteam testing?▼

Known gaps documented in INVARIANTS.md become a work list only with an explicit owner decision. Never silently close them by relaxing policy, loosening asserts, or weakening security to make tests pass.