Introducing a new way to review your PRs.

Read the announcement

hashgraph-online / hol-guard

Open-source antivirus and firewall for AI agents: block risky tools, secret access, prompt injection, malicious packages, MCP servers, plugins, and skills at runtime.

View on GitHub

44 documents · Updated Nov 23, 2026

docs / cloud-exception-request-workflow

Cloud exception request workflow

Cloud exception requests let a person ask Guard Cloud to accept a known risk for a limited time and scope. The request starts from a real local approval or evidence record, waits for Cloud review, and affects local policy only after an approved exception arrives in a trusted signed policy bundle. This page is a child of Policy authority and cloud exceptions and relates to Policy bundles, integrity, and sync, Cloud review delivery and recovery, and Business policy documents and recovery.

Request lifecycle

Request creation

The request flow turns a local event into a governed Cloud request. The dashboard requires a source anchor, a scope, a risk owner, a requester, a reason, and a future expiry before it sends the request.

The source anchor is one of the following:

  • A resolved Review approval on the device.
  • An Evidence receipt on the device.
  • A request or action ID that Guard recorded on the device.

The source gives the request a traceable reason for the proposed exception. A pasted ID is not accepted as proof when it does not match a local record. Local remembered approvals remain separate from Cloud exceptions.

Command-policy exception requests use a separate source model. They identify the local queued request, the machine that observed it, and the workspace. Guard Cloud uses these identifiers to retrieve the bound pending command. The request does not carry the raw command or its policy graph across the request boundary.

References: dashboard/…/policy-cloud-exception-request-steps.tsx• L37-63 dashboard/…/policy-cloud-exception-request-draft.ts• L68-114 dashboard/…/policy-cloud-exception-request-draft.ts• L156-167 dashboard/…/policy-cloud-exception-request-steps.tsx• L736-741 src/…/cloud_exception_requests.py• L105-181

Scope selection

Scope controls how much activity the requested risk acceptance can cover. The request flow encourages the narrowest useful scope and shows its likely blast radius before submission.

ScopeRequested meaningRelative reach
ArtifactOne exact action or artifact fingerprintVery low
PublisherMatching activity from one publisher in the current folderLow
WorkspaceMatching activity in one project repositoryMedium
HarnessMatching activity for one harnessHigh
Team policyA whole-team allow ruleCreated directly in Guard Cloud

The local request contract accepts artifact, publisher, harness, or workspace scope. Team policy is shown as a product option but cannot be submitted by the local wizard. A scope selector must identify the target; for example, workspace scope needs a workspace ID or working directory. Cloud-delivered exception records can also use the broader global scope.

References: dashboard/…/policy-cloud-exception-request-steps.tsx• L319-355 dashboard/…/policy-cloud-exception-request-steps.tsx• L387-454 dashboard/…/policy-cloud-exceptions-utils.ts• L213-229 src/…/cloud_exception_requests.py• L11-12 src/…/cloud_exception_requests.py• L47-100 src/…/cloud_exceptions.py• L18-21

Request submission

The dashboard builds one request payload and sends it through the local daemon to Guard Cloud. The daemon checks the request shape before forwarding it through the authenticated Cloud connection.

The request must include:

  • A valid scope and matching selector.
  • A requester, an owner, a reason, and a requested expiry.
  • Either a source receipt ID or a source Review item ID.

The optional ticket and maximum-use values provide reviewer context. They do not create local authority or enforce a use count. The local proxy normalizes accepted fields, uses the authenticated sync connection, and reports input, authentication, HTTP, and connection errors to its caller.

References: dashboard/…/policy-cloud-exception-request-draft.ts• L216-265 dashboard/…/guard-api.ts• L2655-2721 src/…/cloud_exception_requests.py• L64-102 src/…/cloud_exception_requests.py• L184-227 src/…/cloud_exception_requests.py• L230-257 src/…/server.py• L4685-4701

Command-policy submission

A command-policy exception request asks Cloud to review a pending command-policy decision. It uses the shared authenticated Cloud connection, but it carries only correlation data and a reason. The duration can be one use, one session, one machine, one workspace, or a fixed 30-day or 90-day period. An optional note gives the reviewer more context.

This request type resolves the requester and owner from Cloud authentication rather than accepting them from the local payload. It also rejects command text, expressions, graphs, and related policy data so the Cloud service remains the source for the pending command details.

References: src/…/cloud_exception_requests.py• L105-181 src/…/cloud_exception_requests.py• L230-249

Cloud review

Submission creates a pending Cloud request; it does not change local enforcement. Guard Cloud decides whether to approve or reject the request, and the dashboard keeps the request visibly pending until Cloud supplies a later result.

An approved request becomes a Cloud-owned exception with an owner, an approver when present, a reason, a source record, a scope, and an expiry. The approved state is not treated as active on the device merely because the request endpoint returned a request ID.

