Bump actions/setup-python from 6.2.0 to 7.0.0 #82
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: mpak Scan | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source_ref: | |
| description: Git ref to scan | |
| required: true | |
| default: main | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| scan: | |
| runs-on: ubuntu-latest | |
| env: | |
| SOURCE_REF: ${{ inputs.source_ref || github.event.pull_request.head.sha || github.sha }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| path: tooling | |
| persist-credentials: false | |
| - name: Check out source ref | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| ref: ${{ env.SOURCE_REF }} | |
| path: source | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: source/package-lock.json | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 | |
| with: | |
| version: "0.11.5" | |
| enable-cache: false | |
| - name: Install scanner supply-chain tools | |
| run: | | |
| set -euo pipefail | |
| curl -fsSL \ | |
| https://github.com/anchore/syft/releases/download/v1.48.0/syft_1.48.0_linux_amd64.tar.gz \ | |
| -o /tmp/syft.tar.gz | |
| echo "6cef9a7f37220d9067eaf9cfaaa2fce986e9f320a8d42cbc36658c99af78ea04 /tmp/syft.tar.gz" \ | |
| | sha256sum -c - | |
| tar -xzf /tmp/syft.tar.gz -C /tmp syft | |
| sudo install -m 0755 /tmp/syft /usr/local/bin/syft | |
| curl -fsSL \ | |
| https://github.com/anchore/syft/releases/download/v1.29.1/syft_1.29.1_linux_amd64.tar.gz \ | |
| -o /tmp/syft-sbom.tar.gz | |
| echo "ca704907e5a7b697c6e683832ca128e2ae60de63d7d87f3e2e39672df9038fa4 /tmp/syft-sbom.tar.gz" \ | |
| | sha256sum -c - | |
| mkdir -p /tmp/syft-sbom | |
| tar -xzf /tmp/syft-sbom.tar.gz -C /tmp/syft-sbom syft | |
| sudo install -m 0755 /tmp/syft-sbom/syft /usr/local/bin/syft-sbom | |
| curl -fsSL \ | |
| https://github.com/anchore/grype/releases/download/v0.116.0/grype_0.116.0_linux_amd64.tar.gz \ | |
| -o /tmp/grype.tar.gz | |
| echo "40aff724297312f91ea390d003bed8d8651c74cc7f5b26732db80b3a408d2fc5 /tmp/grype.tar.gz" \ | |
| | sha256sum -c - | |
| tar -xzf /tmp/grype.tar.gz -C /tmp grype | |
| sudo install -m 0755 /tmp/grype /usr/local/bin/grype | |
| curl -fsSL \ | |
| https://github.com/trufflesecurity/trufflehog/releases/download/v3.95.9/trufflehog_3.95.9_linux_amd64.tar.gz \ | |
| -o /tmp/trufflehog.tar.gz | |
| echo "f6d1106b85107d79527ed7a5b98b592beadd8b770dc3c9e8c1ad99e1b2cf127e /tmp/trufflehog.tar.gz" \ | |
| | sha256sum -c - | |
| tar -xzf /tmp/trufflehog.tar.gz -C /tmp trufflehog | |
| sudo install -m 0755 /tmp/trufflehog /usr/local/bin/trufflehog | |
| npm ci \ | |
| --prefix tooling/packaging/scanner-tools \ | |
| --ignore-scripts \ | |
| --no-fund \ | |
| --no-audit | |
| echo "$GITHUB_WORKSPACE/tooling/packaging/scanner-tools/node_modules/.bin" \ | |
| >> "$GITHUB_PATH" | |
| echo "NODE_PATH=$GITHUB_WORKSPACE/tooling/packaging/scanner-tools/node_modules" \ | |
| >> "$GITHUB_ENV" | |
| mkdir -p "$RUNNER_TEMP/grype-db" | |
| echo "GRYPE_DB_CACHE_DIR=$RUNNER_TEMP/grype-db" >> "$GITHUB_ENV" | |
| - name: Install root dependencies | |
| working-directory: source | |
| run: npm ci --ignore-scripts | |
| - name: Audit root dependencies | |
| working-directory: source | |
| run: npm audit --audit-level=moderate | |
| - name: Run root test suite | |
| working-directory: source | |
| run: npm test | |
| - name: Prepare isolated mpak package | |
| working-directory: tooling | |
| env: | |
| MPAK_SOURCE_DIR: ../source | |
| run: node scripts/prepare-mpak-package.mjs | |
| - name: Generate bundled SBOM | |
| working-directory: tooling | |
| env: | |
| SYFT_BIN: syft-sbom | |
| run: node scripts/generate-mpak-sbom.mjs | |
| - name: Build universal mpak bundle | |
| id: build_bundle | |
| uses: NimbleBrainInc/mcpb-pack@e74c82722fa4b954ce7740f875d6c437ae471df6 | |
| with: | |
| directory: tooling/artifacts/mpak-package | |
| upload: false | |
| announce: false | |
| platform-os: any | |
| platform-arch: any | |
| - name: Finalize mpak bundle metadata | |
| working-directory: tooling | |
| run: >- | |
| node scripts/finalize-mpak-bundle.mjs | |
| "artifacts/mpak-package/${{ steps.build_bundle.outputs.bundle-path }}" | |
| "artifacts/mpak-package" | |
| - name: Install mpak scanner | |
| run: >- | |
| uv pip install --system | |
| "mpak-scanner==0.2.9" | |
| "bandit==1.9.4" | |
| "guarddog==3.1.0" | |
| - name: Run mpak scanner | |
| working-directory: tooling/artifacts/mpak-package | |
| run: | | |
| # v0.2.9 cannot award L3 because required L3 controls are not implemented. | |
| mpak-scanner scan \ | |
| "${{ steps.build_bundle.outputs.bundle-path }}" \ | |
| --json \ | |
| --level 2 \ | |
| --output scan-results.json | |
| jq empty scan-results.json | |
| - name: Upload scanner results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: mpak-scan-results | |
| path: tooling/artifacts/mpak-package/scan-results.json |