From 2822aab8c09dbfd9524b4822999af4f66ee8d516 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Thu, 4 Apr 2024 22:50:01 +0200 Subject: [PATCH] feat(security): Add provenance (#244) * Enable provenance in package.json * Add necessary permissions to the release workflow --- .github/workflows/release.yml | 7 +++++++ package.json | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c658416..8ac3b25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/package.json b/package.json index 7055650..e6ce962 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,8 @@ ] }, "publishConfig": { - "access": "public" + "access": "public", + "provenance": true }, "engines": { "node": ">= 18"