|
62 | 62 | p/javascript |
63 | 63 | p/typescript |
64 | 64 | p/security-audit |
65 | | -
|
66 | | - # ============================================================================ |
67 | | - # Trivy Container Scanning |
68 | | - # ============================================================================ |
69 | | - trivy: |
70 | | - name: Trivy Container Scan |
71 | | - runs-on: ubuntu-latest |
72 | | - |
73 | | - steps: |
74 | | - - name: Checkout code |
75 | | - uses: actions/checkout@v6 |
76 | | - |
77 | | - - name: Set up Docker Buildx |
78 | | - uses: docker/setup-buildx-action@v3 |
79 | | - |
80 | | - - name: Build image for scanning |
81 | | - uses: docker/build-push-action@v6 |
82 | | - with: |
83 | | - context: . |
84 | | - file: Dockerfile.backend |
85 | | - platforms: linux/amd64 |
86 | | - push: false |
87 | | - load: true |
88 | | - tags: arbitrium-backend:scan |
89 | | - cache-from: type=gha,scope=backend |
90 | | - cache-to: type=gha,mode=max,scope=backend |
91 | | - |
92 | | - - name: Run Trivy vulnerability scanner |
93 | | - uses: aquasecurity/[email protected] |
94 | | - with: |
95 | | - image-ref: 'arbitrium-backend:scan' |
96 | | - format: 'table' |
97 | | - severity: 'CRITICAL,HIGH,MEDIUM' |
98 | | - |
99 | | - - name: Run Trivy (JSON output) |
100 | | - uses: aquasecurity/[email protected] |
101 | | - with: |
102 | | - image-ref: 'arbitrium-backend:scan' |
103 | | - format: 'json' |
104 | | - output: 'trivy-results.json' |
105 | | - severity: 'CRITICAL,HIGH,MEDIUM' |
106 | | - |
107 | | - - name: Upload Trivy results |
108 | | - uses: actions/upload-artifact@v6 |
109 | | - with: |
110 | | - name: trivy-results |
111 | | - path: trivy-results.json |
0 commit comments