Pulse/internal/agentexec
rcourtman 06fd4fc89e
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Bypass approval gate for trusted internal Discovery commands
Discovery wraps every probe in `docker exec <container> sh -c '...'`.
The agentexec command policy lists `^docker\s+exec\s` as RequireApproval
(a sound default for user-driven docker exec) and Discovery has no path
to mint or supply an ApprovalID. Result: every probe was rejected, the
scanner returned empty CommandOutputs, and the AI fell back to
"Unknown Infrastructure Resource" at confidence 0. The Discovery sub-tab
rendered empty after a "successful" run.

Add a Trusted bool to ExecuteCommandPayload on both the server-facing
agentexec type and the agent's wire struct. When set, the approval gate
is skipped on both ends and the server does not attempt to auto-mint an
approval grant (which would fail with "approval id is required").
PolicyBlock still applies; this is not a way to run arbitrary commands.

Only the discoveryCommandAdapter sets Trusted=true. The flag is never
populated from a deserialised HTTP body or any user-driven path. Patrol
fixes, Assistant remediation, and AI tool calls continue to flow through
the governed approval-record path with a real ApprovalID.

Contracts: amend agent-lifecycle Completion Obligations and Current
State to document the lone exception to the on-agent approval rail, and
amend ai-runtime to fence the Trusted flag to the discovery adapter
only.
2026-05-17 21:59:39 +01:00
..
approval_grant.go Tighten unified agent hardening proof 2026-04-23 23:37:25 +01:00
approval_grant_test.go Tighten unified agent hardening proof 2026-04-23 23:37:25 +01:00
deploy_test.go Harden agentexec token binding and disk filtering 2026-04-23 15:54:48 +01:00
export_test_helpers.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
policy.go add verify_window to agentexec command policy 2026-05-12 21:53:49 +01:00
policy_test.go add verify_window to agentexec command policy 2026-05-12 21:53:49 +01:00
server.go Bypass approval gate for trusted internal Discovery commands 2026-05-17 21:59:39 +01:00
server_coverage_test.go Harden agentexec token binding and disk filtering 2026-04-23 15:54:48 +01:00
server_test.go Bypass approval gate for trusted internal Discovery commands 2026-05-17 21:59:39 +01:00
server_websocket_test.go Harden unified agent runtime and installer 2026-04-23 23:04:18 +01:00
types.go Bypass approval gate for trusted internal Discovery commands 2026-05-17 21:59:39 +01:00
verifier_postconditions.go add verification outcome and capability postcondition substrate 2026-05-12 21:53:49 +01:00
verifier_postconditions_test.go add verification outcome and capability postcondition substrate 2026-05-12 21:53:49 +01:00