Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
digest: ${{ steps.build.outputs.digest }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -51,18 +51,18 @@ jobs:
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ${{ inputs.context }}
file: ${{ inputs.file }}
Expand All @@ -82,7 +82,7 @@ jobs:
digest: ${{ steps.build.outputs.digest }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -95,18 +95,18 @@ jobs:
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ${{ inputs.context }}
file: ${{ inputs.file }}
Expand All @@ -125,15 +125,15 @@ jobs:
needs: [build-amd64, build-arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
dep-opts: ${{ steps.setup.outputs.DEP_OPTS }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
sparse-checkout: |
Expand Down Expand Up @@ -69,15 +69,15 @@ jobs:

- name: Check for cached depends
id: cache-check
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: depends/built/${{ steps.setup.outputs.HOST }}
key: ${{ steps.setup.outputs.cache-key }}
lookup-only: true

- name: Cache SDKs
id: cache-sdk-check
uses: actions/cache@v4
uses: actions/cache@v5
if: inputs.build-target == 'mac'
with:
path: depends/SDKs
Expand All @@ -98,19 +98,19 @@ jobs:
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Restore depends sources
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: depends/sources
key: depends-sources-${{ hashFiles('depends/packages/*') }}
restore-keys: depends-sources-

- name: Restore SDKs cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
if: inputs.build-target == 'mac'
with:
path: depends/SDKs
Expand All @@ -119,7 +119,7 @@ jobs:
fail-on-cache-miss: true

- name: Restore cached depends
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: depends/built/${{ needs.check-cache.outputs.host }}
key: ${{ needs.check-cache.outputs.cache-key }}
Expand All @@ -132,7 +132,7 @@ jobs:
env ${{ needs.check-cache.outputs.dep-opts }} make -j$(nproc) -C depends

- name: Save depends cache
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: depends/built/${{ needs.check-cache.outputs.host }}
key: ${{ needs.check-cache.outputs.cache-key }}
16 changes: 8 additions & 8 deletions .github/workflows/build-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate checkout v6 behind runner-version readiness

Upgrading this step to actions/checkout@v6 can break CI on self-hosted labels unless the runner fleet is already updated: checkout v6 requires Actions Runner v2.327.1+, and its release notes also call out v2.329.0+ for persisted-credential access in containerized git scenarios. This workflow runs in a container and later performs authenticated git fetch, so older blacksmith/custom runners selected by runs-on inputs can fail after this change; either keep v5 until runner minimums are enforced or add an explicit runner-version gate.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2.329.0 was released in October 2025. Blacksmith should use the latest runners, or at least >v2.329.0

https://github.com/actions/runner/releases/tag/v2.329.0

with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 50
Expand All @@ -61,7 +61,7 @@ jobs:
shell: bash

- name: Restore SDKs cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
if: inputs.build-target == 'mac'
with:
path: |
Expand All @@ -70,7 +70,7 @@ jobs:
fail-on-cache-miss: true

- name: Restore depends cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: depends/built/${{ inputs.depends-host }}
key: ${{ inputs.depends-key }}
Expand All @@ -84,7 +84,7 @@ jobs:
shell: bash

- name: Restore ccache cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: |
/cache/ccache
Expand All @@ -111,15 +111,15 @@ jobs:
if: |
github.event_name == 'push' &&
github.ref_name == github.event.repository.default_branch
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: |
/cache/ccache
key: ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }}

- name: Restore ctcache cache
if: inputs.build-target == 'linux64_multiprocess'
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: |
/cache/ctcache
Expand All @@ -141,7 +141,7 @@ jobs:
inputs.build-target == 'linux64_multiprocess' &&
github.event_name == 'push' &&
github.ref_name == github.event.repository.default_branch
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: |
/cache/ctcache
Expand All @@ -165,7 +165,7 @@ jobs:
echo "key=${BUNDLE_KEY}" >> "${GITHUB_OUTPUT}"

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.bundle.outputs.key }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Checkout code
if: ${{ steps.skip-check.outputs.skip == 'false' }}
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Select runners
id: select-runner
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cache-depends-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: ${{ inputs.runs-on || 'ubuntu-24.04-arm' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Check for cached sources
id: cache-check
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: depends/sources
key: depends-sources-${{ hashFiles('depends/packages/*') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-diff-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Fetch git
run: git fetch --no-tags -fu origin develop:develop
- name: Run Clang-Format-Diff.py
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
repo-name: ${{ steps.prepare.outputs.repo-name }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
path: dash
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Commit variables
id: prepare
Expand All @@ -46,14 +46,14 @@ jobs:
echo "repo-name=${REPO_NAME}" >> $GITHUB_OUTPUT

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ${{ github.workspace }}/dash
build-args: |
Expand Down Expand Up @@ -84,14 +84,14 @@ jobs:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
path: dash
fetch-depth: 0

- name: Cache depends sources
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: dash/depends/sources
key: depends-sources-${{ hashFiles('dash/depends/packages/*') }}
Expand All @@ -100,7 +100,7 @@ jobs:

- name: Cache Guix and depends
id: guix-cache-restore
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: |
${{ github.workspace }}/.cache
Expand Down Expand Up @@ -140,13 +140,13 @@ jobs:
HOSTS=${{ matrix.build_target }} ./dash/contrib/containers/guix/scripts/guix-check ${{ github.workspace }}/dash

- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: guix-artifacts-${{ matrix.build_target }}
path: |
${{ github.workspace }}/dash/guix-build*/output/${{ matrix.build_target }}/

- name: Attest build provenance
uses: actions/attest-build-provenance@v1
uses: actions/attest@v4
with:
subject-path: ${{ github.workspace }}/dash/guix-build*/output/${{ matrix.build_target }}/*
Comment thread
d0wn3d marked this conversation as resolved.
Comment thread
d0wn3d marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 50
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/merge-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
needs rebase

- name: comment
uses: mshick/add-pr-comment@v2
uses: mshick/add-pr-comment@v3
if: failure()
Comment on lines 51 to 53
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

python - <<'PY'
import pathlib, re

wf_dir = pathlib.Path(".github/workflows")
for wf in sorted(wf_dir.glob("*.yml")):
    text = wf.read_text()
    if "pull_request_target" not in text:
        continue
    print(f"\n## {wf}")
    for m in re.finditer(r'^\s*uses:\s*([^\s]+)\s*$', text, flags=re.M):
        uses = m.group(1)
        if uses.startswith("./") or uses.startswith("docker://"):
            continue
        line = text[:m.start()].count("\n") + 1
        pinned = bool(re.search(r'@[0-9a-fA-F]{40}$', uses))
        status = "SHA_PINNED" if pinned else "TAG_PINNED"
        print(f"{status}\tLine {line}\t{uses}")
PY

Repository: dashpay/dash

Length of output: 1200


🏁 Script executed:

cat -n .github/workflows/merge-check.yml | head -60

Repository: dashpay/dash

Length of output: 2010


Pin the third-party comment action to a full commit SHA in this privileged workflow.

The workflow uses pull_request_target (line 8) with pull-requests: write permissions (line 4) and runs mshick/add-pr-comment@v3 (line 52) with a mutable tag. This combination creates supply-chain risk—the tag could be updated by the maintainer at any time, potentially executing compromised code with elevated privileges.

Suggested hardening
      - name: comment
        uses: mshick/add-pr-comment@v3
+        uses: mshick/add-pr-comment@<full_commit_sha_for_v3>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/merge-check.yml around lines 51 - 53, The workflow uses
the mutable action reference "mshick/add-pr-comment@v3" in a privileged
pull_request_target run; replace the mutable tag with a specific full commit SHA
for the mshick/add-pr-comment action (e.g.,
mshick/add-pr-comment@<full-commit-sha>) so the workflow is pinned to an
immutable commit, ensuring the action cannot be altered later—locate the "uses:
mshick/add-pr-comment@v3" line and update it to the verified full 40-character
commit SHA for that repository/release.

with:
message: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/predict-conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
ghToken: "${{ secrets.GITHUB_TOKEN }}"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: validate potential conflicts
id: validate_conflicts
run: pip3 install hjson && .github/workflows/handle_potential_conflicts.py "$conflicts"
Expand Down
Loading
Loading