Release Planr 1.9.0 candidate #225
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: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: security-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| secret-scan: | |
| name: Secret Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Check repository privacy boundaries | |
| run: sh scripts/check-repository-privacy.sh | |
| - name: Install pinned security scanners | |
| env: | |
| TRUFFLEHOG_SHA256: 7105f1cd6577f058a9e39d0578f1a99c8a1e481e4d3512cd8a09acfe22a0fdc0 | |
| TRIVY_SHA256: 8b4376d5d6befe5c24d503f10ff136d9e0c49f9127a4279fd110b727929a5aa9 | |
| run: | | |
| tools_dir="$RUNNER_TEMP/planr-security-tools" | |
| mkdir -p "$tools_dir" | |
| curl --fail --location --proto '=https' --tlsv1.2 --retry 3 \ | |
| --output "$RUNNER_TEMP/trufflehog.tar.gz" \ | |
| https://github.com/trufflesecurity/trufflehog/releases/download/v3.96.0/trufflehog_3.96.0_linux_amd64.tar.gz | |
| printf '%s %s\n' "$TRUFFLEHOG_SHA256" "$RUNNER_TEMP/trufflehog.tar.gz" | sha256sum --check - | |
| tar -xzf "$RUNNER_TEMP/trufflehog.tar.gz" -C "$tools_dir" trufflehog | |
| curl --fail --location --proto '=https' --tlsv1.2 --retry 3 \ | |
| --output "$RUNNER_TEMP/trivy.tar.gz" \ | |
| https://github.com/aquasecurity/trivy/releases/download/v0.70.0/trivy_0.70.0_Linux-64bit.tar.gz | |
| printf '%s %s\n' "$TRIVY_SHA256" "$RUNNER_TEMP/trivy.tar.gz" | sha256sum --check - | |
| tar -xzf "$RUNNER_TEMP/trivy.tar.gz" -C "$tools_dir" trivy | |
| "$tools_dir/trufflehog" --version | |
| "$tools_dir/trivy" --version | |
| echo "$tools_dir" >> "$GITHUB_PATH" | |
| - name: TruffleHog verified secrets | |
| run: trufflehog git "file://$GITHUB_WORKSPACE" --results=verified --fail --no-update --github-actions | |
| - name: Trivy secret and misconfig scan | |
| run: | | |
| trivy fs \ | |
| --scanners secret,misconfig \ | |
| --ignorefile .trivyignore.yaml \ | |
| --skip-check-update \ | |
| --skip-dirs target \ | |
| --skip-dirs dist \ | |
| --skip-dirs node_modules \ | |
| --exit-code 1 \ | |
| . | |
| actions-security: | |
| name: GitHub Actions Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install pinned zizmor | |
| env: | |
| ZIZMOR_SHA256: a8000f3c683319a523d3b20df0e75457ba591f049cfcbfa98966631b56733c03 | |
| run: | | |
| tools_dir="$RUNNER_TEMP/planr-security-tools" | |
| mkdir -p "$tools_dir" | |
| curl --fail --location --proto '=https' --tlsv1.2 --retry 3 \ | |
| --output "$RUNNER_TEMP/zizmor.tar.gz" \ | |
| https://github.com/zizmorcore/zizmor/releases/download/v1.24.1/zizmor-x86_64-unknown-linux-gnu.tar.gz | |
| printf '%s %s\n' "$ZIZMOR_SHA256" "$RUNNER_TEMP/zizmor.tar.gz" | sha256sum --check - | |
| tar -xzf "$RUNNER_TEMP/zizmor.tar.gz" -C "$tools_dir" zizmor | |
| "$tools_dir/zizmor" --version | |
| echo "$tools_dir" >> "$GITHUB_PATH" | |
| - name: Run zizmor | |
| run: | | |
| npm run verify:github-actions | |
| zizmor . \ | |
| --persona regular \ | |
| --min-severity medium \ | |
| --min-confidence medium \ | |
| --no-progress \ | |
| --format plain |