cgagentharness-runtime-invariant-check

Verify core security invariants hold after changes to Rust security-critical modules.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes to security-critical paths can silently break isolation boundaries, guard ordering, or fail-closed defaults. This Skill provides a structured checklist and runnable test evidence to confirm that core security invariants still hold before pushing PRs that touch src/shim, guards.rs, headers.rs, writer.rs, sandbox.rs, workspace.rs, or config.default.yaml. ## Core Features & Use Cases - Invariant Boundary Verification: Checks I6 process isolation (server never imports agentic code), guard chain order, CSRF contracts, and clone jail contracts against current INVARIANTS.md and source. - Runnable Test Evidence: Maps each boundary to concrete cargo test commands such as invariant_guard, auth_guards, write_policy, and web_research suites. - Fail-Closed Config Auditing: Confirms master/deepagent/clone-write gates default to false, auth/TLS defaults to true, and the URL allowlist starts empty. - Use Case: Before merging a PR that modifies guards.rs, run this Skill to walk each boundary table row, execute the listed test suites with isolated homes, and record tested source, commands, outcomes, and unresolved limits. ## Quick Start Verify that all core security invariants still hold after my changes to guards.rs and writer.rs before I push this PR.

Frequently Asked Questions about cgagentharness-runtime-invariant-check

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

FAQPage Schema
How do I verify security invariants before pushing a Rust PR?▼

Run cargo test --locked --test invariant_guard along with the boundary-specific suites like auth_guards, write_policy, and secure_portal. Compare results against the current INVARIANTS.md contracts and record commands, outcomes, and unresolved limits.

When should I run a runtime invariant check?▼

Run it before pushing any PR touching core paths: src/shim, guards.rs, headers.rs, writer.rs, sandbox.rs, workspace.rs, or config.default.yaml. These files define isolation boundaries, guard ordering, and fail-closed defaults that regressions could silently weaken.

What does the I6 process isolation invariant require?▼

I6 requires that server, common, LLM, and shim code never call pipeline code directly, and that only the shim spawns the whitelisted child process. The invariant_guard test suite provides runnable evidence for this boundary.

Does this check replace the invariant_guard test suite?▼

No, it complements tests/invariant_guard.rs by providing human-readable guidance on what to check and how to fix violations. The cargo test suites remain the runnable evidence for each boundary contract.

Why do native sandbox tests fail in a restricted sandbox?▼

Required native sandbox tests may need the operator's normal terminal rather than an outer restricted sandbox environment. Never weaken the application sandbox profile to make tests pass, and note that fixture tests do not prove native GUI behavior.