Skip to content

security: specify update-cache privacy and failure isolation #28

Closed

Description

@abruption

Priority

P1 — prerequisite for update notices.

Problem

The detached update refresh proposed in #20 introduces filesystem, process, and network behavior into a safety diagnostic tool. Its cache and refresh lock need an explicit privacy and failure-isolation contract before implementation.

Scope

  • fix the cache schema, 24-hour TTL, size limit, timestamp validation, symlink rejection, directory/file permissions, atomic replacement, and stale-lock policy
  • bound HTTPS registry requests by host, timeout, response size, redirects, and stable-version parsing
  • record only public version metadata; never copy process evidence, transcript contents, paths, tokens, or environment values
  • ensure update state never changes classification, safeToUnlock, refusal reasons, signals, or exit codes
  • ensure unlock performs no network request and starts no refresh before or during inspection, revalidation, SIGTERM, or post-checks
  • define CI/non-TTY and opt-out behavior

Acceptance criteria

  • update failures leave the primary command bytes, safety result, and exit code unchanged except for the documented optional JSON field when a fresh cache exists
  • JSON mode never receives human notice text on stdout or stderr
  • security tests cover malformed, oversized, symlinked, future, stale, concurrent, offline, timeout, redirect, and registry-error cases
  • a test proves zero registry calls and zero refresh child processes during the safety-critical unlock path

Dependencies

This issue must close before #20. It consumes the JSON extension rules from #15.

Activity

  1. added
    enhancement
    on Sep 22, 2026
  2. abruption commented on Sep 22, 2026

    @abruption
    OwnerAuthor

    Development order: this blocks #20 and should consume the additive JSON extension rules from #31. Do not begin the refresh implementation until the core contract PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions