What changed, and why it matters
This commit hardens Trezor's GitHub CI workflows that run a third-party memory-analysis tool called MemBrowse. It pins the MemBrowse action to a specific commit hash instead of a moving version tag, prevents the workflows from running on forked repositories, adds a job timeout, and fixes a minor condition placement. These are defensive supply-chain and hardening improvements, not a fix for an active vulnerability in the firmware itself.
No urgent action required. Reviewers should verify the pinned commit hashes match the claimed versions of membrowse-action and actions/setup-python, confirm the repository guard covers all MemBrowse-triggering events, and ensure secrets like MEMBROWSE_API_KEY remain unavailable to forks.
Security signals we found
Pinning third-party GitHub Actions to immutable commit hashes mitigates tag-retagging and supply-chain compromise risks.
Restricting workflow execution to the canonical repository prevents untrusted forks from triggering MemBrowse jobs or exfiltrating secrets.
Adding a timeout limits the window for accidental or malicious long-running CI jobs.
No firmware source code, cryptographic, or device-runtime logic is changed.
Evidence from the diff
The diff modifies four GitHub Actions workflow files. It replaces floating-tag references (membrowse/membrowse-action@v1, actions/setup-python@v6) with immutable commit-hash references, adds a github.repository == ‘trezor/trezor-firmware’ guard to the core workflow so MemBrowse does not execute on forks, moves the MEMBROWSE_API_KEY check after the env block in membrowse-comment.yml, adds a 10-minute timeout to the load-targets job, and corrects a matrix flag from !matrix.n1w1 to !matrix.k1n1. These changes reduce supply-chain and CI misconfiguration risk but do not patch any runtime firmware bug.
Changed components
.github/actions/membrowse/action.yml.github/workflows/core.yml.github/workflows/membrowse-comment.yml.github/workflows/membrowse-onboard.ymlInspect captured patch +11 / −9
### .github/actions/membrowse/action.yml
@@ -47,7 +47,7 @@ runs:
cat "$GITHUB_OUTPUT"
- name: MemBrowse firmware
- uses: membrowse/membrowse-action@v1
+ uses: membrowse/membrowse-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
target_name: ${{ inputs.model }}-firmware${{ steps.cfg.outputs.suffix }}
elf: ${{ steps.cfg.outputs.artifacts }}/firmware.elf
@@ -60,7 +60,7 @@ runs:
- name: MemBrowse kernel
if: steps.cfg.outputs.has_kernel == 'true'
- uses: membrowse/membrowse-action@v1
+ uses: membrowse/membrowse-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
target_name: ${{ inputs.model }}-kernel
elf: ${{ steps.cfg.outputs.artifacts }}/kernel.elf
@@ -71,7 +71,7 @@ runs:
- name: MemBrowse secmon
if: steps.cfg.outputs.has_secmon == 'true'
- uses: membrowse/membrowse-action@v1
+ uses: membrowse/membrowse-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
target_name: ${{ inputs.model }}-secmon
elf: ${{ steps.cfg.outputs.artifacts }}/secmon.elf
@@ -82,7 +82,7 @@ runs:
- name: MemBrowse bootloader
if: steps.cfg.outputs.has_bootloader == 'true'
- uses: membrowse/membrowse-action@v1
+ uses: membrowse/membrowse-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
target_name: ${{ inputs.model }}-bootloader
elf: ${{ steps.cfg.outputs.artifacts }}/bootloader.elf
### .github/workflows/core.yml
@@ -142,7 +142,8 @@ jobs:
# Not on the nightly schedule or workflow_dispatch: they would re-upload the main tip without its parent.
- uses: ./.github/actions/membrowse
if: >
- matrix.type == 'normal' && !matrix.miniscript && !matrix.n1w1 && matrix.model != 'D001' &&
+ github.repository == 'trezor/trezor-firmware' &&
+ matrix.type == 'normal' && !matrix.miniscript && !matrix.k1n1 && matrix.model != 'D001' &&
(github.event_name == 'pull_request' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main'))
continue-on-error: true # never fail the firmware build because of the report
### .github/workflows/membrowse-comment.yml
@@ -26,11 +26,11 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6.0.2
with:
persist-credentials: false
- - uses: membrowse/membrowse-action/comment-action@v1
- if: env.MEMBROWSE_API_KEY != ''
+ - uses: membrowse/membrowse-action/comment-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
api_key: ${{ secrets.MEMBROWSE_API_KEY }}
commit: ${{ github.event.workflow_run.head_sha }}
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ if: env.MEMBROWSE_API_KEY != ''
### .github/workflows/membrowse-onboard.yml
@@ -20,6 +20,7 @@ permissions:
jobs:
load-targets:
runs-on: ubuntu-latest
+ timeout-minutes: 10
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
@@ -58,7 +59,7 @@ jobs:
persist-credentials: false
- name: Set up Python
- uses: actions/setup-python@v6
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # actions/setup-python@v6.3.0
with:
python-version: '3.13'
@@ -67,7 +68,7 @@ jobs:
- uses: ./.github/actions/environment
- name: Run MemBrowse Onboard Action
- uses: membrowse/membrowse-action/onboard-action@v1
+ uses: membrowse/membrowse-action/onboard-action@14677ae592be153b43eb7dbe4f542cf0c7d098ed # membrowse/membrowse-action@v1.2.18
with:
target_name: ${{ matrix.target_name }}
num_commits: ${{ github.event.inputs.num_commits }}Why this scored 21/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.