Skip to content

Apache DataFusion SQL Query Engine

Fix some GH action permission issues identified by CodeQL (#21838)

Jeffrey Vo6a09260d5444
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml
index b3c1e10584..7ce6308264 100644
--- a/.github/workflows/audit.yml
+++ b/.github/workflows/audit.yml
@@ -33,9 +33,12 @@ on:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
-
+
merge_group:
+permissions:
+ contents: read
+
jobs:
security_audit:
runs-on: ubuntu-latest
diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml
index 3b2cc243d4..ef175de2aa 100644
--- a/.github/workflows/dependencies.yml
+++ b/.github/workflows/dependencies.yml
@@ -37,6 +37,9 @@ on:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
depcheck:
name: circular dependency check
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 55e8572408..defc0e937d 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -85,7 +85,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- # Version fixed on purpose. It uses heuristics to detect typos, so upgrading
+ # Version fixed on purpose. It uses heuristics to detect typos, so upgrading
# it may cause checks to fail more often.
# We can upgrade it manually once a while.
- name: Install typos-cli
diff --git a/.github/workflows/docs_pr.yaml b/.github/workflows/docs_pr.yaml
index dab81fd645..4b8d25b061 100644
--- a/.github/workflows/docs_pr.yaml
+++ b/.github/workflows/docs_pr.yaml
@@ -33,8 +33,10 @@ on:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
-
# Test doc build
linux-test-doc-build:
name: Test doc build
diff --git a/.github/workflows/large_files.yml b/.github/workflows/large_files.yml
index d5fb586144..5a127e443f 100644
--- a/.github/workflows/large_files.yml
+++ b/.github/workflows/large_files.yml
@@ -25,6 +25,9 @@ on:
pull_request:
merge_group:
+permissions:
+ contents: read
+
jobs:
check-files:
runs-on: ubuntu-slim