feat(ai-red-teaming): extensible guardrail policy table + teardown rule, release 1.16.3 - #146
Merged
Merged
Conversation
…teardown) Refactor the provisioning guardrail into a small policy table so new deny/redirect rules are one line. Add a teardown rule: shell `dreadnode|dn env teardown/delete/ destroy` is denied and redirected to the teardown_environment tool (destructive, tool-only per the skills). Provision subcommands redirect to provision_environment; a generic `dreadnode env` catch-all redirects to the environment tools. Scope stays narrow - legitimate CLI like `dn airt run` is unaffected (no skill forbids it). Bump to 1.16.3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the ENG-8477 guardrail (1.16.2). Refactors the provisioning hook into a small policy table so new deny/redirect guardrails are one line each, and adds the natural sibling rule for teardown.
Rules (first match wins):
dreadnode|dn env provision/create/...-> redirect toprovision_environmentdreadnode|dn env teardown/delete/destroy/...-> redirect toteardown_environment(destructive, tool-only)dreadnode|dn env ...-> redirect to the environment toolsGrounding / scope
I checked the AIRT skills: the only tool-only CLI mandate is
dreadnode env("never shell out todreadnode env", inprovisioning-and-lifecycleanderror-troubleshooting). There is no skill forbidding other CLI, so the rules stay scoped to environment management only - legitimate usage likedn airt runis explicitly not blocked (covered by a test). Cross-cutting guardrails (destructive shell, SSRF, secret exfil) are intentionally left out here; they belong in the platform policy/permission layer so they apply to every agent, not just when this capability is enabled.Changes
hooks/block_cli_provisioning.py- policy-table refactor + teardown ruletests/test_block_cli_provisioning.py- add teardown redirect test; keep thedn airt runallow-list testcapability.yaml-1.16.2->1.16.3Test plan
pytest tests/test_block_cli_provisioning.py- 5 passedload_capabilityshows v1.16.3, hook loaded, 0 degraded, provision+teardown tools present (37 tools)