Skip to content

chore(hardening): remove dead one-shot scope code + harden tar extraction - #89

Merged
sandstream merged 1 commit into
mainfrom
chore/hardening-deadcode-tar
Jun 24, 2026
Merged

sandstream merged 1 commit into
mainfrom
chore/hardening-deadcode-tar

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Two small #81 hardening items:

  • Remove dead ONE_SHOT_SCOPES/isOneShotScope (elevation.ts): never called in production, and its scope strings had drifted from the real ones (a misleading second source of truth). The authoritative one-shot decision is scopeFor(...).oneShot in elevation-scopes.ts.
  • Harden tar extraction (bumblebee + triage-sandbox): add --no-same-owner --no-same-permissions so archived ownership/mode bits don't carry onto the host. Defense-in-depth — the bumblebee tarball is checksum-pinned; deeper symlink-escape containment for a future poisoned pin stays a tracked follow-up.

Full suite green. Independent of the other branches.


Generated by Claude Code

…tion (#81)

Two small #81 items:

- Remove the dead `ONE_SHOT_SCOPES` / `isOneShotScope` in elevation.ts. It was
  never called in production and its scope strings ("jwt-secret-roll", …) had
  drifted from the real scopes — a misleading second source of truth that masked
  the elevation scope-confusion. The authoritative one-shot decision lives in
  elevation-scopes.ts → `scopeFor(...).oneShot`. (Drops its self-only test.)
- Harden both tar extractions (bumblebee, triage-sandbox) with
  `--no-same-owner --no-same-permissions` so archived ownership/mode bits don't
  carry onto the host. Defense-in-depth — the bumblebee tarball is already
  checksum-pinned; deeper symlink-escape containment for a future poisoned pin
  remains a tracked follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 86b919f into main Jun 24, 2026
15 checks passed
@sandstream
sandstream deleted the chore/hardening-deadcode-tar branch June 24, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants