bazelbuild/bazel: 2 workflows skip the step the other 7 use
Of Bazel's 9 GitHub workflows, 7 open with step-security/; ssl-monitor and trigger-docs-update don't. One rule checks the team's convention in every workflow, next to the headers and settings reviewers keep by hand.This config was written to test alint; Bazel doesn't use alint.
What alint found
- id: bazel-gha-uses-step-security-harden-runner
kind: file_content_matches
paths:
- ".github/workflows/*.yml"
- ".github/workflows/*.yaml"
pattern: 'step-security/harden-runner@'
level: warning⚠︎ warning bazel-gha-uses-step-security-harden-runner
ssl-monitor and trigger-docs-update skip the harden-runner step.
- id: bazel-bzl-apache-license-header
kind: file_header
paths:
include:
- "**/*.bzl"
exclude:
- "**/testdata/**"
- "**/test_data/**"
pattern: '# Copyright [0-9]{4} The Bazel Authors\. All rights reserved\.'
lines: 5
level: warning⚠︎ warning bazel-bzl-apache-license-header
The example rule file examples/ has no license header.
The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag trigger-docs-update for declaring no permissions, and 5 action references in 3 workflows that aren't pinned to a commit.
The config
Other conventions are kept by review: the Apache header on Java, C++, shell and Starlark files, and the settings in .gitattributes. The config checks those, the Bazel layout at the root and the workflows, and runs buildifier and ShellCheck from command rules. Two import_ rules carry Bazel's layering checks for the JNI headers and sun.
- id: bazel-version-file-exists
kind: file_exists
paths: ".bazelversion"
root_only: true
respect_gitignore: false
level: error
policy_url: "https://bazel.build/install/bazelisk" .bazelversion is tracked, and also listed in .gitignore so contributors can try other Bazel versions locally. alint skips ignored files unless a rule says otherwise, which is what respect_ does.
What stays outside alint
Starlark semantics and the build itself stay with Bazel's tools:
cc_dependencies,library glob()results, target visibility and load order, which buildifier andbazel queryown;- most of the Buildkite task matrix, which needs a list-membership rule alint doesn't have;
- whether
MODULEis current. A.bazel .lock generated_rule could run Bazel to check it; the config leaves that to CI.file_ fresh