References: dashboard/…/policy-cloud-exception-request-panel.tsx• L137-167 dashboard/…/policy-cloud-exception-request-steps.tsx• L785-883 src/…/models.py• L140-165

Bundle synchronization

Signed exception delivery

Guard Cloud delivers approved exceptions inside the signed policy bundle as cloudExceptions. This places exception changes under the same workspace, signature, time, and version checks as other Cloud policy authority. Unsigned legacy exception fields may be present for compatibility, but they cannot supply local authority.

The local daemon validates the candidate bundle and then derives exception records from its signed exception entries. Each record keeps the bundle identity, provenance, and source information so the local view can explain where the acceptance came from. The parser accepts the supported exception scopes and effects, requires an owner and valid expiry, and records the bundle acknowledgement state when it matches the local device and bundle.

This diagram shows the path from a request decision to a local policy decision view.

flowchart LR
    A[Request from local approval or receipt] --> B[Guard Cloud review]
    B -->|rejected| C[Request remains rejected]
    B -->|approved| D[Signed policy bundle with cloudExceptions]
    D --> E{Validate workspace, hashes, signature, time, and version}
    E -->|reject| F[Keep valid authority or clear remote authority]
    E -->|accept| G[Materialize exceptions and policy decisions]
    G --> H[Atomic local activation]
    H --> I[Policy lookup and runtime consumers]
    H --> J[Device acknowledgement on next sync]

References: src/…/policy_bundle_parser.py• L595-627 src/…/policy_bundle_parser.py• L645-656 src/…/runner.py• L2677-2683 src/…/runner.py• L2823-2865 src/…/cloud_exceptions.py• L110-191

Authority reconciliation

Reconciliation replaces the local set of bundle-derived exceptions with the set from the accepted bundle. This removes exceptions that Cloud revoked or omitted and prevents an older local copy from surviving a newer policy update. Duplicate IDs collapse to one record.

The bundle, materialized policy decisions, exception records, acknowledgement, keyring state, and acceptance checkpoint activate as one local update. If the bundle fails validation or no valid authority remains, Guard clears remote policy and Cloud exceptions together. Local remembered rules and strict local configuration remain separate.

References: src/…/runner.py• L3693-3742 src/…/store_policy.py• L826-910 src/…/store_policy.py• L912-944 src/…/cloud_exceptions.py• L164-209 tests/test_cloud_exception_sync_proof.py• L145-190

Device acknowledgement

The device acknowledgement reports whether this installation applied the exact bundle that contains the exception. Guard accepts the acknowledgement only when its device ID, bundle hash, bundle version, and apply time match the accepted bundle.

The resulting status describes delivery rather than approval. synced means the local daemon acknowledged the bundle. pending means acknowledgement is not yet confirmed. failed or offline identifies a delivery problem. None of these states lets an untrusted or expired exception bypass policy checks.

References: src/…/cloud_exceptions.py• L74-107 src/…/runner.py• L2830-2856 dashboard/…/policy-cloud-exception-detail-panel.tsx• L66-82 dashboard/…/policy-cloud-exception-detail-panel.tsx• L237-246

Policy decision consumption

Active exception view

The local exception view exposes only entries derived from a currently valid signed bundle. Guard normalizes the exception scope, owner, effect, and expiry, then filters out expired entries. A harness filter keeps entries for that harness or a wildcard entry. Duplicate exception IDs resolve to one record before consumers use the view.

The policy API exposes this active view to the dashboard. The dashboard combines it with pending request data and groups the result into active, pending, expiring-soon, and acknowledgement-failure states. This gives operators a view of both policy authority and delivery health without treating a pending request as an active allow.

References: src/…/store_cloud_events.py• L255-282 src/…/cloud_exceptions.py• L64-71 src/…/cloud_exceptions.py• L110-161 src/…/cloud_exceptions.py• L194-212 src/…/server.py• L2232-2250 dashboard/…/policy-cloud-exceptions-utils.ts• L250-288

Policy lookup

An accepted bundle supplies both materialized policy decisions and Cloud exception records. During a policy lookup, Guard checks whether an active allow exception in that same verified bundle covers the target. A matching exception lifts the bundle's non-allow rules for that lookup while leaving other local decisions eligible.

The match stays tied to the policy authority that Cloud approved. It requires a compatible harness and accepts only the artifact, publisher, workspace, or other target named by the exception. A workspace target must match the workspace that signed the bundle. The same trust-gated activation prevents a request, a stale cache, or an unsigned sync field from becoming a decision source.

A Cloud exception can be active only while its expiry is in the future and its bundle remains trusted. When the bundle expires, is revoked, belongs to another workspace, or fails an integrity check, the exception is no longer available to policy consumers.

References: src/…/runner.py• L2823-2865 src/…/store_policy.py• L649-696 src/…/store_cloud_events.py• L267-282 src/…/synced_policy.py• L31-59 src/…/cloud_exceptions.py• L224-331 tests/test_cloud_exception_sync_proof.py• L112-142 tests/test_cloud_exception_sync_proof.py• L193-218

