You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ke...@apache.org on 2026/04/16 16:24:23 UTC
(iceberg-cpp) branch main updated: ci: apply github workflow best practice (zizmor/codeql/asf-allowlist-check) (#618)
This is an automated email from the ASF dual-hosted git repository.
kevinjqliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 633965f7 ci: apply github workflow best practice (zizmor/codeql/asf-allowlist-check) (#618)
633965f7 is described below
commit 633965f7eb94aeb082b211ae6c79c7e2fcbeb184
Author: Kevin Liu <ke...@users.noreply.github.com>
AuthorDate: Thu Apr 16 09:24:18 2026 -0700
ci: apply github workflow best practice (zizmor/codeql/asf-allowlist-check) (#618)
Adding these 3 checks for all apache/iceberg* repos as part of
https://github.com/apache/iceberg/issues/15742
---
.../{workflows/pre-commit.yml => dependabot.yml} | 30 ++++++----------
.../{codeql.yml => asf-allowlist-check.yml} | 40 ++++++++--------------
.github/workflows/codeql.yml | 14 ++++----
.github/workflows/cpp-linter.yml | 10 ++++--
.github/workflows/docs.yml | 5 +--
.github/workflows/license_check.yml | 6 ++--
.github/workflows/pre-commit.yml | 6 ++--
.github/workflows/rc.yml | 16 ++++++---
.github/workflows/sanitizer_test.yml | 4 ++-
.github/workflows/test.yml | 36 +++++++++++--------
.../workflows/{license_check.yml => zizmor.yml} | 33 +++++++++++-------
11 files changed, 107 insertions(+), 93 deletions(-)
diff --git a/.github/workflows/pre-commit.yml b/.github/dependabot.yml
similarity index 70%
copy from .github/workflows/pre-commit.yml
copy to .github/dependabot.yml
index 67f8ec58..fc74cd29 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/dependabot.yml
@@ -14,23 +14,15 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+#
-name: pre-commit
-
-on:
- pull_request:
- push:
- branches:
- - '**'
- - '!dependabot/**'
-
-permissions:
- contents: read
-
-jobs:
- pre-commit:
- runs-on: ubuntu-slim
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-python@v6
- - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
+version: 2
+updates:
+ # Maintain dependencies for GitHub Actions
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ day: "sunday"
+ cooldown:
+ default-days: 7
diff --git a/.github/workflows/codeql.yml b/.github/workflows/asf-allowlist-check.yml
similarity index 58%
copy from .github/workflows/codeql.yml
copy to .github/workflows/asf-allowlist-check.yml
index e71958d9..65dbe8bc 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/asf-allowlist-check.yml
@@ -17,40 +17,30 @@
# under the License.
#
-name: "CodeQL"
+# Verifies all GitHub Actions refs are on the ASF allowlist.
+# Actions not on the allowlist silently fail with "Startup failure" — no logs,
+# no notifications, and PRs may appear green because no checks ran.
+# See https://github.com/apache/infrastructure-actions/issues/574
+name: "ASF Allowlist Check"
on:
- push:
- branches:
- - main
pull_request:
+ paths:
+ - ".github/**"
+ push:
branches:
- main
- schedule:
- - cron: '16 4 * * 1'
+ paths:
+ - ".github/**"
permissions:
contents: read
jobs:
- analyze:
- name: Analyze Actions
- runs-on: ubuntu-slim
- permissions:
- contents: read
- security-events: write
- packages: read
-
+ asf-allowlist-check:
+ runs-on: ubuntu-24.04
steps:
- - name: Checkout repository
- uses: actions/checkout@v6
-
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v4
- with:
- languages: actions
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v4
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
- category: "/language:actions"
+ persist-credentials: false
+ - uses: apache/infrastructure-actions/allowlist-check@4e9c961f587f72b170874b6f5cd4ac15f7f26eb8 # main
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index e71958d9..fe0459ae 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -21,11 +21,9 @@ name: "CodeQL"
on:
push:
- branches:
- - main
+ branches: [ "main" ]
pull_request:
- branches:
- - main
+ branches: [ "main" ]
schedule:
- cron: '16 4 * * 1'
@@ -43,14 +41,16 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Initialize CodeQL
- uses: github/codeql-action/init@v4
+ uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
languages: actions
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v4
+ uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
category: "/language:actions"
diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml
index 26324479..51a8f4d6 100644
--- a/.github/workflows/cpp-linter.yml
+++ b/.github/workflows/cpp-linter.yml
@@ -34,7 +34,9 @@ jobs:
pull-requests: write
steps:
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
@@ -46,7 +48,7 @@ jobs:
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build .
- - uses: cpp-linter/cpp-linter-action@0f6d1b8d7e38b584cbee606eb23d850c217d54f8
+ - uses: cpp-linter/cpp-linter-action@0f6d1b8d7e38b584cbee606eb23d850c217d54f8 # v2.15.1
id: linter
continue-on-error: true
env:
@@ -66,5 +68,7 @@ jobs:
- name: Fail fast?!
if: steps.linter.outputs.checks-failed != 0
run: |
- echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
+ echo "some linter checks failed. ${STEPS_LINTER_OUTPUTS_CHECKS_FAILED}"
exit 1
+ env:
+ STEPS_LINTER_OUTPUTS_CHECKS_FAILED: ${{ steps.linter.outputs.checks-failed }}
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index c6ec84fd..82d0e5ab 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -37,11 +37,12 @@ jobs:
runs-on: ubuntu-slim
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 1
+ persist-credentials: false
- - uses: actions/setup-python@v6
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.x'
diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml
index 8bed66aa..17af559d 100644
--- a/.github/workflows/license_check.yml
+++ b/.github/workflows/license_check.yml
@@ -28,9 +28,11 @@ jobs:
runs-on: ubuntu-slim
steps:
- name: Checkout repository
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Check license header
- uses: apache/skywalking-eyes@main
+ uses: apache/skywalking-eyes@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index 67f8ec58..363c234b 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -31,6 +31,8 @@ jobs:
pre-commit:
runs-on: ubuntu-slim
steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-python@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index 91ddb0e5..75c18d3d 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -34,7 +34,9 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Prepare for tag
if: github.ref_type == 'tag'
@@ -84,9 +86,11 @@ jobs:
CXX: g++-14
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- - uses: actions/download-artifact@v8
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: archive
@@ -130,9 +134,11 @@ jobs:
contents: write
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- - uses: actions/download-artifact@v8
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: archive
diff --git a/.github/workflows/sanitizer_test.yml b/.github/workflows/sanitizer_test.yml
index cdb3c86b..422257a1 100644
--- a/.github/workflows/sanitizer_test.yml
+++ b/.github/workflows/sanitizer_test.yml
@@ -39,7 +39,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c60f42b1..40b42954 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -52,7 +52,9 @@ jobs:
AWS_EC2_METADATA_DISABLED: "TRUE"
steps:
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
@@ -86,7 +88,9 @@ jobs:
AWS_EC2_METADATA_DISABLED: "TRUE"
steps:
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Start MinIO
shell: bash
run: bash ci/scripts/start_minio.sh
@@ -111,30 +115,32 @@ jobs:
AWS_EC2_METADATA_DISABLED: "TRUE"
steps:
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Install dependencies
- shell: cmd
+ shell: pwsh
run: |
vcpkg install zlib:x64-windows nlohmann-json:x64-windows nanoarrow:x64-windows roaring:x64-windows cpr:x64-windows
- name: Setup sccache
- uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
+ uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 # zizmor: ignore[cache-poisoning] -- only used for build caching, no artifacts published
- name: Start MinIO
shell: bash
run: bash ci/scripts/start_minio.sh
- name: Build Iceberg
- shell: cmd
+ shell: pwsh
env:
SCCACHE_GHA_ENABLED: "true"
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
- bash -c "ci/scripts/build_iceberg.sh $(pwd) OFF ON"
- if %errorlevel% neq 0 exit /b %errorlevel%
+ $ErrorActionPreference = "Stop"
+ cmd /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat`" x64 && bash -lc `"ci/scripts/build_iceberg.sh `$(pwd) OFF ON`""
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
sccache --show-stats
- name: Build Example
- shell: cmd
+ shell: pwsh
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
- bash -c "ci/scripts/build_example.sh $(pwd)/example"
+ $ErrorActionPreference = "Stop"
+ cmd /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat`" x64 && bash -lc `"ci/scripts/build_example.sh `$(pwd)/example`""
meson:
name: Meson - ${{ matrix.title }}
runs-on: ${{ matrix.runs-on }}
@@ -155,11 +161,13 @@ jobs:
- title: AArch64 macOS 26
runs-on: macos-26
steps:
- - uses: actions/setup-python@v6
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.x'
- name: Checkout iceberg-cpp
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ persist-credentials: false
- name: Install build dependencies
run: |
python3 -m pip install --upgrade pip
diff --git a/.github/workflows/license_check.yml b/.github/workflows/zizmor.yml
similarity index 62%
copy from .github/workflows/license_check.yml
copy to .github/workflows/zizmor.yml
index 8bed66aa..5ac3f30e 100644
--- a/.github/workflows/license_check.yml
+++ b/.github/workflows/zizmor.yml
@@ -1,3 +1,4 @@
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -14,24 +15,30 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+#
-name: "Run License Check"
+name: GitHub Actions Security Analysis with zizmor 🌈
-on: pull_request
+on:
+ push:
+ branches: ["main"]
+ pull_request:
+ branches: ["**"]
-permissions:
- contents: read
+permissions: {}
jobs:
- license-check:
- name: "License Check"
- runs-on: ubuntu-slim
+ zizmor:
+ name: Run zizmor 🌈
+ runs-on: ubuntu-24.04
+ permissions: {}
steps:
- name: Checkout repository
- uses: actions/checkout@v6
- - name: Check license header
- uses: apache/skywalking-eyes@main
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false
+
+ - name: Run zizmor 🌈
+ uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
with:
- config: .github/.licenserc.yaml
+ advanced-security: false