Преглед на файлове

ci: Set permissions for GitHub actions (#17102)

chore: Set permissions for GitHub actions

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
version-14
Naveen преди 3 години
committed by GitHub
родител
ревизия
fd8af163ba
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 7 файла, в които са добавени 23 реда и са изтрити 0 реда
  1. +5
    -0
      .github/workflows/docker-release.yml
  2. +3
    -0
      .github/workflows/docs-checker.yml
  3. +3
    -0
      .github/workflows/patch-mariadb-tests.yml
  4. +3
    -0
      .github/workflows/release.yml
  5. +3
    -0
      .github/workflows/server-mariadb-tests.yml
  6. +3
    -0
      .github/workflows/server-postgres-tests.yml
  7. +3
    -0
      .github/workflows/ui-tests.yml

+ 5
- 0
.github/workflows/docker-release.yml Целия файл

@@ -2,8 +2,13 @@ name: 'Trigger Docker build on release'
on:
release:
types: [released]
permissions:
contents: read

jobs:
curl:
permissions:
contents: none
name: 'Trigger Docker build on release'
runs-on: ubuntu-latest
container:


+ 3
- 0
.github/workflows/docs-checker.yml Целия файл

@@ -3,6 +3,9 @@ on:
pull_request:
types: [ opened, synchronize, reopened, edited ]

permissions:
contents: read

jobs:
docs-required:
name: 'Documentation Required'


+ 3
- 0
.github/workflows/patch-mariadb-tests.yml Целия файл

@@ -7,6 +7,9 @@ concurrency:
group: patch-mariadb-develop-${{ github.event.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest


+ 3
- 0
.github/workflows/release.yml Целия файл

@@ -3,6 +3,9 @@ on:
push:
branches:
- version-14-beta
permissions:
contents: read

jobs:
release:
name: Release


+ 3
- 0
.github/workflows/server-mariadb-tests.yml Целия файл

@@ -11,6 +11,9 @@ concurrency:
cancel-in-progress: true


permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest


+ 3
- 0
.github/workflows/server-postgres-tests.yml Целия файл

@@ -10,6 +10,9 @@ concurrency:
group: server-postgres-develop-${{ github.event.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest


+ 3
- 0
.github/workflows/ui-tests.yml Целия файл

@@ -10,6 +10,9 @@ concurrency:
group: ui-develop-${{ github.event.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest


Зареждане…
Отказ
Запис