Skip to content

chore: remove blob download branch restriction - #70

Merged
Wenzel merged 1 commit into
masterfrom
chore/remove-restricted-branch
Sep 7, 2026
Merged

Wenzel merged 1 commit into
masterfrom
chore/remove-restricted-branch

Conversation

@Wenzel

@Wenzel Wenzel commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The REST blob endpoint carried a dormant branch-based authorization feature — RESTRICTED_BRANCH_NAME plus isBlobRestricted() / CHECK_BLOB_RESTRICTED_QUERY, wired through a commented-out 403 block in rest-routes.ts. It only ever gated Windows binaries (Microsoft redistribution licensing), and the public corpus carries no Windows blobs, so it guarded nothing.

Removed

Code

  • src/blob-authorization.ts and CHECK_BLOB_RESTRICTED_QUERY
  • RESTRICTED_BRANCH_NAME env validation, the arg to createRestRouter(), and the commented-out enforcement block
  • the now-unused driver argument to createRestRouter()

Docs

  • docs/how-to/configure-blob-restrictions.md, docs/explanation/blob-authorization.md (deleted)
  • restriction sections trimmed from blob-api.md, access-restrictions.md (kept: registry redaction), integrate-blob-api.md, docs/README.md, README.md, CLAUDE.md

Sensitive registry value redaction (SENSITIVE_REGISTRY_VALUES) is a separate feature and is untouched. Implementation stays in git history.

Validation

  • npx tsc, npx eslint . --ext .ts, npm run format-check pass
  • npm test: 52 pass (the one pre-existing tests/git-log/index.test.ts failure — TS1378 top-level await — is on master too, unrelated)

🤖 Generated with Claude Code

The REST blob endpoint had a dormant branch-based authorization feature:
`RESTRICTED_BRANCH_NAME` plus `isBlobRestricted()` / `CHECK_BLOB_RESTRICTED_QUERY`,
wired through a commented-out 403 block in `rest-routes.ts`. It only ever gated
Windows binaries (Microsoft redistribution licensing), and the public corpus
carries no Windows blobs, so it guarded nothing.

Removed:
- `src/blob-authorization.ts`, `CHECK_BLOB_RESTRICTED_QUERY`
- `RESTRICTED_BRANCH_NAME` env validation and the commented-out enforcement block
- the now-unused `driver` argument to `createRestRouter()`
- the dedicated docs (`configure-blob-restrictions.md`, `blob-authorization.md`)
  and the restriction sections of the blob-API and access-restrictions references

Sensitive registry value redaction (`SENSITIVE_REGISTRY_VALUES`) is a separate
feature and is untouched. The implementation stays in git history.

Verified: tsc, eslint, prettier --check, and `npm test` (52 pass; the one
pre-existing git-log suite failure is unrelated).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WnrRvhmHcMPj6iwJ2NnzK
@Wenzel
Wenzel merged commit 1f8ec91 into master Sep 7, 2026
2 checks passed
@Wenzel
Wenzel deleted the chore/remove-restricted-branch branch September 7, 2026 23:47
Wenzel added a commit to OSWatcher/oswatcher-deploy that referenced this pull request Sep 7, 2026
The API dropped its blob branch-restriction feature
(OSWatcher/graphql-api#70), so this variable no longer does anything. Remove
it from the api service environment and the CLAUDE.md notes.

Verified: `docker compose config --quiet` passes for the prod and dev overlays.


Claude-Session: https://claude.ai/code/session_014WnrRvhmHcMPj6iwJ2NnzK

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Wenzel added a commit to OSWatcher/frontend that referenced this pull request Sep 7, 2026
The API removed branch-based blob restrictions
(OSWatcher/graphql-api#70), so a download can no longer return 403 for a
restricted blob. Fold that branch into the generic failure path.


Claude-Session: https://claude.ai/code/session_014WnrRvhmHcMPj6iwJ2NnzK

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant