diff --git a/.github/workflows/arewefastyet_comment.yml b/.github/workflows/arewefastyet_comment.yml index 8cef3b4aa21..30f99ddd1c8 100644 --- a/.github/workflows/arewefastyet_comment.yml +++ b/.github/workflows/arewefastyet_comment.yml @@ -22,7 +22,7 @@ jobs: egress-policy: audit - name: Generate GitHub App token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 id: app-token with: app-id: ${{ vars.APP_ID }} diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 70ee2cde5d6..d3351dccf3e 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -32,7 +32,7 @@ jobs: with: egress-policy: audit - - uses: actions/create-github-app-token@v2 + - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 id: app-token with: app-id: ${{ vars.APP_ID }} @@ -50,7 +50,7 @@ jobs: git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com' - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/check_make_vtadmin_web_proto.yml b/.github/workflows/check_make_vtadmin_web_proto.yml index 7c49d7b5165..d8bb80194da 100644 --- a/.github/workflows/check_make_vtadmin_web_proto.yml +++ b/.github/workflows/check_make_vtadmin_web_proto.yml @@ -61,7 +61,7 @@ jobs: - name: Setup Node if: steps.changes.outputs.proto_changes == 'true' - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: # node-version should match package.json node-version: '22.13.1' diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml index 362d80e4ddf..9adb571ab5a 100644 --- a/.github/workflows/codeql_analysis.yml +++ b/.github/workflows/codeql_analysis.yml @@ -46,7 +46,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@4bdb89f48054571735e3792627da6195c57459e2 # v3.28.18 with: languages: ${{ matrix.language }} # If you wish to specify cu stom queries, you can do so here or in a config file. @@ -78,11 +78,11 @@ jobs: make build - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@4bdb89f48054571735e3792627da6195c57459e2 # v3.28.18 - name: Slack Workflow Notification if: ${{ failure() }} - uses: Gamesight/slack-workflow-status@master + uses: Gamesight/slack-workflow-status@68bf00d0dbdbcb206c278399aa1ef6c14f74347a # v1.3.0 with: repo_token: ${{secrets.GITHUB_TOKEN}} slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} diff --git a/.github/workflows/pr_opened_tasks.yml b/.github/workflows/pr_opened_tasks.yml index 0e0467f395e..a43fc161858 100644 --- a/.github/workflows/pr_opened_tasks.yml +++ b/.github/workflows/pr_opened_tasks.yml @@ -24,7 +24,7 @@ jobs: egress-policy: audit - name: Generate GitHub App token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 id: app-token with: app-id: ${{ vars.APP_ID }} @@ -57,7 +57,7 @@ jobs: steps: - name: Generate GitHub App token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 id: app-token with: app-id: ${{ vars.APP_ID }} @@ -87,7 +87,7 @@ jobs: steps: - name: Generate GitHub App token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 id: app-token with: app-id: ${{ vars.APP_ID }} diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index bd8ddca1f68..40a8dde44fb 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -31,12 +31,12 @@ jobs: egress-policy: audit - name: "Checkout code" - uses: actions/checkout@v4 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif @@ -58,7 +58,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: SARIF file path: results.sarif @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/upload-sarif@4bdb89f48054571735e3792627da6195c57459e2 # v3.28.18 with: sarif_file: results.sarif diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 125556c8870..a9cd7ee1005 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -35,7 +35,7 @@ jobs: persist-credentials: 'false' - name: Run FOSSA scan and upload build data - uses: fossa-contrib/fossa-action@v3 + uses: fossa-contrib/fossa-action@3d2ef181b1820d6dcd1972f86a767d18167fa19b # v3.0.1 with: # This is a push-only API token: https://github.com/fossa-contrib/fossa-action#push-only-api-token fossa-api-key: f62c11ef0c249fef239947f01279aa0f @@ -193,7 +193,7 @@ jobs: - name: Run golangci-lint if: steps.changes.outputs.go_files == 'true' - uses: golangci/golangci-lint-action@v9 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.0.0 with: args: --timeout 10m install-mode: "goinstall" @@ -217,7 +217,7 @@ jobs: - name: Setup Node if: steps.changes.outputs.proto_changes == 'true' - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: # make proto requires newer node than the pre-installed one node-version: '22.13.1' diff --git a/.github/workflows/update_golang_dependencies.yml b/.github/workflows/update_golang_dependencies.yml index caec1403735..b30c3fe3b03 100644 --- a/.github/workflows/update_golang_dependencies.yml +++ b/.github/workflows/update_golang_dependencies.yml @@ -45,7 +45,7 @@ jobs: go mod tidy - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 with: token: ${{ secrets.CREATE_PR_VITESS_BOT }} branch: "upgrade-go-deps-on-main" diff --git a/.github/workflows/update_golang_version.yml b/.github/workflows/update_golang_version.yml index a419c78806c..6f1202d6f55 100644 --- a/.github/workflows/update_golang_version.yml +++ b/.github/workflows/update_golang_version.yml @@ -70,7 +70,7 @@ jobs: - name: Create Pull Request if: steps.detect-and-update.outputs.create-pr == 'true' - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 with: token: ${{ secrets.CREATE_PR_VITESS_BOT }} branch: "upgrade-go-to-${{steps.detect-and-update.outputs.go-version}}-on-${{ matrix.branch }}" diff --git a/.github/workflows/vtadmin_web_build.yml b/.github/workflows/vtadmin_web_build.yml index 5c90e267676..9486b2f662e 100644 --- a/.github/workflows/vtadmin_web_build.yml +++ b/.github/workflows/vtadmin_web_build.yml @@ -42,7 +42,7 @@ jobs: - name: Tune the OS uses: ./.github/actions/tune-os - - uses: actions/setup-node@v4 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: # node-version should match package.json node-version: '22.13.1' diff --git a/.github/workflows/vtadmin_web_lint.yml b/.github/workflows/vtadmin_web_lint.yml index cb2f78a64d8..9501492e5c7 100644 --- a/.github/workflows/vtadmin_web_lint.yml +++ b/.github/workflows/vtadmin_web_lint.yml @@ -42,7 +42,7 @@ jobs: - name: Tune the OS uses: ./.github/actions/tune-os - - uses: actions/setup-node@v4 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: # node-version should match package.json node-version: '22.13.1' diff --git a/.github/workflows/vtadmin_web_unit_tests.yml b/.github/workflows/vtadmin_web_unit_tests.yml index 096634942e2..dfdd813118c 100644 --- a/.github/workflows/vtadmin_web_unit_tests.yml +++ b/.github/workflows/vtadmin_web_unit_tests.yml @@ -37,7 +37,7 @@ jobs: - name: Tune the OS uses: ./.github/actions/tune-os - - uses: actions/setup-node@v4 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: # node-version should match package.json node-version: '22.13.1' diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index 48e4f577494..7b80caf5aae 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 golang:1.25.3-bookworm +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 # Install Vitess build dependencies RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile index bc3d271fed9..650e7c5dd65 100644 --- a/docker/lite/Dockerfile +++ b/docker/lite/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -40,7 +40,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install locale required for mysqlsh RUN apt-get update && apt-get install -y locales \ diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.mysql80 index b5bd639ec89..cc3d090d65b 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.mysql80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -40,7 +40,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install locale required for mysqlsh RUN apt-get update && apt-get install -y locales \ diff --git a/docker/lite/Dockerfile.mysql84 b/docker/lite/Dockerfile.mysql84 index bc3d271fed9..650e7c5dd65 100644 --- a/docker/lite/Dockerfile.mysql84 +++ b/docker/lite/Dockerfile.mysql84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -40,7 +40,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install locale required for mysqlsh RUN apt-get update && apt-get install -y locales \ diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index e416d71e3af..17333334c2d 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -40,7 +40,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh diff --git a/docker/lite/Dockerfile.percona84 b/docker/lite/Dockerfile.percona84 index 05783a12a49..2b6a8c74e8c 100644 --- a/docker/lite/Dockerfile.percona84 +++ b/docker/lite/Dockerfile.percona84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -40,7 +40,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index 7d1582da4b5..22ea62969e9 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -31,7 +31,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install-testing PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh diff --git a/docker/vttestserver/Dockerfile.mysql84 b/docker/vttestserver/Dockerfile.mysql84 index 281fd58c2ba..c0b591f2940 100644 --- a/docker/vttestserver/Dockerfile.mysql84 +++ b/docker/vttestserver/Dockerfile.mysql84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder +FROM --platform=linux/amd64 golang:1.25.3-bookworm@sha256:414a753c2f67d0efccb01b5f58b3d3a8a2cbb7c012ce9e535418b5b3492b2c24 AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER @@ -31,7 +31,7 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess RUN make install-testing PREFIX=/vt/install # Start over and build the final image. -FROM --platform=linux/amd64 debian:bookworm-slim +FROM --platform=linux/amd64 debian:bookworm-slim@sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe # Install dependencies COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh diff --git a/examples/compose/external_db/mysql/Dockerfile b/examples/compose/external_db/mysql/Dockerfile index f44c63951e3..d29e3fc5c66 100644 --- a/examples/compose/external_db/mysql/Dockerfile +++ b/examples/compose/external_db/mysql/Dockerfile @@ -1,2 +1,2 @@ -FROM mysql:5.7 +FROM mysql:5.7@sha256:dab0a802b44617303694fb17d166501de279c3031ddeb28c56ecf7fcab5ef0da COPY . /docker-entrypoint-initdb.d \ No newline at end of file diff --git a/go/mysql/collations/tools/colldump/Dockerfile b/go/mysql/collations/tools/colldump/Dockerfile index f6834b438bc..1e1cfc97e38 100644 --- a/go/mysql/collations/tools/colldump/Dockerfile +++ b/go/mysql/collations/tools/colldump/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:latest +FROM debian:latest@sha256:a3b5f4f0286249a124bfe9845b3aec0f88de32ff31dd8d7e1b945f9f98d116b0 ARG MYSQL_VERSION=8.0.34 diff --git a/tools/check_go_versions.sh b/tools/check_go_versions.sh index 846a10322f1..5c32a3b5cb4 100755 --- a/tools/check_go_versions.sh +++ b/tools/check_go_versions.sh @@ -10,13 +10,13 @@ set -e # go.mod GO_MOD_VERSION="$(awk '/^go [0-9].[0-9]+/{print $(NF-0)}' go.mod)" if [ -z "${GO_MOD_VERSION}" ]; then - echo "cannot find go version in go.mod" - exit 1 + echo "cannot find go version in go.mod" + exit 1 fi # docker/bootstrap/Dockerfile.common -BOOTSTRAP_GO_VERSION="$(awk -F ':' '/golang:/{print $(NF-0)}' docker/bootstrap/Dockerfile.common | cut -d- -f1)" -if [[ ! "${BOOTSTRAP_GO_VERSION}" =~ "${GO_MOD_VERSION}" ]]; then - echo "expected golang docker version in docker/bootstrap/Dockerfile.common to be equal to go.mod: '${TPL_GO_VERSION}' != '${GO_MOD_VERSION}'" - exit 1 +BOOTSTRAP_GO_VERSION="$(sed -n 's/.*golang:\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' docker/bootstrap/Dockerfile.common)" +if [[ "${BOOTSTRAP_GO_VERSION}" != "${GO_MOD_VERSION}" ]]; then + echo "expected golang docker version in docker/bootstrap/Dockerfile.common to be equal to go.mod: '${BOOTSTRAP_GO_VERSION}' != '${GO_MOD_VERSION}'" + exit 1 fi