Skip to content

Commit

Permalink
feat(security): Add provenance (#206)
Browse files Browse the repository at this point in the history
* Enable provenance in package.json

* Add necessary permissions to the release workflow

* Adapt sub-packages

---------

Co-authored-by: wolfy1339 <[email protected]>
  • Loading branch information
AaronDewes and wolfy1339 authored Apr 3, 2024
1 parent 744a9b0 commit 8a1e339
Show file tree
Hide file tree
Showing 43 changed files with 89 additions and 39 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ name: Release
push:
branches:
- main
# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

jobs:
release:
name: release
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,5 +289,8 @@
"engines": {
"node": ">=16.5.0",
"npm": ">=7.17.0"
},
"publishConfig": {
"provenance": true
}
}
3 changes: 2 additions & 1 deletion packages/auth-token/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@octokit-next/auth-token",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"version": "0.0.0-development",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@octokit-next/core",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"version": "0.0.0-development",
Expand Down
3 changes: 2 additions & 1 deletion packages/endpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@octokit-next/endpoint",
"version": "0.0.0-development",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"description": "Turns REST API endpoints into generic request options",
Expand Down
3 changes: 2 additions & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@octokit-next/graphql",
"version": "0.0.0-development",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"description": "GitHub GraphQL API client for browsers and Node",
Expand Down
3 changes: 2 additions & 1 deletion packages/oauth-authorization-url/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@octokit-next/oauth-authorization-url",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"version": "0.0.0-development",
Expand Down
3 changes: 2 additions & 1 deletion packages/oauth-methods/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@octokit-next/oauth-methods",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"version": "0.0.0-development",
Expand Down
3 changes: 2 additions & 1 deletion packages/request-error/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@octokit-next/request-error",
"version": "0.0.0-development",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"description": "Error class for Octokit request errors",
Expand Down
3 changes: 2 additions & 1 deletion packages/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@octokit-next/request",
"version": "0.0.0-development",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"type": "module",
"description": "Simplified version of `@octokit/request` to experiment with ESM and types",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghec-diff-to-api.github.com"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghec"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.2-diff-to-ghes-3.3"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghes-3.2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.2"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.3-diff-to-ghes-3.4"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghes-3.3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.3"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.4-diff-to-ghes-3.5"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghes-3.4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.4"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.5-diff-to-ghes-3.6"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghes-3.5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.5"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.6-diff-to-api.github.com"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-ghes-3.6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-ghes-3.6"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-github.ae-diff-to-api.github.com"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi-github.ae/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi-github.ae"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/types-openapi"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"types": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghec-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghec-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghec",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.2-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.2-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.3-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.3-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.4-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.4-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.5-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.5-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.6-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.6-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-ghes-3.6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-ghes-3.6",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-github.ae-compatible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-github.ae-compatible",
Expand Down
3 changes: 2 additions & 1 deletion packages/types-rest-api-github.ae/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"openapi-version": "8.0.1"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"directory": "packages/types-rest-api-github.ae",
Expand Down
Loading

0 comments on commit 8a1e339

Please sign in to comment.