Repository navigation
Releases
Releases · mlarraz/codeowners-validator
v0.9.1
Immutable
release. Only release title and notes can be modified.
Highlights
- Size limit:
syntaxreports a CODEOWNERS file over GitHub's 3 MiB limit. GitHub ignores such a file, and its CODEOWNERS errors API reports nothing, soownerspasses. From 80% of the limit,syntaxreports a warning. - Annotations and job summary: in GitHub Actions, every issue becomes an annotation on its CODEOWNERS line, so pull requests show issues inline, and the job summary lists the results.
notownedandavoid-shadowingare regular checks, selected withCHECKS, so they can also run alone.avoid-shadowingnow reports the lines that have no effect because later lines take precedence for every file they match, using GitHub's matching rules on the tracked files.- Duplicates written differently:
duppatternsreportsdocs/apiand/docs/apias the same pattern, since a slash in the middle anchors a pattern at the root. - Faster matching: patterns are only matched against files that contain their literal text. On a repository with 728k files and 12k patterns,
avoid-shadowingtakes about a second. - Sturdier installation:
install.shretries failed downloads, uses the given tag without looking it up, and verifies the release attestation with-a. - Immutable release: this release's tag and files can't change. The action verifies the archive against the release attestation, so pinning the action to a commit also pins the binary that it runs.
Breaking changes
EXPERIMENTAL_CHECKS(theexperimental_checksinput) was removed, and setting it fails. Listnotownedandavoid-shadowinginCHECKS(checks) instead. The default checks are unchanged:syntax,duppatterns,files, andowners.avoid-shadowingreports the line that has no effect, instead of the later line, and only when later lines take precedence for every file that it matches.duppatternsissues are on the last line that defines the pattern.- The check names no longer start with
[Experimental]. - On github.com, the action needs the GitHub CLI, which GitHub-hosted runners have.
Changelog
- 8ae7ac1: Report a CODEOWNERS file over GitHub's size limit (@mlarraz)
- dca2348: Report issues as annotations and in the job summary in GitHub Actions (@mlarraz)
- 1ccb1c7: Retry downloads in the install script and use the given tag as is (@mlarraz)
- 50e0da8: Only test the files that contain a pattern's literal text (@mlarraz)
- 0f8536d: Make notowned and avoid-shadowing regular checks, and rebuild avoid-shadowing (@mlarraz)
- 46bf53e: Report duplicate patterns that are written differently (@mlarraz)
- 6feff51: Verify the release attestation in the action (@mlarraz)
- 5ba8645: Release v0.9.1 (@mlarraz)
v0.9.0
Highlights
- Sparse checkouts:
filesandnotownedread the list of tracked files from Git's index and match patterns with GitHub's rules, so a sparse, blobless checkout of just the CODEOWNERS file is enough, however big the repository.notownedno longer modifies the repository. - Owners validated by GitHub: the
ownerscheck reports the errors from GitHub's CODEOWNERS errors API, which is the evaluation GitHub uses to request reviews. It needs only read access to the repository contents: the workflow'sGITHUB_TOKENis enough, and public repositories work without credentials. - No Docker needed: the action installs the checksum-verified release binary, so it runs on Linux (including
ubuntu-slim), macOS, and Windows runners.
Breaking changes
NOT_OWNED_CHECKER_TRUST_WORKSPACEis nowTRUST_WORKSPACE. The action no longer has a trust input (not_owned_checker_trust_workspace), because the binary runs as the user that owns the checkout.ownersvalidates the CODEOWNERS file at the checked-out commit, which must exist on GitHub. SetOWNER_CHECKER_REF(owner_checker_ref) to validate another branch, tag, or commit.github_access_tokendefaults to the workflow's token. When both a token and a GitHub App are configured, the App is used instead of failing.- Action inputs can no longer be set as
INPUT_*environment variables instead ofwith:.
Changelog
- ab820dd: Add a package that reads the repository from Git (@mlarraz)
- f49a82e: Match file patterns against Git's tracked files (@mlarraz)
- 73891b5: Validate owners with GitHub's CODEOWNERS errors API (@mlarraz)
- 760b699: Run the action from the release binary instead of a Docker image (@mlarraz)
- cc19246: Release v0.9.0 (@mlarraz)
v0.8.0
First release from this fork. It includes every change since v0.7.4, listed below.
Security
- Built with Go 1.27.3. v0.7.4 was built with a Go toolchain that has long been out of support, which includes standard library vulnerabilities fixed since then (crypto/tls, crypto/x509, net/http and others).
- All dependencies updated to their latest versions. go-github moved from v41 to v93, which drops the deprecated
golang.org/x/crypto/openpgppackage (GO-2026-5932). govulncheck reports no vulnerabilities in called code. - The Docker image takes git and CA certificates from Alpine 3.24 instead of 3.19, which is end of life.
Distribution
- The Go module path is
github.com/mlarraz/codeowners-validator:go install github.com/mlarraz/codeowners-validator@v0.8.0. - Images are published to
ghcr.io/mlarraz/codeowners-validatorfor linux/amd64 and linux/arm64, andaction.ymlusesghcr.io/mlarraz/codeowners-validator:v0.8.0. - Binaries are no longer UPX-compressed. macOS killed the packed binaries at launch; they run now, but are larger.
- New windows/arm64 build, and
install.shinstalls the arm64 builds for macOS, Linux, and Windows. - No Docker Hub image or Homebrew formula.
Changes
-vis replaced by theversionsubcommand. Add-o shortto print just the version number.- The syntax check accepts usernames with underscores, as used by enterprise managed users.
action.ymlexposes all supported inputs.