Skip to content

Persistent grants: privacy and granularity follow-ups (cleartext WebFetch hosts, opaque labels, lock cleanup) #513

Description

@emal-avala

Follow-ups from the #507 review cycle — reported by the review-babysitting pass, deliberately not fixed there to keep scope:

  1. WebFetch grants persist the cleartext host in both key and label; internal hostnames can be sensitive. If zero-cleartext-on-disk is the standard (command/URL/input are already SHA-256 digests), drop or hash the host prefix.
  2. Grant labels are fixed strings, so /permissions can show how many persistent grants exist but not what each one is — and only bulk clear is possible. Consider per-grant indices or encrypted labels so individual revocation becomes possible.
  3. .lock files in the grants dir are never cleaned up (minor hygiene).
  4. /cd rescope swaps the store Arc, so in a (practically unreachable) contended case an in-flight turn finishes against the old scope — worth a doc comment or a swap-at-turn-boundary if it ever matters.

Context: grants are exact-match SHA-256 keyed (command digest + sandbox flags + policy fingerprint + cwd digest), repo-root scoped, cross-process locked with read-merge-write and refresh-before-honor semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions