Category: ScannerGoApache-2.0v0.1.0
lockreview
Reviews GitHub Actions lockfile (actions.lock) diffs and flags repository identity changes, impostor commits, ref rollbacks, new transitive actions, and runs/dist changes. It writes Markdown, JSON and SARIF, and it does not execute action code.
go install github.com/ucsurf/lockreview/cmd/lockreview@v0.1.0git clone https://github.com/ucsurf/lockreview.gitcd lockreviewgit checkout v0.1.0go build -trimpath -mod=readonly -o lockreview ./cmd/lockreview
What it does
GitHub Actions can pin every action, including transitive ones, in .github/workflows/actions.lock. The runner then executes those commits even when a tag moves. Dependabot and Renovate will open a pull request that regenerates the lockfile. The README calls that diff a wall of SHAs and numeric ids.
lockreview reads the old file and the new file and writes a review. It does not run the action. It does not check the action out. It does not install it. It reads the lockfile and, unless you pass --offline, metadata and file contents from the GitHub API. The README says a quiet report is not a claim that the action is safe.
The checks named in the README, with their default severity:
- Errors:
ownership-change,ownership-mismatch,impostor-commit,ref-moved-backwards,ref-diverged,new-transitive,runs-using-changed,manifest-unreadable,repo-missing. - Warnings:
runs-changed,dist-changed,commit-too-new,manifest-missing,tree-truncated. - Notes:
ref-changed,commit-changed,new-uses-edge,unpaired-pins.
--fail-on decides which of those fail the process. The default is error. The sample report in the README is Markdown. --format json is schema version "1". --format sarif is SARIF 2.1.0: one run, driver name lockreview, ruleId equal to the check id, and a location in .github/workflows/actions.lock.
Exit status 0 means nothing at or above --fail-on. 1 means there is such a finding. 2 is a usage error, or the API could not answer. none always exits 0 when the review itself succeeded.
GITHUB_TOKEN, or GH_TOKEN if the first is unset, is sent as a bearer token only to the API for --home-host (default api.github.com). A hostname in the lockfile cannot point that token at another host. With no token the README says the API still works for public repositories, and the unauthenticated budget is 60 requests per hour.
Go 1.27 or newer. The only dependency outside the standard library is gopkg.in/yaml.v3. The license is Apache-2.0. Tag v0.1.0 attaches archives for Linux, macOS, and Windows (amd64 and arm64) and a SHA256SUMS file. The README says to check the sums before you run a downloaded binary.
The composite action is published as ucsurf/lockreview@v0.1.0. The README says it builds that tag with Go 1.27.4, runs lockreview diff --base / --head, and appends the report to $GITHUB_STEP_SUMMARY. It does not post a comment unless you set comment: "true". An example workflow is docs/example-workflow.yml. The checkout has to be fetch-depth: 0.
Limits
The README says these are heuristics. They are not a guarantee, and they are not a substitute for reading the upstream diff when the action is one you do not already trust.
--offline still reports ownership-change, ref-changed, commit-changed, new-transitive and new-uses-edge from the lockfile uses: lists, and unpaired-pins. It skips the API, so it cannot judge impostor commits, age, live ids, runs: or dist/.
An owner_id change is what a legitimate transfer looks like and what a re-registered name looks like. The tool cannot tell them apart. A commit on the default branch can still be malicious. Tag tips are listed, up to 1000. At most --max-tag-compares (default 30) other tag tips are tested for ancestry.
The pin is owner/repo@ref, not a subdirectory. action.yml is read at the root of that commit. Reusable workflows are not in the lockfile and are not reviewed. A changed blob id under dist/ means the bytes changed. The tool does not download those bytes. The JSON list of those paths is capped at 200. One private action, or a rate limit, fails the run with exit 2. The report printed before that is partial. There is no retry.
Usage
Compare two lockfiles
The README says the lockfile path defaults to .github/workflows/actions.lock. Override it with --lockfile. The repository defaults to the current directory (--repo).
lockreview diff old.lock new.lockCompare two commits in a local repository
The README says this reads the blob with git cat-file and does not check anything out.
lockreview diff --base origin/main --head HEADJSON, SARIF and other flags
The default --fail-on is error. Exit 0 means nothing at or above that level, 1 means there is a finding, and 2 is a usage error or the API could not answer. none always exits 0 when the review itself succeeded.
lockreview diff old.lock new.lock --format jsonlockreview diff old.lock new.lock --format sariflockreview diff old.lock new.lock --offlinelockreview diff old.lock new.lock --fail-on warninglockreview diff old.lock new.lock --cooldown 3dlockreview diff old.lock new.lock --now 2026-11-16T12:00:00ZDemo
The README says this starts a local replay of demo/api and reviews demo/old.lock against demo/new.lock. No call leaves the machine.
./demo/run.sh
More tools
- hookjack
Static scanner for commands that AI assistants and IDEs run on their own when you open a repository.
ucsurf/hookjack - disclose
Finds where to report a vulnerability.
ucsurf/disclose - repojack
Finds dependencies that point at a deleted or renamed GitHub account, so someone else could register the name and serve that code.
ucsurf/repojack - vuln-patterns
Semgrep rules taken from vulnerabilities that are already public.
ucsurf/vuln-patterns - pwnreq
Finds GitHub Actions workflows where someone without write access can run code that sees repository secrets: pwn requests and script injection.
ucsurf/pwnreq