Skip to content

feat(bzlmod-lock-check): verify bazel lockfile - #122

Merged
AlexanderLanin merged 1 commit into
mainfrom
dev
Jun 8, 2026
Merged

AlexanderLanin merged 1 commit into
mainfrom
dev

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

Verified:
image

Recommendation:
Run this job from your on-pr.yml or even better don't, and handle the use-case via pre-commit

Resolves #123

…rd against pull_request_target

- Split single job into bzlmod-tidy-check and bzlmod-lockfile-check so
  both results are reported independently in the PR checks UI
- Add `bazel mod deps --lockfile_mode=error` to verify the committed
  lockfile matches the resolved dependency graph
- Add explicit guard step that fails (not skips) when called from
  pull_request_target, which would otherwise run Bazel on untrusted fork
  code with access to repository secrets
- Remove unsafe fork checkout (head_ref + fork repository override)
  in favor of the default checkout, which is safe for pull_request and
  schedule events
- Add header documentation with pre-commit alternative and security note
- Update README section 16 to reflect both jobs, the security constraint,
  and the pre-commit recommendation

@PiotrKorkus PiotrKorkus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, as discussed in todays meeting this is a good change to actually verify lockfile

@AlexanderLanin
AlexanderLanin merged commit 93aac16 into main Jun 8, 2026
11 checks passed
@AlexanderLanin
AlexanderLanin deleted the dev branch June 8, 2026 21:19
@AlexanderLanin
AlexanderLanin restored the dev branch June 11, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

improve bzlmod-lock-check

3 participants