Skip to content

Commit b28ee22

Browse files
feat(security): Add provenance (#916)
* Enable provenance in package.json * Add necessary permissions to the release workflow * Adapt PR --------- Co-authored-by: wolfy1339 <[email protected]>
1 parent 897531e commit b28ee22

5 files changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
- main
55
- beta
66
name: Release
7+
# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance
8+
permissions:
9+
contents: write # to be able to publish a GitHub release
10+
issues: write # to be able to comment on released issues
11+
pull-requests: write # to be able to comment on released pull requests
12+
id-token: write # to enable use of OIDC for npm provenance
13+
714
jobs:
815
build:
916
name: release

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,5 @@
9191
"turndown": "^7.1.1",
9292
"typescript": "^5.0.0",
9393
"yargs": "^17.3.1"
94-
},
95-
"publishConfig": {
96-
"access": "public"
9794
}
9895
}

payload-examples/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"devDependencies": {},
2020
"publishConfig": {
21-
"access": "public"
21+
"access": "public",
22+
"provenance": true
2223
}
2324
}

payload-schemas/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dependencies": {},
1515
"devDependencies": {},
1616
"publishConfig": {
17-
"access": "public"
17+
"access": "public",
18+
"provenance": true
1819
}
1920
}

payload-types/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dependencies": {},
1616
"devDependencies": {},
1717
"publishConfig": {
18-
"access": "public"
18+
"access": "public",
19+
"provenance": true
1920
}
2021
}

0 commit comments

Comments
 (0)