Skip to content

Harden CI workflows with pinned actions and scoped checkout credentials - #423

Merged
juanmaguitar merged 2 commits into
trunkfrom
juanmaguitar/Audit
Sep 10, 2026
Merged

juanmaguitar merged 2 commits into
trunkfrom
juanmaguitar/Audit

Conversation

@juanmaguitar

Copy link
Copy Markdown
Collaborator

Why

The lint, unit and E2E workflows use mutable action tags, so their executed code can change without a repository diff. Unit and E2E jobs also retain checkout authentication in Git configuration while installing and testing code, although they do not need authenticated Git operations after checkout.

What changes

Pin checkout, setup-node and upload-artifact to the full commits currently referenced by their v4 tags, with version comments for readability. Disable checkout credential persistence in the unit job and both E2E jobs; lint already disables it. This changes three workflows without upgrading action major versions or changing their triggers, permissions, matrices or test commands.

How to test this

Starting state: This PR is ready for review and GitHub Actions has started runs for its latest revision. There is no application UI change to exercise. Platforms: Ubuntu for lint, macOS and Windows for unit tests and E2E.

  1. Open the PR's Checks tab and select eslint. Confirm checkout, dependency installation and ESLint complete successfully.
  2. Open unit (macos-latest) and unit (windows-latest). Confirm installation and both suite steps, system Node and Electron's bundled Node, pass without Git authentication errors.
  3. Open both Journeys and both Packaged smoke jobs. Confirm checkout, installation, renderer build, journeys and unsigned packaging/smoke tests pass. Check that the run belongs to the current PR revision.
  4. In Files changed, confirm every action reference in these three workflows uses a 40-character SHA and every checkout sets persist-credentials: false. Compare the pins with the upstream version tags listed in the implementation notes below.

What must not have happened: No jobs or platforms should disappear, the action major versions should not change, and no extra permissions or credentials should be needed to make the jobs pass. Application files and lockfiles should not change.

Local checks: npm run lint, npm test and git diff --check origin/trunk...HEAD. These pass, but local tests do not reproduce GitHub's checkout authentication; the Actions runs above are needed for that validation. Failure-only artifact upload remains configured; its execution is not demonstrated by a green run.

Risks and limitations

An unnoticed dependency on authenticated Git operations after checkout would now fail in CI. The pins match the existing v4 tags, reducing version-change risk, but future action updates must update the SHA explicitly. Remote CI validation is pending when this PR is opened.

Related

Repository guardrail audit: action pinning and checkout credential persistence. No issue is closed by this PR.


Review outcome (required — see AGENTS.md)

0 [fix here] / 0 [follow-up]. A fresh-context reviewer applied .github/instructions/code-review.instructions.md across all five dimensions and found no issues. The reviewer independently verified the upstream SHA tags and checked the workflows and invoked scripts for reliance on persisted checkout credentials. No findings needed fixing or deferring within this PR's scope.

Deterministic validation passed: repo-wide ESLint; all 1,254 tests with zero failures or skips; YAML parsing and a structured comparison confirming only action pins and checkout credential settings changed; whitespace validation with git diff --check. Actionlint was not available locally. No application tests were added for this configuration-only change.

Implementation notes

Resolved directly from upstream refs with git ls-remote:

  • actions/checkout v4.4.0: 11d5960a326750d5838078e36cf38b85af677262
  • actions/setup-node v4.4.0: 49933ea5288caeca8642d1e84afbd3f7d6820020
  • actions/upload-artifact v4.6.2: ea165f8d65b6e75b540449e92b4886f43607fa02

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e2b58e01-637c-449b-aae9-9d7d7357a442

📥 Commits

Reviewing files that changed from the base of the PR and between 5b91ce0 and d2b05b0.

📒 Files selected for processing (3)
  • .github/workflows/e2e.yml
  • .github/workflows/lint.yml
  • .github/workflows/unit-tests.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@juanmaguitar
juanmaguitar merged commit 74e700a into trunk Sep 10, 2026
8 checks passed
@juanmaguitar
juanmaguitar deleted the juanmaguitar/Audit branch September 10, 2026 16:47
juanmaguitar added a commit that referenced this pull request Sep 10, 2026
## Why

An advisory bot check can succeed without completing a review. Review
evidence needs to show who reviewed which revision, whether the pass
actually completed, and what changed after it.

## What changes

Document the required review evidence in the shared review standard and
add a matching record to the default pull-request template. The record
distinguishes completed, partial, and omitted reviews; names the
reviewed head and base; and keeps the comparison after a later push
visible.

## How to test this

**Starting state:** This branch, with the review standard and
pull-request template open.

1. Open `.github/instructions/code-review.instructions.md` and read
**How to report**.
- Expected: it requires a reviewer, reviewed head/base SHAs, completion
status, evidence, and a re-check after subsequent changes.
2. Open `.github/pull_request_template.md` and expand **Review
outcome**.
- Expected: the template has fields for all of that evidence, including
**Changes since review**.
3. Consider a skipped bot review, a partial review, and a later push
after a completed review.
- Expected: each can be recorded without representing it as zero
findings or erasing the original-to-current SHA comparison.

**What must not have happened:** This must not imply that advisory bot
availability is a completed review, or create a new required CI check or
merge permission.

Platforms: any — this changes repository Markdown only.

## Risks and limitations

This is a reporting/process guardrail, not automated enforcement. It
depends on authors and reviewers completing the record accurately.

## Related

Follow-up to #423.

---

<details>
<summary>Design decisions and alternatives considered</summary>

The standard remains the single source of truth; the template records
the same evidence rather than duplicating policy. A dedicated **Changes
since review** field retains the old-to-new SHA comparison when a push
makes an earlier review stale.

</details>

<details>
<summary>Review outcome (required — see AGENTS.md)</summary>

0 [fix here] · 0 [follow-up]

- **Review:** completed — `/root/fresh_review_after_rebase` (fresh agent
context); `52d08e8bf82dced214070172a678eab19ddc411a` /
`fd834881559ed172f9fcfb0e53963e30adaa30a2`; local independent judgement
review with no findings; `npm run lint` and `npm test` passed (1,258
tests); no uncommitted scope.
- **Since review:** `cf1cd7d3f11fdf37f71a1400c180f531752d8325` →
`52d08e8bf82dced214070172a678eab19ddc411a` checked; re-review completed
with no findings.

</details>

<details>
<summary>Implementation notes</summary>

No application code or dependencies changed.

</details>

<details>
<summary>Screenshots or recording</summary>

No user-visible application surface changed.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant