fix: set minimal top-level permissions on workflows (#14358)
- Fix CodeQL alerts by declaring read-only GITHUB_TOKEN scope at the workflow level. The codespace image publish workflow additionally needs packages: write to push to ghcr.io.
This commit is contained in:
3
.github/workflows/deploy_check.yml
vendored
3
.github/workflows/deploy_check.yml
vendored
@@ -11,6 +11,9 @@ concurrency:
|
|||||||
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deployment_check:
|
deployment_check:
|
||||||
name: Check Deployment
|
name: Check Deployment
|
||||||
|
|||||||
3
.github/workflows/frontend-fe.yml
vendored
3
.github/workflows/frontend-fe.yml
vendored
@@ -8,6 +8,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ concurrency:
|
|||||||
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
log_lines_check:
|
log_lines_check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
3
.github/workflows/nightly_installer.yml
vendored
3
.github/workflows/nightly_installer.yml
vendored
@@ -14,6 +14,9 @@ on:
|
|||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nightly:
|
nightly:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: Publish Codespace Base Image
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-code-space-image:
|
publish-code-space-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
3
.github/workflows/publish_ee_docker.yml
vendored
3
.github/workflows/publish_ee_docker.yml
vendored
@@ -18,6 +18,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_REPO: chatwoot/chatwoot
|
DOCKER_REPO: chatwoot/chatwoot
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
3
.github/workflows/publish_foss_docker.yml
vendored
3
.github/workflows/publish_foss_docker.yml
vendored
@@ -18,6 +18,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_REPO: chatwoot/chatwoot
|
DOCKER_REPO: chatwoot/chatwoot
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
3
.github/workflows/size-limit.yml
vendored
3
.github/workflows/size-limit.yml
vendored
@@ -10,6 +10,9 @@ concurrency:
|
|||||||
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
3
.github/workflows/test_docker_build.yml
vendored
3
.github/workflows/test_docker_build.yml
vendored
@@ -7,6 +7,9 @@ on:
|
|||||||
- master
|
- master
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-build:
|
test-build:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
Reference in New Issue
Block a user