From f3c931411464a7ebe1d75454631eb1e67a6cd4cf Mon Sep 17 00:00:00 2001 From: TiM Date: Mon, 13 Apr 2026 12:56:28 +1200 Subject: [PATCH] chore(ci): CI hygiene batch (concurrency, timeouts, action pinning, Dependabot) (#375) * chore(ci): CI hygiene batch (concurrency, timeouts, action pinning, Dependabot) Rework of #350 with release-related changes removed per maintainer feedback on #348 (semantic-release intentionally disabled while main stabilizes). What's included: - Concurrency groups on all workflows (cancel superseded runs) - timeout-minutes on all jobs (prevent stuck builds) - SHA-pinned third-party actions (supply chain hardening) - Dependabot config for Maven deps + GitHub Actions - CODEOWNERS routing CI/release paths to @hectorvent - SECURITY.md with private vulnerability reporting instructions What's NOT included (intentionally): - semver.yml changes (semantic-release on main) - .releaserc.json changes (main branch addition) * chore: switch Dependabot schedule from weekly to monthly --- .github/CODEOWNERS | 20 +++++++++++++++++ .github/dependabot.yml | 29 +++++++++++++++++++++++++ .github/workflows/ci.yml | 5 +++++ .github/workflows/compatibility.yml | 15 ++++++++----- .github/workflows/docs.yml | 5 +++++ .github/workflows/edge.yml | 11 +++++++--- .github/workflows/release.yml | 33 ++++++++++++++++++++--------- SECURITY.md | 24 +++++++++++++++++++++ 8 files changed, 124 insertions(+), 18 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml create mode 100644 SECURITY.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..2143af3104 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,20 @@ +# CODEOWNERS for floci +# +# Scopes release-sensitive paths to the primary maintainer so CI, release +# config, and Dockerfile changes always trigger a review ping. Add more +# owners as the maintainer roster grows. +# +# Docs: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners + +# Default: no global owner (unowned files fall through to normal review rules). + +# CI, release automation, workflow hygiene +/.github/ @hectorvent +/.releaserc.json @hectorvent +/pom.xml @hectorvent + +# Container build surface +/Dockerfile @hectorvent +/Dockerfile.jvm-package @hectorvent +/Dockerfile.native @hectorvent +/Dockerfile.native-package @hectorvent diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..f64d6f471d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,29 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 + groups: + maven-minor-patch: + update-types: + - "minor" + - "patch" + labels: + - "dependencies" + - "java" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 5 + groups: + actions-minor-patch: + update-types: + - "minor" + - "patch" + labels: + - "dependencies" + - "github-actions" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7ffd9ee57..b3bcaa8513 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,15 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Build and Test runs-on: ubuntu-latest + timeout-minutes: 20 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index 494431ead9..021975569b 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -19,10 +19,15 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build floci image runs-on: ubuntu-latest + timeout-minutes: 20 steps: - uses: actions/checkout@v4 @@ -35,10 +40,10 @@ jobs: - name: Build JVM artifact run: mvn clean package -DskipTests -q - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - name: Build Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.jvm-package @@ -108,10 +113,10 @@ jobs: with: sparse-checkout: compatibility-tests - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - name: Build test image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: compatibility-tests/${{ matrix.test }} load: true @@ -141,7 +146,7 @@ jobs: - name: Generate test summary if: always() && steps.tests.outcome != 'skipped' - uses: test-summary/action@v2 + uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 with: paths: test-results/*.xml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b98a536cf9..6942da5041 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,9 +13,14 @@ on: permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index a2d0deb14f..7cd223bbc3 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -16,10 +16,15 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-push-edge: name: Build and push edge image runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -35,15 +40,15 @@ jobs: - name: Build JVM artifact run: mvn clean package -DskipTests -q - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - - uses: docker/login-action@v3 + - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push edge image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.jvm-package diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ff014783a..294c784940 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,11 +17,20 @@ on: permissions: contents: read +# Per-tag concurrency. Back-to-back tag pushes (e.g. 1.5.3 and 1.6.0 landing +# minutes apart) resolve to different ${{ github.ref }} values, so they run +# in parallel rather than cancelling each other. Re-runs of the same tag +# supersede in-flight builds of that tag. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: # ── Build JVM artifact ──────────────────────────────────────────────────── build-jvm: name: Build JVM artifact runs-on: ubuntu-latest + timeout-minutes: 20 steps: - uses: actions/checkout@v4 @@ -45,11 +54,12 @@ jobs: build-native-amd64: name: Build native artifact (amd64) runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v4 - - uses: graalvm/setup-graalvm@v1 + - uses: graalvm/setup-graalvm@60c26726de13f8b90771df4bc1641a52a3159994 # v1 with: java-version: '24' distribution: 'mandrel' @@ -73,11 +83,12 @@ jobs: build-native-arm64: name: Build native artifact (arm64) runs-on: ubuntu-24.04-arm + timeout-minutes: 45 steps: - uses: actions/checkout@v4 - - uses: graalvm/setup-graalvm@v1 + - uses: graalvm/setup-graalvm@60c26726de13f8b90771df4bc1641a52a3159994 # v1 with: java-version: '24' distribution: 'mandrel' @@ -102,6 +113,7 @@ jobs: name: Push JVM Docker image needs: build-jvm runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -110,9 +122,9 @@ jobs: id: version run: echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - - uses: docker/login-action@v3 + - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -123,7 +135,7 @@ jobs: path: target/quarkus-app/ - name: Build and push JVM image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.jvm-package @@ -138,7 +150,7 @@ jobs: VERSION=${{ steps.version.outputs.version }} - name: Build and push JVM image (With AWS CLI) - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.jvm-package @@ -156,6 +168,7 @@ jobs: name: Push native Docker images needs: [build-native-amd64, build-native-arm64] runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v4 @@ -164,9 +177,9 @@ jobs: id: version run: echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - - uses: docker/login-action@v3 + - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -188,7 +201,7 @@ jobs: chmod +x target/*-runner - name: Build and push amd64 native image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.native-package @@ -206,7 +219,7 @@ jobs: chmod +x target/*-runner - name: Build and push arm64 native image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: context: . file: Dockerfile.native-package diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..e4ef4ffe1c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,24 @@ +# Security Policy + +## Supported Versions + +Only the current stable release line receives security fixes. Older +releases are best-effort and may not get patches. The stable line is the +most recent minor version tagged on this repo (see +[Releases](https://github.com/floci-io/floci/releases)). + +## Reporting a Vulnerability + +Please do **not** open public GitHub issues for security vulnerabilities. + +Report them privately via +[GitHub private vulnerability reporting](https://github.com/floci-io/floci/security/advisories/new). +This is the only supported reporting channel and produces a private +thread with the maintainers. + +Expect an initial acknowledgement within a few business days. Once the +report is confirmed, we will coordinate a fix, a release, and (where +appropriate) a security advisory with CVE assignment. + +See [CONTRIBUTING.md](CONTRIBUTING.md#reporting-security-issues) for the +corresponding contributor-facing note.