From 690d83f98f579e958b3292f5199253f2b5aa120e Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Thu, 19 Nov 2026 23:04:42 +0000 Subject: [PATCH 1/3] ci: pin docker actions to commit SHAs Fixes the 15 actions/unpinned-tag code-scanning alerts in docker-publish.yml, docker-publish-skdb.yml and docker-retag-latest.yml: docker/setup-buildx-action -> v4.4.1, docker/login-action -> v4.8.0, docker/bake-action -> v7.5.0. First-party actions/* and github/* uses are trusted by code scanning and left on tags. Co-Authored-By: Mistral Vibe (mistral-large-4-0) Co-authored-by: mbouaziz --- .github/workflows/docker-publish-skdb.yml | 12 ++++++------ .github/workflows/docker-publish.yml | 14 +++++++------- .github/workflows/docker-retag-latest.yml | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-publish-skdb.yml b/.github/workflows/docker-publish-skdb.yml index 0e87e05a6..67aa11835 100644 --- a/.github/workflows/docker-publish-skdb.yml +++ b/.github/workflows/docker-publish-skdb.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - name: Check the credentials can push skdb @@ -64,10 +64,10 @@ jobs: # The compiler is built from source in the image, and its Makefile # needs the pinned bootstrap and libbacktrace submodules. submodules: true - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - - uses: docker/login-action@v4 + - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -76,7 +76,7 @@ jobs: run: df -h / - name: Build and push by digest id: bake - uses: docker/bake-action@v7 + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 with: # v6+ defaults to the git context, which would pick up neither the # submodules checked out above nor .dockerignore. @@ -129,13 +129,13 @@ jobs: path: /tmp/digests pattern: digest-* merge-multiple: true - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: # Load bearing: imagetools create runs from the CLI plugin this # installs, and it is what preserves or drops the per-platform # attestations. version: ${{ env.BUILDX_VERSION }} - - uses: docker/login-action@v4 + - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2d8ae66e6..03b538839 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - name: Check every image CircleCI pulls is published @@ -52,7 +52,7 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - name: Check the credentials can push every published image @@ -83,10 +83,10 @@ jobs: # The compiler is built from source in the image, and its Makefile # needs the pinned bootstrap and libbacktrace submodules. submodules: true - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - - uses: docker/login-action@v4 + - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -115,7 +115,7 @@ jobs: run: df -h / - name: Build and push by digest id: bake - uses: docker/bake-action@v7 + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 with: # v6+ defaults to the git context, which would pick up neither the # submodules checked out above nor .dockerignore. @@ -182,13 +182,13 @@ jobs: path: /tmp/meta pattern: metadata-* merge-multiple: true - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: # Load bearing here, not just in build: imagetools create runs from # the CLI plugin this installs, and it is what preserves or drops the # per-platform attestations. version: ${{ env.BUILDX_VERSION }} - - uses: docker/login-action@v4 + - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/docker-retag-latest.yml b/.github/workflows/docker-retag-latest.yml index 04603ab8f..7a91d36ad 100644 --- a/.github/workflows/docker-retag-latest.yml +++ b/.github/workflows/docker-retag-latest.yml @@ -44,10 +44,10 @@ jobs: if: github.repository == 'SkipLabs/skip' runs-on: ubuntu-24.04 steps: - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 with: version: ${{ env.BUILDX_VERSION }} - - uses: docker/login-action@v4 + - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From 9a8040a08b9ecf9322a894937de06a1c70299a5a Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Thu, 19 Nov 2026 23:04:42 +0000 Subject: [PATCH 2/3] sql/ts: verify message origin in browser skdb worker Fixes the js/missing-origin-check code-scanning alert on the postmessage handler in skdb_worker.ts. The worker is only created same-origin from the embedding page, so drop messages whose origin does not match the worker script's own origin. Co-Authored-By: Mistral Vibe (mistral-large-4-0) Co-authored-by: mbouaziz --- sql/ts/src/skdb_worker.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/ts/src/skdb_worker.ts b/sql/ts/src/skdb_worker.ts index f8e693507..2f8e852f5 100644 --- a/sql/ts/src/skdb_worker.ts +++ b/sql/ts/src/skdb_worker.ts @@ -49,6 +49,12 @@ const post = (message: any) => { }; const onMessage = (message: MessageEvent) => { + // The worker is only ever created same-origin from the embedding page + // (browser.ts: new Worker(new URL("./skdb_worker.js", import.meta.url))), + // so anything else is not a legitimate caller. + if (message.origin !== self.location.origin) { + return; + } /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument */ onWorkerMessage(message.data, post, creator); }; From b49074539e73c6d8285e9d0bcb4b9e12e5603d8d Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Thu, 19 Nov 2026 23:04:43 +0000 Subject: [PATCH 3/3] ci: configure codeql to ignore false-positive alerts Add .github/codeql/codeql-config.yml and point codeql.yml at it via config-file (the action does not auto-load it). The config keeps the security-extended suite and: - excludes cpp/path-injection: the only hits are the local runtime CLI opening the --data/--init state.db path from its own argv in palloc.c, which the local user already controls; - paths-ignores the localhost-only database-server example, where js/missing-rate-limiting is not exploitable. Config-level filters are the effective mechanism here: GitHub code scanning ignores SARIF suppressions, and in-code codeql[...] comments do nothing unless the AlertSuppression query runs. Co-Authored-By: Mistral Vibe (mistral-large-4-0) Co-authored-by: mbouaziz --- .github/codeql/codeql-config.yml | 17 +++++++++++++++++ .github/workflows/codeql.yml | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 000000000..9478ac27a --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,17 @@ +name: "Skip CodeQL config" + +queries: + - uses: security-extended + +# The C runtime is a local CLI: the only cpp/path-injection hits are +# sk_create_mapping/sk_load_mapping opening the state.db path passed via the +# process's own --data/--init argv (skiplang/prelude/runtime/palloc.c). The +# local user already controls the filesystem, so the rule is pure noise here. +query-filters: + - exclude: + id: cpp/path-injection + +# The examples are localhost-only demos, not shipped services, so +# js/missing-rate-limiting does not apply to them. +paths-ignore: + - "skipruntime-ts/examples/database-server.ts" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d3107db94..fd201e65e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,8 @@ jobs: with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - queries: security-extended + # query suite and filters live in .github/codeql/codeql-config.yml + config-file: .github/codeql/codeql-config.yml - name: Build C runtime (manual c-cpp) if: matrix.language == 'c-cpp'