Skip to content

Renovate update admin minor and patch updates (PHP 8.2) #3832

Renovate update admin minor and patch updates (PHP 8.2)

Renovate update admin minor and patch updates (PHP 8.2) #3832

name: trivy-scan
on:
push:
branches:
- main
pull_request:
paths:
- "service-api/**"
- "service-admin/**"
- "service-front/**"
- "service-pdf/**"
- "shared/**"
- "tests/**"
- "cypress/**"
jobs:
filter-and-scan:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
scan:
- name: service-api
path: "./service-api"
- name: service-admin
path: "./service-admin"
- name: service-front
path: "./service-front"
- name: service-pdf
path: "./service-pdf"
- name: shared
path: "./shared"
- name: tests
path: "./tests"
- name: cypress
path: "./cypress"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Filter paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
check: '${{ matrix.scan.path }}/**'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
aws-region: eu-west-1
role-to-assume: arn:aws:iam::311462405659:role/opg-lpa-ci
role-duration-seconds: 900
role-session-name: OPGLPABuildPipeline
- name: ecr login
id: login_ecr
uses: aws-actions/amazon-ecr-login@82e0fc39d1cb50e0db083a0a18ae1b775ef44892 # [email protected]
with:
registries: 311462405659
- name: Run Trivy vulnerability scanner for Code
if: steps.filter.outputs.check == 'true'
uses: aquasecurity/trivy-action@d2a392a13760cb64cb6bbd31d4bed2a7d9a5298d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIVY_DB_REPOSITORY: ${{ steps.login_ecr.outputs.registry }}/trivy-db-public-ecr/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: ${{ steps.login_ecr.outputs.registry }}/trivy-db-public-ecr/aquasecurity/trivy-java-db:1
with:
scan-type: "fs"
ignore-unfixed: true
hide-progress: false
format: "sarif"
severity: 'HIGH,CRITICAL'
output: "${{ matrix.scan.name }}/trivy-results-code.sarif"
scan-ref: ${{ matrix.scan.path }}
- name: Upload Trivy scan results to GitHub Security tab
if: steps.filter.outputs.check == 'true'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "./${{ matrix.scan.name }}"