diff --git a/.github/workflows/00_add_patch_label.yml b/.github/workflows/00_add_patch_label.yml index 41e5a825..2d2bbf05 100644 --- a/.github/workflows/00_add_patch_label.yml +++ b/.github/workflows/00_add_patch_label.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Check user labels id: check_user_labels - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -48,7 +48,7 @@ jobs: - name: Add comment if: ${{ steps.check_user_labels.outputs.result == 'true' }} - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/01_anchore.yml b/.github/workflows/01_anchore.yml index 12082f35..d81a8757 100644 --- a/.github/workflows/01_anchore.yml +++ b/.github/workflows/01_anchore.yml @@ -37,20 +37,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 }} --force-rm --tag localbuild/testimage:latest --build-arg APP_NAME=pagopafdr --build-arg QUARKUS_PROFILE=prod - 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: false severity-cutoff: "high" - name: Upload Anchore Scan Report - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@422b177bb3935638109d3175d95e4dbf97066060 # v2 if: always() with: sarif_file: results.sarif diff --git a/.github/workflows/01_assignee.yml b/.github/workflows/01_assignee.yml index 06119178..cf22668f 100644 --- a/.github/workflows/01_assignee.yml +++ b/.github/workflows/01_assignee.yml @@ -21,6 +21,6 @@ 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' diff --git a/.github/workflows/02_check_pr.yml b/.github/workflows/02_check_pr.yml index 5608117c..9491dff1 100644 --- a/.github/workflows/02_check_pr.yml +++ b/.github/workflows/02_check_pr.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Verify PR Labels if: ${{ !contains(github.event.pull_request.labels.*.name, 'patch') && !contains(github.event.pull_request.labels.*.name, 'ignore-for-release') }} - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Formatting id: format continue-on-error: true @@ -65,7 +65,7 @@ jobs: with: args: "--set-exit-if-changed" - - uses: actions/github-script@v6.3.3 + - uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 if: steps.format.outcome != 'success' with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/04_release_and_deploy.yml b/.github/workflows/04_release_and_deploy.yml index f9432be9..ad863646 100644 --- a/.github/workflows/04_release_and_deploy.yml +++ b/.github/workflows/04_release_and_deploy.yml @@ -78,7 +78,7 @@ jobs: steps: - name: Make Release id: release - uses: pagopa/github-actions-template/maven-release@v1.5.4 + uses: pagopa/github-actions-template/maven-release@d91a1fd0b913c9830589be5d86cdb71c90813fae # v1.5.4 with: semver: ${{ needs.setup.outputs.semver }} github_token: ${{ secrets.BOT_TOKEN_GITHUB }} @@ -93,7 +93,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: branch: ${{ github.ref_name}} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -120,7 +120,7 @@ jobs: steps: - name: Report Status if: always() - 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/05_update_code.yml b/.github/workflows/05_update_code.yml index a9730a35..e37be111 100644 --- a/.github/workflows/05_update_code.yml +++ b/.github/workflows/05_update_code.yml @@ -17,7 +17,7 @@ jobs: if: ${{ contains(github.event.comment.body, 'update_code') }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: token: ${{ secrets.API_TOKEN_GITHUB }} @@ -26,7 +26,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde # v1 with: java-version: 11 @@ -43,7 +43,7 @@ jobs: if: ${{ always() && contains(needs.*.result, 'failure') }} steps: - name: Notify if Failure - uses: actions/github-script@v6.3.3 + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/06_integration_test.yml b/.github/workflows/06_integration_test.yml index afe84d4a..3ac6063f 100644 --- a/.github/workflows/06_integration_test.yml +++ b/.github/workflows/06_integration_test.yml @@ -70,7 +70,7 @@ jobs: subscription-id: ${{ secrets.SUBSCRIPTION_ID }} - name: Download old reports - uses: azure/CLI@v1 + uses: azure/CLI@4db43908b9df2e7ac93c8275a8f9a448c59338dd # v1 env: STORAGE_NAME: ${{ vars.INTEGRATION_TEST_STORAGE_ACCOUNT_NAME }} STORAGE_FOLDER: ${{ vars.INTEGRATION_TEST_REPORTS_FOLDER }} @@ -97,7 +97,7 @@ jobs: -v ./reports:/app/reports fdr3_test - name: Upload reports - uses: azure/CLI@v1 + uses: azure/CLI@4db43908b9df2e7ac93c8275a8f9a448c59338dd # v1 env: STORAGE_NAME: ${{ vars.INTEGRATION_TEST_STORAGE_ACCOUNT_NAME }} STORAGE_FOLDER: ${{ vars.INTEGRATION_TEST_REPORTS_FOLDER }} @@ -113,7 +113,7 @@ jobs: - name: Upload junit if: ${{ inputs.junit == true }} - uses: azure/CLI@v1 + uses: azure/CLI@4db43908b9df2e7ac93c8275a8f9a448c59338dd # v1 env: STORAGE_NAME: ${{ vars.INTEGRATION_TEST_STORAGE_ACCOUNT_NAME }} STORAGE_FOLDER: ${{ vars.INTEGRATION_TEST_REPORTS_FOLDER }} @@ -135,7 +135,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 }} diff --git a/.github/workflows/08_create_dashboard.yml b/.github/workflows/08_create_dashboard.yml index 4bdf7b7f..4b819201 100644 --- a/.github/workflows/08_create_dashboard.yml +++ b/.github/workflows/08_create_dashboard.yml @@ -39,7 +39,7 @@ jobs: # from https://github.com/pagopa/opex-dashboard-azure-action/ # Internal APIs - - 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: @@ -52,7 +52,7 @@ jobs: # from https://github.com/pagopa/opex-dashboard-azure-action/ # Organizations APIs - - 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: @@ -65,7 +65,7 @@ jobs: # from https://github.com/pagopa/opex-dashboard-azure-action/ # PSPs APIs - - 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: diff --git a/Dockerfile b/Dockerfile index c605928a..ce5d66d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ## Stage 1 : build with maven builder image with native capabilities -FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17 AS build +FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17@sha256:9f9d834c698454d674a8f6bd34886895c2ffb6d70c4f8d381bca60f8348d8250 AS build COPY --chown=quarkus:quarkus mvnw /code/mvnw COPY --chown=quarkus:quarkus .mvn /code/.mvn COPY --chown=quarkus:quarkus pom.xml /code/ @@ -12,7 +12,7 @@ ARG APP_NAME RUN ./mvnw package -DskipTests=true -Dquarkus.application.name=$APP_NAME -Dquarkus.profile=$QUARKUS_PROFILE -FROM registry.access.redhat.com/ubi8/openjdk-17:1.14 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.14@sha256:79585ca02551ecff9d368905d7ce387232b9fd328256e7a715ae3c4ec7b086d3 ENV LANGUAGE='en_US:en' diff --git a/docker-infra/docker-compose.yml b/docker-infra/docker-compose.yml index a58b206d..a9f511ba 100644 --- a/docker-infra/docker-compose.yml +++ b/docker-infra/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2 + image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2@sha256:1c53c89d04f207beb99d56cc4a1cc23516bd9c386858843d5082a98257c04d1c ports: - "9200:9200" - "9300:9300" @@ -15,7 +15,7 @@ services: - infra kibana: - image: docker.elastic.co/kibana/kibana:8.6.2 + image: docker.elastic.co/kibana/kibana:8.6.2@sha256:7157c399f97acddf3297501d5af66097d57be67d27d62f810bcbdd11785a39b8 ports: - "5601:5601" networks: @@ -25,7 +25,7 @@ services: alertmanager: hostname: alertmanager - image: prom/alertmanager + image: prom/alertmanager@sha256:e13b6ed5cb929eeaee733479dce55e10eb3bc2e9c4586c705a4e8da41e5eacf5 volumes: - ${PWD}/alertmanager/alertmanager.conf:/etc/alertmanager/alertmanager.conf command: @@ -37,7 +37,7 @@ services: prometheus: hostname: prometheus - image: prom/prometheus + image: prom/prometheus@sha256:f6639335d34a77d9d9db382b92eeb7fc00934be8eae81dbc03b31cfe90411a94 volumes: - ${PWD}/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - ${PWD}/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml @@ -53,7 +53,7 @@ services: grafana: hostname: grafana - image: grafana/grafana + image: grafana/grafana@sha256:408afb9726de5122b00a2576763a8a57a3c86d5b0eff5305bc994ceb3eb96c3f volumes: - ${PWD}/grafana/grafana_datasources.yml:/etc/grafana/provisioning/datasources/all.yaml - ${PWD}/grafana/grafana_config.ini:/etc/grafana/config.ini @@ -64,7 +64,7 @@ services: - infra jaeger-all-in-one: - image: jaegertracing/all-in-one:latest + image: jaegertracing/all-in-one:latest@sha256:85f1eb56e8ac24e53c031c6bcf7cdf6bff1dc4885b69e54605b932022054b612 ports: - "16686:16686" - "14268:14268" @@ -73,7 +73,7 @@ services: - infra otel-collector: - image: otel/opentelemetry-collector:latest + image: otel/opentelemetry-collector:latest@sha256:ba28c8595b9a57401acd4a1ed39203c3babc6738cc17407478bd5c3c6c524663 command: [ "--config=/etc/otel-collector-config.yaml" ] volumes: - ${PWD}/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml:Z @@ -86,7 +86,7 @@ services: - infra mongo: - image: mongo + image: mongo@sha256:a3d0dec40b95df592c7e7eef603019ba03b164998c3b394739e0dd4cd45d490d restart: always environment: MONGO_INITDB_ROOT_USERNAME: root @@ -97,7 +97,7 @@ services: - infra mongo-express: - image: mongo-express + image: mongo-express@sha256:1b23d7976f0210dbec74045c209e52fbb26d29b2e873d6c6fa3d3f0ae32c2a64 restart: always ports: - 8085:8081 @@ -109,7 +109,7 @@ services: - infra azurite: - image: "mcr.microsoft.com/azure-storage/azurite" + image: "mcr.microsoft.com/azure-storage/azurite@sha256:47a392f1c93a6b639999fc505dcae348e350183b47f2a7526c765ddd7fa56e0e" restart: always ports: - 10000:10000 diff --git a/integration-test/Dockerfile b/integration-test/Dockerfile index 98355b76..8e118e87 100644 --- a/integration-test/Dockerfile +++ b/integration-test/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 as build +FROM python:3.11@sha256:157a371e60389919fe4a72dff71ce86eaa5234f59114c23b0b346d0d02c74d39 as build #-slim as build ARG SHELL="/bin/sh" diff --git a/performance-test/docker-compose.yaml b/performance-test/docker-compose.yaml index 93b20be1..e899c9f8 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:9e37f3209c16af8c17a79cf3a5f7d4402673726de4c7e25572d189acf06405c5 container_name: k6 volumes: - '${PWD}/src:/scripts' @@ -15,7 +15,7 @@ services: - nginx nginx: - image: nginx + image: nginx@sha256:04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323666f28dfd5a9710e3 container_name: nginx volumes: - '${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf' diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index 82671b9f..545b002b 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-17:1.14 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.14@sha256:79585ca02551ecff9d368905d7ce387232b9fd328256e7a715ae3c4ec7b086d3 ENV LANGUAGE='en_US:en' diff --git a/src/main/docker/Dockerfile.legacy-jar b/src/main/docker/Dockerfile.legacy-jar index f8014616..a0314bee 100644 --- a/src/main/docker/Dockerfile.legacy-jar +++ b/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-17:1.14 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.14@sha256:79585ca02551ecff9d368905d7ce387232b9fd328256e7a715ae3c4ec7b086d3 ENV LANGUAGE='en_US:en' diff --git a/src/main/docker/Dockerfile.multistage b/src/main/docker/Dockerfile.multistage index 58d47da7..c8772406 100644 --- a/src/main/docker/Dockerfile.multistage +++ b/src/main/docker/Dockerfile.multistage @@ -1,5 +1,5 @@ ## Stage 1 : build with maven builder image with native capabilities -FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17 AS build +FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17@sha256:9f9d834c698454d674a8f6bd34886895c2ffb6d70c4f8d381bca60f8348d8250 AS build COPY --chown=quarkus:quarkus mvnw /code/mvnw COPY --chown=quarkus:quarkus .mvn /code/.mvn COPY --chown=quarkus:quarkus pom.xml /code/ @@ -14,7 +14,7 @@ ARG APP_NAME RUN ./mvnw package -DskipTests=true -Pnative -Dquarkus.application.name=$APP_NAME -Dquarkus.profile=$QUARKUS_PROFILE ## Stage 2 : create the docker final image -FROM quay.io/quarkus/quarkus-micro-image:2.0 +FROM quay.io/quarkus/quarkus-micro-image:2.0@sha256:26b659f38cdb48fb99ee5c9255ca477be45f963827c8aa6d9b3f29c5f8d42b3d WORKDIR /work/ COPY --from=build /code/target/*-runner /work/application diff --git a/src/main/docker/Dockerfile.multistage.jvm b/src/main/docker/Dockerfile.multistage.jvm index c627c29f..1332a001 100644 --- a/src/main/docker/Dockerfile.multistage.jvm +++ b/src/main/docker/Dockerfile.multistage.jvm @@ -1,5 +1,5 @@ ## Stage 1 : build with maven builder image with native capabilities -FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17 AS build +FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17@sha256:9f9d834c698454d674a8f6bd34886895c2ffb6d70c4f8d381bca60f8348d8250 AS build COPY --chown=quarkus:quarkus mvnw /code/mvnw COPY --chown=quarkus:quarkus .mvn /code/.mvn COPY --chown=quarkus:quarkus pom.xml /code/ @@ -12,7 +12,7 @@ ARG APP_NAME RUN ./mvnw package -DskipTests=true -Dquarkus.application.name=$APP_NAME -Dquarkus.profile=$QUARKUS_PROFILE -FROM registry.access.redhat.com/ubi8/openjdk-17:1.14 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.14@sha256:79585ca02551ecff9d368905d7ce387232b9fd328256e7a715ae3c4ec7b086d3 ENV LANGUAGE='en_US:en' diff --git a/src/main/docker/Dockerfile.native b/src/main/docker/Dockerfile.native index 4e076cf1..cbd54f5a 100644 --- a/src/main/docker/Dockerfile.native +++ b/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6@sha256:33931dce809712888d1a8061bfa676963f517daca993984afed3251bc1fb5987 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ diff --git a/src/main/docker/Dockerfile.native-micro b/src/main/docker/Dockerfile.native-micro index 40afb1a2..02cd4793 100644 --- a/src/main/docker/Dockerfile.native-micro +++ b/src/main/docker/Dockerfile.native-micro @@ -17,7 +17,7 @@ # docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus # ### -FROM quay.io/quarkus/quarkus-micro-image:2.0 +FROM quay.io/quarkus/quarkus-micro-image:2.0@sha256:26b659f38cdb48fb99ee5c9255ca477be45f963827c8aa6d9b3f29c5f8d42b3d WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \