Skip to content

Commit

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

* Add necessary permissions to the release workflow

* Adapt scripts

---------

Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
  • Loading branch information
AaronDewes and wolfy1339 committed Apr 3, 2024
1 parent 817b0fe commit 53ad975
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -6,6 +6,13 @@ name: Release
- next
- beta
- "*.x"
# 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: 2 additions & 1 deletion packages/openapi-webhooks-types-ghec/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghec"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-ghes-3.10/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghes-3.10"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-ghes-3.11/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghes-3.11"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-ghes-3.12/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghes-3.12"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-ghes-3.8/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghes-3.8"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-ghes-3.9/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-ghes-3.9"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types-github.ae/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types-github.ae"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks-types/package.json
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-webhooks-types"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-webhooks/package.json
Expand Up @@ -22,6 +22,7 @@
"author": "wolfy1339 <webmaster@wolfy1339.com>",
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
}
}
1 change: 1 addition & 0 deletions scripts/build.js
Expand Up @@ -181,6 +181,7 @@ They are all generated, your changes would be overwritten with the next update.
license: "MIT",
publishConfig: {
access: "public",
provenance: true,
},
}),
{ parser: "json-stringify" },
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-types.js
Expand Up @@ -13,6 +13,7 @@ run();
const packageDefaults = {
publishConfig: {
access: "public",
provenance: true,
},
version: "0.0.0-development",
main: "",
Expand Down

0 comments on commit 53ad975

Please sign in to comment.