diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 9cee97f0de..65f45e5c4a 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -43,7 +43,7 @@ runs: using: composite steps: - name: Cleanup runner - uses: open-edge-platform/geti-ci/actions/cleanup-runner@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/cleanup-runner@6f29a1ff715a9770e024317f30db57bdc0e16418 # cleanup-runner/v0.1.0 with: type: all diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 5b827ae077..f4bcd8ec40 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -28,14 +28,10 @@ // "never") so a fresh lock PR is opened whenever new lock changes appear. // These PRs are immortal by design; that is acceptable now that the lock // no longer reintroduces blocked CVEs and is mergeable. - - // FIXME: re-enable automerge once the issue is resolved - // https://github.com/open-edge-platform/anomalib/issues/3666 - // - // automerge: true, - // automergeType: "pr", - // reviewers: ["sys-geti"], - // platformAutomerge: true, + automerge: true, + automergeType: "pr", + reviewers: ["sys-geti"], + platformAutomerge: true, // Renovate does not assign reviewers and assignees to // automerge-enabled PR unless it fails status checks. @@ -167,6 +163,15 @@ schedule: ["* * 1 * *"], // every month }, + // Custom semver versioning for geti-ci actions to support tags like zizmor/v0.1.0 + { + groupName: "GitHub Actions", + matchManagers: ["github-actions"], + matchPackagePatterns: ["^open-edge-platform/geti-ci/actions/"], + schedule: ["* * 1 * *"], // every month + versioning: "regex:^(?[^/]+)/v?(?\\d+)\\.(?\\d+)\\.(?\\d+)$", + }, + // uv version used in GitHub Actions is updated manually { enabled: false, diff --git a/.github/workflows/_reusable-docker-build.yaml b/.github/workflows/_reusable-docker-build.yaml index 84d4775df3..6b4c8b7935 100644 --- a/.github/workflows/_reusable-docker-build.yaml +++ b/.github/workflows/_reusable-docker-build.yaml @@ -58,12 +58,12 @@ jobs: persist-credentials: false - name: Initial cleanup - uses: open-edge-platform/geti-ci/actions/cleanup-runner@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/cleanup-runner@6f29a1ff715a9770e024317f30db57bdc0e16418 # cleanup-runner/v0.1.0 with: type: "initial" - name: Pre-build cleanup - uses: open-edge-platform/geti-ci/actions/cleanup-runner@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/cleanup-runner@6f29a1ff715a9770e024317f30db57bdc0e16418 # cleanup-runner/v0.1.0 with: type: "pre-build" diff --git a/.github/workflows/_reusable-security-scan.yaml b/.github/workflows/_reusable-security-scan.yaml index 02fa5447eb..a1fbaac01d 100644 --- a/.github/workflows/_reusable-security-scan.yaml +++ b/.github/workflows/_reusable-security-scan.yaml @@ -97,7 +97,7 @@ jobs: with: persist-credentials: false - name: Run Bandit scan - uses: open-edge-platform/geti-ci/actions/bandit@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/bandit@b9abdfc0ecbe989816a7f2cf582af771f9abbb87 # bandit/v0.1.3 with: scan-scope: ${{ inputs.scan-scope }} severity-level: ${{ inputs.severity-level }} @@ -171,7 +171,7 @@ jobs: with: persist-credentials: false - name: Run Zizmor scan - uses: open-edge-platform/geti-ci/actions/zizmor@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/zizmor@27a17d738348699840c32f98edc9947f21278154 # zizmor/v0.1.5 with: scan-scope: ${{ inputs.scan-scope }} severity-level: ${{ inputs.severity-level }} diff --git a/.github/workflows/_reusable-test-suite.yaml b/.github/workflows/_reusable-test-suite.yaml index 814c2fff07..beb7099297 100644 --- a/.github/workflows/_reusable-test-suite.yaml +++ b/.github/workflows/_reusable-test-suite.yaml @@ -119,7 +119,7 @@ jobs: with: persist-credentials: false - name: Run tests - uses: ./.github/actions/pytest + uses: open-edge-platform/anomalib/.github/actions/pytest@1f503a6c3614e2637472cdb6d9ca21054c83ac26 with: python-version: ${{ inputs.python-version }} test-type: ${{ inputs.test-type }} diff --git a/.github/workflows/anomalib-studio.yaml b/.github/workflows/anomalib-studio.yaml index a466c62aaa..6e8c793ae3 100644 --- a/.github/workflows/anomalib-studio.yaml +++ b/.github/workflows/anomalib-studio.yaml @@ -39,7 +39,7 @@ jobs: - name: Check paths id: check_paths - uses: open-edge-platform/geti-ci/actions/check-paths@7e686c1248b3939f8ee8e04e2612da727e379d91 + uses: open-edge-platform/geti-ci/actions/check-paths@2ed3ce382d1dbd6db52c7c6b93ffdae280a1c06f # check-paths/v0.1.0 with: files_yaml: | test: diff --git a/.github/workflows/daily-docker-publish.yml b/.github/workflows/daily-docker-publish.yml index 6cf98e261f..a90454d9ef 100644 --- a/.github/workflows/daily-docker-publish.yml +++ b/.github/workflows/daily-docker-publish.yml @@ -61,7 +61,7 @@ jobs: type=raw,value=${{ github.ref_name }} - name: Build and push Docker image - uses: ./.github/actions/docker-build + uses: open-edge-platform/anomalib/.github/actions/docker-build@ec87c2162f08572b47eb1fea55ed819fd1a39b08 with: device: ${{ matrix.device }} push: "true" @@ -80,6 +80,6 @@ jobs: echo "tag=${TAG}" >> "$GITHUB_OUTPUT" - name: Sign Docker image - uses: open-edge-platform/geti-ci/actions/sign-image@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/sign-image@3690cbcc173cf90e0e0999b4822c3f8ebab9c137 # sign-image/v0.1.2 with: image-uri: ${{ steps.primary-tag.outputs.tag }} diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 04234b392a..88664480e8 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -96,6 +96,8 @@ jobs: with: app-id: ${{ secrets.RENOVATE_APP_ID }} private-key: ${{ secrets.RENOVATE_APP_PEM }} + permission-contents: write + permission-pull-requests: write - name: Create PR if lockfile changed if: steps.check-changes.outputs.changed == 'true' diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index f42bf99bae..57b50bd94a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -74,7 +74,7 @@ jobs: # PR title validation - only runs on actual pull requests, not merge groups pr-title-check: if: github.event_name == 'pull_request' - uses: ./.github/workflows/_reusable-pr-title-check.yaml + uses: $/.github/workflows/_reusable-pr-title-check.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -83,7 +83,7 @@ jobs: # Code quality - covers both library (src/) and application/ via prek workspace mode quality: if: github.event.pull_request.draft != true - uses: ./.github/workflows/_reusable-code-quality.yaml + uses: $/.github/workflows/_reusable-code-quality.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -92,7 +92,7 @@ jobs: # Security scanning security: if: github.event.pull_request.draft != true - uses: ./.github/workflows/_reusable-security-scan.yaml + uses: $/.github/workflows/_reusable-security-scan.yaml permissions: security-events: write # needed to upload results contents: read @@ -125,7 +125,7 @@ jobs: - name: Check paths id: check-library-paths - uses: open-edge-platform/geti-ci/actions/check-paths@7e686c1248b3939f8ee8e04e2612da727e379d91 + uses: open-edge-platform/geti-ci/actions/check-paths@2ed3ce382d1dbd6db52c7c6b93ffdae280a1c06f # check-paths/v0.1.0 with: files_yaml: | test: @@ -145,7 +145,7 @@ jobs: unit-tests: needs: check-library-paths if: needs.check-library-paths.outputs.run_library == 'true' && github.event.pull_request.draft != true - uses: ./.github/workflows/_reusable-test-suite.yaml + uses: $/.github/workflows/_reusable-test-suite.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -159,7 +159,7 @@ jobs: integration-tests: needs: check-library-paths if: needs.check-library-paths.outputs.run_library == 'true' && github.event.pull_request.draft != true - uses: ./.github/workflows/_reusable-test-suite.yaml + uses: $/.github/workflows/_reusable-test-suite.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -222,7 +222,7 @@ jobs: - name: Check paths id: check-paths - uses: open-edge-platform/geti-ci/actions/check-paths@7e686c1248b3939f8ee8e04e2612da727e379d91 + uses: open-edge-platform/geti-ci/actions/check-paths@2ed3ce382d1dbd6db52c7c6b93ffdae280a1c06f # check-paths/v0.1.0 with: files_yaml: | test: @@ -234,7 +234,7 @@ jobs: name: Build and upload docker image needs: check-paths if: needs.check-paths.outputs.run_build == 'true' && github.event.pull_request.draft != true - uses: ./.github/workflows/_reusable-docker-build.yaml + uses: $/.github/workflows/_reusable-docker-build.yaml permissions: contents: read # write permissions are required to update PR comments with image sizes diff --git a/.github/workflows/promote-rc-app-release.yml b/.github/workflows/promote-rc-app-release.yml index f862fe0b09..2ba5bc04f3 100644 --- a/.github/workflows/promote-rc-app-release.yml +++ b/.github/workflows/promote-rc-app-release.yml @@ -259,7 +259,7 @@ jobs: docker push "${TARGET_IMAGE}" - name: Sign Docker image - uses: open-edge-platform/geti-ci/actions/sign-image@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/sign-image@3690cbcc173cf90e0e0999b4822c3f8ebab9c137 # sign-image/v0.1.2 with: image-uri: ghcr.io/open-edge-platform/anomalib-studio-${{ matrix.device }}:${{ needs.validate.outputs.docker_patch_tag }} diff --git a/.github/workflows/publish-rc-app.yml b/.github/workflows/publish-rc-app.yml index 388cd44801..e2fd59c917 100644 --- a/.github/workflows/publish-rc-app.yml +++ b/.github/workflows/publish-rc-app.yml @@ -188,7 +188,7 @@ jobs: type=raw,value=${{ needs.validate.outputs.rc_version }} - name: Build and push Docker image - uses: ./.github/actions/docker-build + uses: open-edge-platform/anomalib/.github/actions/docker-build@ec87c2162f08572b47eb1fea55ed819fd1a39b08 with: device: ${{ matrix.device }} push: "true" @@ -197,7 +197,7 @@ jobs: use-cache: "false" # Disable cache for RC builds (security and reproducibility) - name: Sign Docker image - uses: open-edge-platform/geti-ci/actions/sign-image@7d25e47329bbfcde4ee51ab3581aea8613e245e2 + uses: open-edge-platform/geti-ci/actions/sign-image@3690cbcc173cf90e0e0999b4822c3f8ebab9c137 # sign-image/v0.1.2 with: image-uri: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release-lib.yaml b/.github/workflows/release-lib.yaml index 9b75fc5d35..b6598ff2ab 100644 --- a/.github/workflows/release-lib.yaml +++ b/.github/workflows/release-lib.yaml @@ -97,7 +97,7 @@ jobs: quality: needs: [version-check] - uses: ./.github/workflows/_reusable-code-quality.yaml + uses: $/.github/workflows/_reusable-code-quality.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -105,7 +105,7 @@ jobs: unit-tests: needs: [version-check] - uses: ./.github/workflows/_reusable-test-suite.yaml + uses: $/.github/workflows/_reusable-test-suite.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -118,7 +118,7 @@ jobs: integration-tests: needs: [version-check] - uses: ./.github/workflows/_reusable-test-suite.yaml + uses: $/.github/workflows/_reusable-test-suite.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: @@ -131,7 +131,7 @@ jobs: security: needs: [version-check] - uses: ./.github/workflows/_reusable-security-scan.yaml + uses: $/.github/workflows/_reusable-security-scan.yaml permissions: security-events: write # Required to upload SARIF scan results to the Security tab packages: read @@ -147,7 +147,7 @@ jobs: if: | !inputs.dry_run && !failure() && !cancelled() - uses: ./.github/workflows/_reusable-artifact-builder.yaml + uses: $/.github/workflows/_reusable-artifact-builder.yaml permissions: contents: read # Required by the called workflow to checkout the repository with: diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index ade0268720..16bccbc3dd 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -76,6 +76,19 @@ jobs: with: app-id: ${{ secrets.RENOVATE_APP_ID }} private-key: ${{ secrets.RENOVATE_APP_PEM }} + # Repository permissions + permission-administration: read + permission-checks: write + permission-statuses: write + permission-contents: write + permission-vulnerability-alerts: read + permission-issues: write + permission-metadata: read + permission-pull-requests: write + permission-workflows: write + # Organization permissions + permission-organization-administration: read + permission-members: read - name: Self-hosted Renovate uses: renovatebot/github-action@9fea9f0fbf80401026d11d03911d62b1f70fef1f # v46.3.3 diff --git a/.github/workflows/security-checks.yaml b/.github/workflows/security-checks.yaml index 22b23d3607..eab77afbb1 100644 --- a/.github/workflows/security-checks.yaml +++ b/.github/workflows/security-checks.yaml @@ -99,7 +99,7 @@ permissions: {} # No permissions by default on workflow level jobs: security: - uses: ./.github/workflows/_reusable-security-scan.yaml + uses: $/.github/workflows/_reusable-security-scan.yaml permissions: contents: read packages: read # needed to pull images for scanning diff --git a/.github/workflows/tauri-build.yaml b/.github/workflows/tauri-build.yaml index 721f7a709d..47bf4727ab 100644 --- a/.github/workflows/tauri-build.yaml +++ b/.github/workflows/tauri-build.yaml @@ -68,7 +68,7 @@ jobs: - name: Check paths id: check_paths - uses: open-edge-platform/geti-ci/actions/check-paths@7e686c1248b3939f8ee8e04e2612da727e379d91 + uses: open-edge-platform/geti-ci/actions/check-paths@2ed3ce382d1dbd6db52c7c6b93ffdae280a1c06f # check-paths/v0.1.0 with: files_yaml: | test: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 66e3ead1af..c9d9636d87 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,7 +72,8 @@ repos: # packages in a different order than the rest of the codebase. args: ["--ignore=D100,D407,I001,E402,B018"] - - repo: https://github.com/pre-commit/mirrors-prettier + # TODO: Replace this archived mirror when a maintained Prettier hook is available. + - repo: https://github.com/pre-commit/mirrors-prettier # zizmor: ignore[archived-uses] rev: v4.0.0-alpha.8 hooks: - id: prettier @@ -91,7 +92,7 @@ repos: # zizmor detects security issues in GitHub Actions workflows. - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.9.0 + rev: v1.30.1 hooks: - id: zizmor args: ["--min-severity", "medium", "--min-confidence", "high"]