docs: update changelog #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Security | |
| on: | |
| push: | |
| jobs: | |
| gitleaks: | |
| name: gitleaks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} | |
| trivy: | |
| name: trivy | |
| runs-on: | |
| labels: ubuntu-latest-m | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Build images | |
| run: make docker-build | |
| - name: Run Trivy vulnerability scanner on API | |
| uses: aquasecurity/trivy-action@0.35.0 | |
| with: | |
| image-ref: 'caseai-connect/api:local' | |
| format: 'table' | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| pkg-types: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| trivyignores: '.trivyignore.yaml' | |
| output: 'trivy-api-results.txt' | |
| - name: Run Trivy vulnerability scanner on Workers | |
| uses: aquasecurity/trivy-action@0.35.0 | |
| with: | |
| image-ref: 'caseai-connect/workers:local' | |
| format: 'table' | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| pkg-types: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| trivyignores: '.trivyignore.yaml' | |
| output: 'trivy-workers-results.txt' | |
| - name: Trivy scan summary | |
| run: | | |
| MAX_SIZE=400000 | |
| { | |
| echo "## Trivy Vulnerability Scan Results" | |
| echo "### API Image" | |
| echo '```' | |
| head -c $MAX_SIZE trivy-api-results.txt | |
| if [ "$(wc -c < trivy-api-results.txt)" -gt "$MAX_SIZE" ]; then | |
| echo "" | |
| echo "... output truncated (see workflow artifacts for full results)" | |
| fi | |
| echo '```' | |
| echo "### Workers Image" | |
| echo '```' | |
| head -c $MAX_SIZE trivy-workers-results.txt | |
| if [ "$(wc -c < trivy-workers-results.txt)" -gt "$MAX_SIZE" ]; then | |
| echo "" | |
| echo "... output truncated (see workflow artifacts for full results)" | |
| fi | |
| echo '```' | |
| } >> $GITHUB_STEP_SUMMARY | |
| - name: Upload full results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: trivy-results | |
| path: | | |
| trivy-api-results.txt | |
| trivy-workers-results.txt |