Skip to content

Commit e42fca8

Browse files
authored
chore: add workflow permissions (#368)
Signed-off-by: Jan Kowalleck <[email protected]> Signed-off-by: jkowalleck <[email protected]> Co-authored-by: jkowalleck <[email protected]>
1 parent caefb45 commit e42fca8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.ref }}
1919
cancel-in-progress: true
2020

21+
permissions: {}
22+
2123
env:
2224
# https://nodejs.dev/en/about/releases/
2325
NODE_ACTIVE_LTS: "22"

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ on:
2828
default: false
2929
required: false
3030

31+
permissions: {}
32+
3133
env:
3234
# https://nodejs.dev/en/about/releases/
3335
NODE_ACTIVE_LTS: "22"
@@ -41,6 +43,8 @@ jobs:
4143
version_plain: ${{ steps.bump.outputs.version_plain }}
4244
runs-on: ubuntu-latest
4345
timeout-minutes: 30
46+
permissions:
47+
contents: write # needed for git push
4448
steps:
4549
- name: Checkout code
4650
# see https://github.com/actions/checkout
@@ -73,6 +77,7 @@ jobs:
7377
NPMV_PREID: ${{ github.event.inputs.preid }}
7478
- name: git push back
7579
run: git push --follow-tags
80+
7681
publish-NPMJS:
7782
needs:
7883
- "bump"
@@ -102,13 +107,16 @@ jobs:
102107
- name: publish to NPMJS as "unstable-prerelease"
103108
if: ${{ github.event.inputs.prerelease == 'true' }}
104109
run: npm publish --provenance --access public --tag 'unstable-prerelease'
110+
105111
release-GH:
106112
needs:
107113
- "bump"
108114
- "publish-NPMJS"
109115
name: publish GitHub
110116
runs-on: ubuntu-latest
111117
timeout-minutes: 30
118+
permissions:
119+
contents: write # create a release
112120
steps:
113121
- name: Create Release
114122
id: release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/bom",
3-
"version": "4.1.1-alpha.0",
3+
"version": "4.1.2-alpha.0",
44
"description": "Meta-package for known CycloneDX Software Bill of Materials (SBOM) generators",
55
"license": "Apache-2.0",
66
"homepage": "https://github.com/CycloneDX/cyclonedx-node-module#readme",

0 commit comments

Comments
 (0)