Skip to content

fork-ci: README startup block should refuse a foreign-owned cache before touching it #96

Closed

Description

@scuttletoby

Found by a security review of a project that pins ci/v5. Minor: nothing unchecked runs.

  1. README startup block touches the cache before checking its owner. When the cache folder belongs to another user, the copy-paste startup block in the fork-ci README reads that folder and writes pinned.py into it. Only then does the fork's own check refuse the folder. Fix: in the README block, check the cache folder's owner and mode (owned by the current user, not group- or world-writable) before reading or writing anything in it, and fail closed otherwise. Projects then copy the new block; their "same as the README" tests force that copy at the next pin bump.
  2. Unchecked neighbour imports in pr-queue/pr_queue.py (latent, noted, not a finding today). If a tool ever loaded it through the pinned-module loader, it would import its neighbour files from the cache without checking their blob ids. Nothing loads it that way today. Either check the neighbours' blob ids too, or document that this module must not be loaded through the loader.

🤖 Generated with Claude Code

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