build(deps): Bump actions/upload-artifact from 4 to 5 #1199
Workflow file for this run
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 Analysis | |
| on: | |
| pull_request: | |
| types: | |
| - assigned | |
| - ready_for_review | |
| - synchronize | |
| - labeled | |
| - unlabeled | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 0 * * 5" | |
| permissions: | |
| contents: read | |
| jobs: | |
| metadata: | |
| name: Metadata | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| salt_type: ${{ steps.salt_type.outputs.salt_type }} | |
| salt_version: ${{ steps.salt_version.outputs.salt_version }} | |
| vcs_ref: ${{ steps.vcs_ref.outputs.vcs_ref }} | |
| created_on: ${{ steps.created_on.outputs.created_on }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v5 | |
| - name: Release Type | |
| id: salt_type | |
| env: | |
| LABELS: ${{ toJson(github.event.pull_request.labels) }} | |
| run: | | |
| source .github/workflows/ci_tools.sh | |
| export_release_type_from_labels salt_type "$LABELS" | |
| - name: Salt Version | |
| id: salt_version | |
| run: | | |
| source .github/workflows/ci_tools.sh | |
| export_salt_version salt_version "${{ steps.salt_type.outputs.salt_type }}" | |
| - name: VCS Ref | |
| id: vcs_ref | |
| run: | | |
| VCS_REF="${GITHUB_SHA::8}" | |
| echo "VCS ref: ${VCS_REF}" | |
| echo "vcs_ref=${VCS_REF}" >> $GITHUB_OUTPUT | |
| - name: Created On | |
| id: created_on | |
| run: | | |
| CREATED_ON="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" | |
| echo "Created on: ${CREATED_ON}" | |
| echo "created_on=${CREATED_ON}" >> $GITHUB_OUTPUT | |
| security-analysis: | |
| name: Trivy Scan | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| needs: metadata | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v5 | |
| - name: Set Up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set Up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build docker-salt-master Base Image | |
| uses: docker/build-push-action@v6.18.0 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| build-args: | | |
| VCS_REF=${{ needs.metadata.outputs.vcs_ref }} | |
| BUILD_DATE=${{ needs.metadata.outputs.created_on }} | |
| SALT_VERSION=${{ needs.metadata.outputs.salt_version }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| pull: true | |
| load: true | |
| tags: ghcr.io/${{ github.repository }}:${{ github.sha }} | |
| - name: Run Trivy Vulnerability Scanner | |
| uses: aquasecurity/trivy-action@0.33.1 | |
| with: | |
| image-ref: "ghcr.io/${{ github.repository }}:${{ github.sha }}" | |
| format: "template" | |
| template: "@/contrib/sarif.tpl" | |
| output: "trivy-results.sarif" | |
| severity: "CRITICAL,HIGH" | |
| - name: Upload Trivy Scan Results to GitHub Security Tab | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: "trivy-results.sarif" |