diff --git a/.changeset/allow-public-read.md b/.changeset/allow-public-read.md deleted file mode 100644 index 7f7da398..00000000 --- a/.changeset/allow-public-read.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'gcb-core': minor ---- - -Add the `allowPublicRead` and `allowForkPush` host opt-ins. Catalog entries can now declare -`readOnly: true`; with `allowPublicRead`, such an action can run on a repository verified public -without an allowlist entry. - -The app identity uses a metadata-only installation token; the App must be installed on the -repository, and the request is refused rather than falling back to anonymous when it is not, because -`gh` needs authentication. Bare `--as-user` uses the authorized person token, and -`--as-user ` uses the host account token. The host route performs the same fresh public check -before running the action. - -Visibility is checked freshly for each request, not cached, bounded at 10 seconds and refused on a -redirect. The check shares GitHub's 60/hour IP quota; an exhausted 403/429 is reported as a rate -limit, a plain 403 as a refusal, and neither as a private repository. Person tokens may themselves -have private access; those forms rely on the visibility check rather than a token scope. A -configured `apiBaseUrl` must now be an HTTPS URL. - -`allowForkPush` lets a git credential request through for a **public** fork whose GitHub -parent/source is allowlisted, still limited to the credential path; catalog actions keep the normal -allowlist. Its unauthenticated fork check uses the same deadline and redirect refusal. It needs the -App installed on the fork owner, because the credential still comes from an installation token; a -plain contributor fork without that installation cannot mint one. diff --git a/.changeset/catalog-run-watch.md b/.changeset/catalog-run-watch.md deleted file mode 100644 index be03f813..00000000 --- a/.changeset/catalog-run-watch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'gcb-core': minor ---- - -Add `run:watch` to the action catalog. It polls a workflow run until it finishes, with optional -`--compact`, `--exit-status` and `--interval`. The timeout is 3300 seconds, five minutes below the -one-hour installation-token lifetime, so a poll cannot outlive the token. It uses `actions: read` and -`checks: read` (for annotations) and sets `appUser`. diff --git a/.changeset/catalog-update-branch.md b/.changeset/catalog-update-branch.md deleted file mode 100644 index ce0106e9..00000000 --- a/.changeset/catalog-update-branch.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'gcb-core': minor ---- - -Add `pr:update-branch` to the action catalog. It takes an optional `--rebase`, uses -`pull_requests: write` and `contents: write`, and sets `appUser`, so bare `--as-user` works through -the app broker. `appUser` follows `pr:edit`: updating a branch is an author operation, while -close/reopen/ready/lock stay host-account only. Bare `--as-user` needs a user token with -`contents: write`; the recommended `Contents: Read` token is enough for PR editing but not for -updating a branch. The default app route and `--as-user ` do not depend on that token. For a -PR whose head is a fork, the app installation token is scoped to the base repository and cannot -write the head fork; use `--as-user ` for that case. diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 65f3a82e..126f836a 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -1,5 +1,12 @@ # gcb-client +## 0.6.0 + +### Patch Changes + +- Updated dependencies [[`9ad2d26`](https://github.com/code-vaults/git-credential-broker/commit/9ad2d26139b8fd4e6875ce2279494f2b29ad8e0b), [`fdf3ff6`](https://github.com/code-vaults/git-credential-broker/commit/fdf3ff6779080573cd6fcae62e7b8156898352c2), [`51054d0`](https://github.com/code-vaults/git-credential-broker/commit/51054d0042306c6e14bf141e2fef0b53426c62af)]: + - gcb-core@0.6.0 + ## 0.5.0 ### Minor Changes diff --git a/packages/client/package.json b/packages/client/package.json index 2874d771..a57c97cc 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "gcb-client", - "version": "0.5.0", + "version": "0.6.0", "description": "Container-side gcb client: credential helper, setup, and socket-backed commands.", "license": "MIT", "author": "JounQin ", @@ -28,7 +28,7 @@ } }, "dependencies": { - "gcb-core": "0.5.0" + "gcb-core": "0.6.0" }, "publishConfig": { "access": "public", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b369e0e6..e9a51b2a 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,45 @@ # gcb-core +## 0.6.0 + +### Minor Changes + +- [#102](https://github.com/code-vaults/git-credential-broker/pull/102) [`9ad2d26`](https://github.com/code-vaults/git-credential-broker/commit/9ad2d26139b8fd4e6875ce2279494f2b29ad8e0b) Thanks [@JounQin](https://github.com/JounQin)! - Add the `allowPublicRead` and `allowForkPush` host opt-ins. Catalog entries can now declare + `readOnly: true`; with `allowPublicRead`, such an action can run on a repository verified public + without an allowlist entry. + + The app identity uses a metadata-only installation token; the App must be installed on the + repository, and the request is refused rather than falling back to anonymous when it is not, because + `gh` needs authentication. Bare `--as-user` uses the authorized person token, and + `--as-user ` uses the host account token. The host route performs the same fresh public check + before running the action. + + Visibility is checked freshly for each request, not cached, bounded at 10 seconds and refused on a + redirect. The check shares GitHub's 60/hour IP quota; an exhausted 403/429 is reported as a rate + limit, a plain 403 as a refusal, and neither as a private repository. Person tokens may themselves + have private access; those forms rely on the visibility check rather than a token scope. A + configured `apiBaseUrl` must now be an HTTPS URL. + + `allowForkPush` lets a git credential request through for a **public** fork whose GitHub + parent/source is allowlisted, still limited to the credential path; catalog actions keep the normal + allowlist. Its unauthenticated fork check uses the same deadline and redirect refusal. It needs the + App installed on the fork owner, because the credential still comes from an installation token; a + plain contributor fork without that installation cannot mint one. + +- [#101](https://github.com/code-vaults/git-credential-broker/pull/101) [`fdf3ff6`](https://github.com/code-vaults/git-credential-broker/commit/fdf3ff6779080573cd6fcae62e7b8156898352c2) Thanks [@JounQin](https://github.com/JounQin)! - Add `run:watch` to the action catalog. It polls a workflow run until it finishes, with optional + `--compact`, `--exit-status` and `--interval`. The timeout is 3300 seconds, five minutes below the + one-hour installation-token lifetime, so a poll cannot outlive the token. It uses `actions: read` and + `checks: read` (for annotations) and sets `appUser`. + +- [#99](https://github.com/code-vaults/git-credential-broker/pull/99) [`51054d0`](https://github.com/code-vaults/git-credential-broker/commit/51054d0042306c6e14bf141e2fef0b53426c62af) Thanks [@JounQin](https://github.com/JounQin)! - Add `pr:update-branch` to the action catalog. It takes an optional `--rebase`, uses + `pull_requests: write` and `contents: write`, and sets `appUser`, so bare `--as-user` works through + the app broker. `appUser` follows `pr:edit`: updating a branch is an author operation, while + close/reopen/ready/lock stay host-account only. Bare `--as-user` needs a user token with + `contents: write`; the recommended `Contents: Read` token is enough for PR editing but not for + updating a branch. The default app route and `--as-user ` do not depend on that token. For a + PR whose head is a fork, the app installation token is scoped to the base repository and cannot + write the head fork; use `--as-user ` for that case. + ## 0.5.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index ca18a251..df6e9ec2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "gcb-core", - "version": "0.5.0", + "version": "0.6.0", "description": "Shared command runtime and protocol for gcb-client and gcb-host.", "license": "MIT", "author": "JounQin ", diff --git a/packages/host/CHANGELOG.md b/packages/host/CHANGELOG.md index 35990187..1029c006 100644 --- a/packages/host/CHANGELOG.md +++ b/packages/host/CHANGELOG.md @@ -1,5 +1,12 @@ # gcb-host +## 0.6.0 + +### Patch Changes + +- Updated dependencies [[`9ad2d26`](https://github.com/code-vaults/git-credential-broker/commit/9ad2d26139b8fd4e6875ce2279494f2b29ad8e0b), [`fdf3ff6`](https://github.com/code-vaults/git-credential-broker/commit/fdf3ff6779080573cd6fcae62e7b8156898352c2), [`51054d0`](https://github.com/code-vaults/git-credential-broker/commit/51054d0042306c6e14bf141e2fef0b53426c62af)]: + - gcb-core@0.6.0 + ## 0.5.0 ### Patch Changes diff --git a/packages/host/package.json b/packages/host/package.json index f19bbe2c..1c76d822 100644 --- a/packages/host/package.json +++ b/packages/host/package.json @@ -1,6 +1,6 @@ { "name": "gcb-host", - "version": "0.5.0", + "version": "0.6.0", "description": "Host-side gcb broker, configuration, providers and administration commands.", "license": "MIT", "author": "JounQin ", @@ -28,7 +28,7 @@ } }, "dependencies": { - "gcb-core": "0.5.0", + "gcb-core": "0.6.0", "node-fetch-native": "^1.6.7", "x-fetch": "^0.3.0", "yaml": "^2.9.1" diff --git a/yarn.lock b/yarn.lock index c172cbf2..6f6a0c91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -477,13 +477,13 @@ __metadata: version: 0.0.0-use.local resolution: "gcb-client@workspace:packages/client" dependencies: - gcb-core: "npm:0.5.0" + gcb-core: "npm:0.6.0" bin: gcb: ./bin/gcb.js languageName: unknown linkType: soft -"gcb-core@npm:0.5.0, gcb-core@workspace:packages/core": +"gcb-core@npm:0.6.0, gcb-core@workspace:packages/core": version: 0.0.0-use.local resolution: "gcb-core@workspace:packages/core" languageName: unknown @@ -493,7 +493,7 @@ __metadata: version: 0.0.0-use.local resolution: "gcb-host@workspace:packages/host" dependencies: - gcb-core: "npm:0.5.0" + gcb-core: "npm:0.6.0" node-fetch-native: "npm:^1.6.7" x-fetch: "npm:^0.3.0" yaml: "npm:^2.9.1"