From 51a73751bb1fb98d84b135dbe57078900935a95f Mon Sep 17 00:00:00 2001 From: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:12:54 +0530 Subject: [PATCH 1/3] Update push-trigger.yml Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 36 +++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index f70609fe..07f27cb0 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -34,6 +34,7 @@ jobs: ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + sonar-analysis-inji-web: if: "${{ github.event_name != 'pull_request' }}" needs: build-dockers-inji-web @@ -45,4 +46,37 @@ jobs: secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} ORG_KEY: ${{ secrets.ORG_KEY }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + trivy_scan: + needs: build-dockers-inji-web + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.ACTOR_DOCKER_HUB }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + - name: Scan Docker image with Trivy + uses: aquasecurity/trivy-action@master + with: + image-ref: ${{ matrix.SERVICE_NAME }} + format: 'table' + exit-code: '1' + ignore-unfixed: true + vuln-type: 'os,library' + severity: 'HIGH,CRITICAL' + + - name: Notify Slack + if: failure() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_MESSAGE: "Trivy scan failed for ${{ matrix.SERVICE_NAME }}" From 9c65eb73581dfcd59f1bf3a6fab934ce100bb9e1 Mon Sep 17 00:00:00 2001 From: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:23:40 +0530 Subject: [PATCH 2/3] Update push-trigger.yml Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 37 ++++-------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 07f27cb0..0cbfedcc 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -48,35 +48,8 @@ jobs: ORG_KEY: ${{ secrets.ORG_KEY }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - trivy_scan: - needs: build-dockers-inji-web - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.ACTOR_DOCKER_HUB }} - password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - - name: Scan Docker image with Trivy - uses: aquasecurity/trivy-action@master - with: - image-ref: ${{ matrix.SERVICE_NAME }} - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'HIGH,CRITICAL' - - - name: Notify Slack - if: failure() - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_MESSAGE: "Trivy scan failed for ${{ matrix.SERVICE_NAME }}" + call-trivy-scan: + uses: rajapandi1234/kattu/.github/workflows/trivy.yml@master + with: + service_name: 'inji-web' + version: 'latest' From 0b79c3cb4cd98e42fa33b3ff40c1c4ca2751922e Mon Sep 17 00:00:00 2001 From: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:48:29 +0530 Subject: [PATCH 3/3] Update push-trigger.yml Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 0cbfedcc..c77c0b87 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -49,7 +49,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} call-trivy-scan: - uses: rajapandi1234/kattu/.github/workflows/trivy.yml@master + uses: mosip/kattu/.github/workflows/trivy.yml@develop with: service_name: 'inji-web' version: 'latest'