What changed, and why it matters
This commit fixes a missing environment variable in the project's automated build and test scripts (GitHub Actions). It does not change the BitBox02 firmware code that runs on the device, nor does it introduce any security vulnerability. It simply restores a variable used during code-quality checks so that linting tools know which code changes to compare against.
No security action required. This is a normal CI fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds a base-sha input parameter to a reusable GitHub Actions workflow (ci-common.yml) and passes it from the caller workflows (ci.yml and pr-ci.yml) as TARGET_BRANCH. This variable was accidentally dropped when the CI pipeline was split into multiple jobs. The affected jobs are lint-py and an unnamed lint job. The change is purely CI infrastructure maintenance.
Changed components
.github/workflows/ci-common.yml.github/workflows/ci.yml.github/workflows/pr-ci.ymlInspect captured patch +9 / −0
diff --git a/.github/workflows/ci-common.yml b/.github/workflows/ci-common.yml
index 1487b93..861750c 100644
--- a/.github/workflows/ci-common.yml
+++ b/.github/workflows/ci-common.yml
@@ -10,6 +10,9 @@ on:
container-version:
required: true
type: string
+ base-sha:
+ required: true
+ type: string
env:
RUSTFLAGS: "-Dwarnings"
CFLAGS: "-Werror"
@@ -38,6 +41,8 @@ jobs:
lint-py:
runs-on: ubuntu-22.04
container: ${{ inputs.container-repo }}:${{ inputs.container-version }}
+ env:
+ TARGET_BRANCH: ${{ inputs.base-sha }}
steps:
- name: Clone the repo
uses: actions/checkout@v4
@@ -57,6 +62,8 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ${{ inputs.container-repo }}:${{ inputs.container-version }}
+ env:
+ TARGET_BRANCH: ${{ inputs.base-sha }}
steps:
- name: Clone the repo
uses: actions/checkout@v4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index da78fa4..1f4b741 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,4 +24,5 @@ jobs:
with:
container-version: ${{ needs.dev-container.outputs.container-version }}
container-repo: ${{ needs.dev-container.outputs.container-repo }}
+ base-sha: ${{ github.event.before }}
secrets: inherit
diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml
index 19346ac..b11e619 100644
--- a/.github/workflows/pr-ci.yml
+++ b/.github/workflows/pr-ci.yml
@@ -21,6 +21,7 @@ jobs:
with:
container-repo: ${{ needs.dev-container.outputs.container-repo }}
container-version: ${{ needs.dev-container.outputs.container-version }}
+ base-sha: ${{ github.event.pull_request.base.sha }}
secrets: inherit
# Build the firmware on every commit to simplify bisecting the firmware
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.