Browse Source

GitHub Workflows security hardening (#2570)

Update tests.yml

Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>

Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
Alex 3 years ago
parent
commit
d1523c8541
1 changed files with 5 additions and 0 deletions
  1. 5 0
      .github/workflows/tests.yml

+ 5 - 0
.github/workflows/tests.yml

@@ -5,6 +5,9 @@ on:
     branches:
     branches:
       - master
       - master
 
 
+permissions:
+  contents: read
+
 jobs:
 jobs:
   Test:
   Test:
     if: "!contains(github.event.head_commit.message, '[skip ci]')"
     if: "!contains(github.event.head_commit.message, '[skip ci]')"
@@ -39,6 +42,8 @@ jobs:
         run: npm run test:lint
         run: npm run test:lint
 
 
   Release:
   Release:
+    permissions:
+      contents: write
     needs: [Test, Lint]
     needs: [Test, Lint]
     if: |
     if: |
       github.ref == 'refs/heads/master' &&
       github.ref == 'refs/heads/master' &&