Skip to content

test(tools): gh-actions-lock pinned, and an offline GitHub proxy pins its behaviour - #300

Merged
sweepies merged 2 commits into
mainfrom
chore/actions-lock-tool
Nov 13, 2026
Merged

sweepies merged 2 commits into
mainfrom
chore/actions-lock-tool

Conversation

@sweepies

@sweepies sweepies commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

PR 1 of 4 for GitHub Actions workflow lockfiles (.github/workflows/actions.lock, generally available on 2026-10-28). No behaviour change, except that patchula tools install and prune now include the new tool.

  • Pin: github:github/gh-actions-lock[bin=gh-actions-lock] 0.4.1 in defaults.toml and [test:tools.tools]. mise.lock records provenance = "github-attestations" for all three platform builds. actions_lock_spec in tool.rs feeds tools install/prune until PR 3 adds the tool's descriptor, and PR 3 removes it.
  • Offline GitHub proxy (tests/real_actions_lock.rs): HTTPS_PROXY to a loopback proxy that accepts only CONNECT api.github.com:443 and refuses and records anything else. It terminates TLS with a certificate generated per test (SSL_CERT_FILE), so no key is committed, and answers through the testkit's cassette Replay (PATCHULA_RECORD=1 records). The tool runs with a cleared environment, a fake GH_TOKEN and CI=false; the tool's CI retry mode stalls about 110 s on failures. rustls and rcgen are dev-dependencies, on aws-lc-rs like the rest of the workspace.
  • What the tests pin, to notice a change when the pin moves:
    • without --no-narrow the tool rewrites @v7 to @v7.0.1;
    • it unpins a SHA and drops its # v7.0.0 comment;
    • actions/cache/restore@v4 locks under actions/[email protected];
    • PR 3's flags (--no-interactive --no-onboard --no-narrow --ignore-local-actions --json=valid,findings) leave the workflow untouched and report valid.
  • Cassettes (fixtures/tools/actions-lock-*.json): recorded read-only against public actions/checkout and actions/cache, with the token redacted. fixtures:check: 49 cassettes, no possible secrets.

On the project VM: test:tools 27/27, test:unit, clippy, fmt and hk pass.

Next: PR 2 mints a narrow read-only installation token on the server. PR 3 adds the engine: the regenerated lockfile in the same commit as the bump, or the update held with a reason. PR 4 adds --relock in lockfile maintenance.

View guided diff Turn on auto-fix

… its behaviour

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@socket-security

socket-security Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​rcgen@​0.14.109610093100100

View full report

… no other way out

GITHUB_ACTIONS, which also selects the tool's patient retries, no longer
reaches it; every proxy variable points at the fixture, which refuses
anything but api.github.com; an empty SSL_CERT_DIR leaves the test CA as
the only root; a run past two minutes is killed; and the frozen-lock case
checks the lock too.
@sweepies
sweepies merged commit 62edd27 into main Nov 13, 2026
12 checks passed
@sweepies
sweepies deleted the chore/actions-lock-tool branch November 13, 2026 19:05
@sweepies-ops sweepies-ops Bot mentioned this pull request Nov 13, 2026
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