Skip to content

Commit

Permalink
feat(security): Configure provenance (#1997)
Browse files Browse the repository at this point in the history
This adds a cryptographic signature to NPM uploads to show that a upload was done by GitHub actions and not somewhere else.
Such a feature should help detect malicious uploads to NPM.
This feature could be extended to other repositories too.
  • Loading branch information
AaronDewes committed Apr 3, 2024
1 parent 8e9dd47 commit 3f20320
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -6,6 +6,14 @@ on:
- 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: 3 additions & 0 deletions package.json
Expand Up @@ -111,5 +111,8 @@
}
]
]
},
"publishConfig": {
"provenance": true
}
}

0 comments on commit 3f20320

Please sign in to comment.