Entitlement boundaries

Cloud access

Entitlements describe which Cloud-backed capabilities a plan can use. They are separate from exception approval: an entitlement can allow a request or sync attempt to use Cloud services, but it does not itself approve a risk acceptance.

The entitlement parser accepts the plan and subscription state that Guard Cloud provides in either the full effective-entitlement form or the compact local OAuth form. It keeps known limits, dates, storage values, and feature gates when they have valid types, ignores unknown additive fields, and does not invent limits that the server did not send. Cloud limits, billing state, and connection problems remain Cloud conditions; they do not disable local protection.

References: src/…/cloud_entitlements.py• L14-42 src/…/cloud_entitlements.py• L45-106 src/…/cloud_entitlements.py• L109-173 tests/test_guard_cloud_entitlements.py• L117-197

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to request scope or selector names must stay aligned across the dashboard draft, daemon validation, Cloud request contract, bundle exception schema, and displayed blast radius.
  • Changes to command-policy request fields must preserve correlation-only submission. Keep the local request ID, machine ID, workspace binding, duration values, and Cloud-side command lookup aligned.
  • Changes to source records must preserve the link between a local approval or receipt and the Cloud request. A request without a valid source anchor must not become submit-ready.
  • Changes to exception fields must update signed bundle canonicalization, payload hashing, parsing, local serialization, acknowledgement matching, policy-target lifting, and dashboard display.
  • Changes to exception target matching must preserve the link to the signed bundle workspace and must not lift unrelated policy rows.
  • Changes to bundle reconciliation must replace stale exception state and remote policy rows as one authority update.
  • Changes to entitlement or connection errors must keep Cloud capability limits separate from local protection and local remembered decisions.
  • Changes to expiry handling must use the same time meaning when validating requests, filtering active exceptions, and presenting pending or expiring states.

Important failure modes

TriggerConsequenceGuard
Request has no local receipt or Review item anchorGuard rejects the request before Cloud reviewRequire one source ID and accept pasted IDs only when Guard recorded them locally
Scope selector is missing or does not match the scopeThe request is invalid and no exception is createdValidate the selector for artifact, publisher, harness, or workspace scope
Command-policy request includes raw command or policy dataThe request is rejected before command details cross the request boundarySend only correlation identifiers and reject command, expression, graph, and policy fields
Command-policy request has an unknown duration or weak reasonCloud does not receive a valid requestRestrict duration to the supported set and require a reason of at least eight characters
Request is submitted but not yet approvedLocal enforcement does not changeKeep the request pending until an approved signed bundle arrives
Signed bundle is tampered, expired, unordered, or for another workspaceIts exceptions and remote policy decisions are not activatedValidate hashes, signature, time, version, workspace, and trust checkpoint
Cloud omits or revokes an exception in a newer accepted bundleThe old local exception does not remain activeReplace bundle-derived exception state during atomic activation
Exception target or workspace does not match the current policy lookupThe Cloud exception does not lift the bundle ruleRequire an active allow exception with matching target, harness, and signed workspace
Exception expiry is in the past or has an invalid time valueThe exception is absent from the active policy viewParse and compare normalized expiry values before listing exceptions
Device acknowledgement does not match the accepted bundleThe dashboard reports pending, failed, offline, or unknown delivery stateBind acknowledgement to device ID, bundle hash, bundle version, and apply time
Cloud entitlement or connection cannot be provenCloud request or sync can fail, but local protection continuesKeep entitlement errors outside the local enforcement verdict

Key files

FileWhy to read it
dashboard/…/policy-cloud-exception-request-panel.tsxShows the request lifecycle from source selection through Cloud submission and pending status.
dashboard/…/policy-cloud-exception-request-steps.tsxDefines the user-facing source, scope, guardrail, review, and submitted states.
dashboard/…/policy-cloud-exception-request-draft.tsDefines the request contract assembled from the wizard.
src/…/cloud_exception_requests.pyDefines the resource and command-policy request boundaries, input checks, shared Cloud authentication, and request retrieval.
src/…/cloud_exceptions.pyDefines exception meaning, validity, provenance, acknowledgement, active filtering, and policy-target lifting.
src/…/runner.pyConnects bundle sync, validation, exception materialization, acknowledgement, and activation.
src/…/store_policy.pyShows atomic replacement of policy and exception authority.
src/…/store_cloud_events.pyProvides the active exception view used by local API consumers.
src/…/cloud_entitlements.pyDefines the separate Cloud plan, feature, limit, and connection boundary.
src/…/server.pyExposes request and active-exception endpoints to the dashboard.
dashboard/…/policy-cloud-exceptions-tab.tsxCombines active exceptions, pending requests, connection state, and operator views.
tests/test_cloud_exception_sync_proof.pyDemonstrates signed delivery, rejection of unsigned data, reconciliation, and expiry behavior.