diff --git a/.github/workflows/anchore.yml b/.github/workflows/anchore.yml index 802f626..86bee0b 100644 --- a/.github/workflows/anchore.yml +++ b/.github/workflows/anchore.yml @@ -35,20 +35,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Build the Docker image run: docker build . --file ${{ env.DOCKERFILE }} --tag localbuild/testimage:latest - name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled - uses: anchore/scan-action@v3 + uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3 with: image: "localbuild/testimage:latest" acs-report-enable: true fail-build: true severity-cutoff: "high" - name: Upload Anchore Scan Report - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@673cceb2b4886e2dfff697ab64a1ecd1c0a14a05 # v2 if: always() with: sarif_file: results.sarif diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 4ea9fe4..bb23884 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Assign Me # You may pin to the exact commit or the version. - uses: kentaro-m/auto-assign-action@v1.2.1 + uses: kentaro-m/auto-assign-action@746a3a558fdd0e061f612ec9f8ff1b8a19c1a115 # v1.2.1 with: configuration-path: '.github/auto_assign.yml' @@ -37,7 +37,7 @@ jobs: steps: - name: Verify PR Labels if: ${{ !contains(github.event.pull_request.labels.*.name, 'major') && !contains(github.event.pull_request.labels.*.name, 'minor') && !contains(github.event.pull_request.labels.*.name, 'patch') && !contains(github.event.pull_request.labels.*.name, 'patch') && !contains(github.event.pull_request.labels.*.name, 'skip') }} - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -68,12 +68,12 @@ jobs: runs-on: ubuntu-latest name: Check Size steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 - name: Check Size - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 env: IGNORED_FILES: openapi.json, api-docs.json BRANCH_NAME: ${{ github.head_ref}} diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml index 4778bf5..8e64a5b 100644 --- a/.github/workflows/code_review.yml +++ b/.github/workflows/code_review.yml @@ -35,7 +35,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Code Review - uses: pagopa/github-actions-template/maven-code-review@v1.10.6 + uses: pagopa/github-actions-template/maven-code-review@186af0dfc5ee51e6150046051d4e0b6444e15aed # v1.10.6 with: github_token: ${{ secrets.GITHUB_TOKEN }} sonar_token: ${{ secrets.SONAR_TOKEN }} @@ -90,7 +90,7 @@ jobs: if: ${{ always() }} steps: - name: Delete Previous deployments - uses: actions/github-script@v6 + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 env: SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}} with: diff --git a/.github/workflows/create_dashboard.yaml b/.github/workflows/create_dashboard.yaml index 61fa251..9e9b4c2 100644 --- a/.github/workflows/create_dashboard.yaml +++ b/.github/workflows/create_dashboard.yaml @@ -38,7 +38,7 @@ jobs: persist-credentials: false # from https://github.com/pagopa/opex-dashboard-azure-action/ - - uses: pagopa/opex-dashboard-azure-action@v1.1.2 + - uses: pagopa/opex-dashboard-azure-action@ece3bc2b133be74cabb50aec14cdb9b8051b886f # v1.1.2 with: environment: ${{ matrix.environment }} api-name: @@ -55,7 +55,7 @@ jobs: if: ${{ always() }} steps: - name: Delete Previous deployments - uses: actions/github-script@v6 + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 env: SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}} with: diff --git a/.github/workflows/gh-workflow-immortality.yml b/.github/workflows/gh-workflow-immortality.yml index 3802db5..08161f5 100644 --- a/.github/workflows/gh-workflow-immortality.yml +++ b/.github/workflows/gh-workflow-immortality.yml @@ -15,6 +15,6 @@ jobs: steps: - name: Keep cronjob based triggers of GitHub workflows alive - uses: PhrozenByte/gh-workflow-immortality@v1 + uses: PhrozenByte/gh-workflow-immortality@ed0af7d9884eb4cc5672940ae490a0111141fbac # v1 with: secret: ${{ secrets.GH_WORKFLOW_IMMORTALITY }} diff --git a/.github/workflows/gpd_get_fdr.yaml b/.github/workflows/gpd_get_fdr.yaml index 579ab9c..54f1395 100644 --- a/.github/workflows/gpd_get_fdr.yaml +++ b/.github/workflows/gpd_get_fdr.yaml @@ -33,10 +33,10 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 with: python-version: '3.12' diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index c405e3e..002e641 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -70,7 +70,7 @@ jobs: steps: - name: Report Status if: ${{ inputs.notify }} - uses: ravsamhq/notify-slack-action@v2 + uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2 with: status: ${{ needs.integration_test.result }} token: ${{ secrets.GITHUB_TOKEN }} @@ -87,7 +87,7 @@ jobs: if: ${{ always() }} steps: - name: Delete Previous deployments - uses: actions/github-script@v6 + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 env: SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}} with: diff --git a/.github/workflows/release_deploy.yml b/.github/workflows/release_deploy.yml index 73332b7..1232ba9 100644 --- a/.github/workflows/release_deploy.yml +++ b/.github/workflows/release_deploy.yml @@ -110,7 +110,7 @@ jobs: steps: - name: Make Release id: release - uses: pagopa/github-actions-template/maven-release@v1.12.0 + uses: pagopa/github-actions-template/maven-release@38203c7599bcac41a743237ccb17c733ff9c2eee # v1.12.0 with: semver: ${{ needs.setup.outputs.semver }} github_token: ${{ secrets.BOT_TOKEN_GITHUB }} @@ -126,7 +126,7 @@ jobs: steps: - name: Build and Push id: semver - uses: pagopa/github-actions-template/ghcr-build-push@v1.5.4 + uses: pagopa/github-actions-template/ghcr-build-push@d91a1fd0b913c9830589be5d86cdb71c90813fae # v1.5.4 with: github_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ needs.release.outputs.version }} @@ -148,7 +148,7 @@ jobs: steps: - name: Report Status if: ${{ needs.setup.outputs.environment == 'prod' }} - uses: ravsamhq/notify-slack-action@v2 + uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2 with: status: ${{ needs.deploy_aks.result }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scheduled-maintenance-backoffice-pagopa-with-PA-to-betterstack.yml b/.github/workflows/scheduled-maintenance-backoffice-pagopa-with-PA-to-betterstack.yml index 0d3e268..8a24bb0 100644 --- a/.github/workflows/scheduled-maintenance-backoffice-pagopa-with-PA-to-betterstack.yml +++ b/.github/workflows/scheduled-maintenance-backoffice-pagopa-with-PA-to-betterstack.yml @@ -13,11 +13,11 @@ jobs: steps: # Checkout del repository - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 # Imposta Python - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 with: python-version: '3.x' diff --git a/.github/workflows/scheduled-maintenance_backoffice_pagopa_to_betterstack.yml b/.github/workflows/scheduled-maintenance_backoffice_pagopa_to_betterstack.yml index 45ccdfa..656f5c8 100644 --- a/.github/workflows/scheduled-maintenance_backoffice_pagopa_to_betterstack.yml +++ b/.github/workflows/scheduled-maintenance_backoffice_pagopa_to_betterstack.yml @@ -13,11 +13,11 @@ jobs: steps: # Checkout del repository - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 # Imposta Python - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 with: python-version: '3.x' diff --git a/.github/workflows/scheduled-opsgenie-incidents-to-statuspage.yml b/.github/workflows/scheduled-opsgenie-incidents-to-statuspage.yml index 2cd574e..221769d 100644 --- a/.github/workflows/scheduled-opsgenie-incidents-to-statuspage.yml +++ b/.github/workflows/scheduled-opsgenie-incidents-to-statuspage.yml @@ -14,11 +14,11 @@ jobs: steps: # Checkout del repository - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 # Imposta Python - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 with: python-version: '3.x' diff --git a/Dockerfile b/Dockerfile index 65e6a12..fe1cada 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ # # Build # -FROM maven:3.8.4-jdk-11-slim as buildtime +FROM maven:3.8.4-jdk-11-slim@sha256:04f8e5ba4a6a74fb7f97940bc75ac7340520728d2fb051ecc5c9ecbb9ba28b48 as buildtime WORKDIR /build COPY . . RUN mvn clean package -FROM adoptopenjdk/openjdk11:alpine-jre as builder +FROM adoptopenjdk/openjdk11:alpine-jre@sha256:3e81105664c1c9473c1a527a8d8f5da42f3791f80582b39f8db0072f8096b7ed as builder COPY --from=buildtime /build/target/*.jar application.jar RUN java -Djarmode=layertools -jar application.jar extract diff --git a/performance-test/docker-compose.yaml b/performance-test/docker-compose.yaml index e9205ff..ee60824 100644 --- a/performance-test/docker-compose.yaml +++ b/performance-test/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3.3' services: k6: - image: grafana/k6 + image: grafana/k6@sha256:c362e72377bb63a897346d549b5ecc17bddd5ad5d3458c0307e03873ab2807c7 container_name: k6 volumes: - '${PWD}/src:/scripts' @@ -15,7 +15,7 @@ services: - nginx nginx: - image: nginx + image: nginx@sha256:42e917aaa1b5bb40dd0f6f7f4f857490ac7747d7ef73b391c774a41a8b994f15 container_name: nginx volumes: - '${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf'