Skip to content

Commit fcadeff

Browse files
feat(security): Add provenance (#408)
* Enable provenance in package.json * Add necessary permissions to the release workflow * Adapt for sub-packages * style: prettier --------- Co-authored-by: wolfy1339 <[email protected]>
1 parent f2fe6f7 commit fcadeff

File tree

10 files changed

+23
-10
lines changed

10 files changed

+23
-10
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ name: Release
66
- next
77
- beta
88
- "*.x"
9+
# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance
10+
permissions:
11+
contents: write # to be able to publish a GitHub release
12+
issues: write # to be able to comment on released issues
13+
pull-requests: write # to be able to comment on released pull requests
14+
id-token: write # to enable use of OIDC for npm provenance
15+
916
jobs:
1017
release:
1118
name: release

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"name": "@octokit/openapi-types",
3-
"publishConfig": {
4-
"access": "public"
5-
},
3+
"private": true,
64
"version": "0.0.0-development",
75
"description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for https://api.github.com",
86
"repository": "github:octokit/openapi-types.ts",

packages/openapi-types-ghec/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-ghec"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types-ghes-3.10/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-ghes-3.10"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types-ghes-3.11/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-ghes-3.11"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types-ghes-3.12/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-ghes-3.12"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types-ghes-3.9/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-ghes-3.9"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types-github.ae/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types-github.ae"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

packages/openapi-types/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"directory": "packages/openapi-types"
88
},
99
"publishConfig": {
10-
"access": "public"
10+
"access": "public",
11+
"provenance": true
1112
},
1213
"version": "0.0.0-development",
1314
"main": "",

scripts/generate-types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ run();
1313
const packageDefaults = {
1414
publishConfig: {
1515
access: "public",
16+
provenance: true,
1617
},
1718
version: "0.0.0-development",
1819
main: "",

0 commit comments

Comments
 (0)