Add dependency monitoring with Renovate and OSV scanning#9
Conversation
Switch chezmoi git-repo externals to version-pinned archive downloads so dependencies are reproducible and scannable. Add nord-dircolors external. - Renovate config for archive URLs, dot_Brewfile, and GitHub Actions - Weekly OSV-Scanner workflow for pinned externals - macOS job reports outdated Homebrew packages from dot_Brewfile - Chezmoi CI workflow with pinned chezmoi v2.71.0 - README dependency monitoring section Co-authored-by: Huy Pham <hdp617@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request migrates Chezmoi externals from git-repo to pinned archive URLs and introduces a Renovate configuration to automate dependency updates for these archives, Homebrew formulae/casks, and Go tools. Feedback on the Renovate configuration highlights critical issues: the git-refs custom manager requires a fully qualified packageNameTemplate to fetch repository references correctly, and the Homebrew custom managers should use packageNameTemplate instead of the invalid lookupNameTemplate property.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "customType": "regex", | ||
| "description": "Chezmoi archive externals pinned to commit SHAs", | ||
| "managerFilePatterns": ["^\\.chezmoiexternal\\.toml$"], | ||
| "matchStrings": [ | ||
| "url = \"https://github\\.com/(?<depName>[^/]+/[^/]+)/archive/(?<currentDigest>[a-f0-9]{40})\\.tar\\.gz\"" | ||
| ], | ||
| "datasourceTemplate": "git-refs", | ||
| "currentValueTemplate": "HEAD", | ||
| "versioningTemplate": "git" | ||
| }, |
There was a problem hiding this comment.
For the git-refs datasource, the packageName must be a fully qualified domain name (e.g., https://github.com/owner/repo). Since depName only captures the owner/repo path, Renovate will default packageName to depName and fail to fetch the references. Adding a packageNameTemplate pointing to the full GitHub repository URL fixes this.
{
"customType": "regex",
"description": "Chezmoi archive externals pinned to commit SHAs",
"managerFilePatterns": ["^\\.chezmoiexternal\\.toml$"],
"matchStrings": [
"url = \"https://github\\.com/(?<depName>[^/]+/[^/]+)/archive/(?<currentDigest>[a-f0-9]{40})\\.tar\\.gz\""
],
"datasourceTemplate": "git-refs",
"packageNameTemplate": "https://github.com/{{{depName}}}",
"currentValueTemplate": "HEAD",
"versioningTemplate": "git"
}| { | ||
| "customType": "regex", | ||
| "description": "Homebrew formulae in dot_Brewfile", | ||
| "managerFilePatterns": ["^dot_Brewfile$"], | ||
| "matchStrings": [ | ||
| "^brew \"(?<depName>[a-z0-9][a-z0-9+@._/-]*)\"\\s*$" | ||
| ], | ||
| "datasourceTemplate": "repology", | ||
| "lookupNameTemplate": "homebrew/{{{depName}}}", | ||
| "versioningTemplate": "loose" | ||
| }, |
There was a problem hiding this comment.
In Renovate custom managers, lookupNameTemplate is not a valid configuration option. The correct and standard field name to specify the package name used for lookups is packageNameTemplate.
{
"customType": "regex",
"description": "Homebrew formulae in dot_Brewfile",
"managerFilePatterns": ["^dot_Brewfile$"],
"matchStrings": [
"^brew \"(?<depName>[a-z0-9][a-z0-9+@._/-]*)\"\\s*$"
],
"datasourceTemplate": "repology",
"packageNameTemplate": "homebrew/{{{depName}}}",
"versioningTemplate": "loose"
}| { | ||
| "customType": "regex", | ||
| "description": "Homebrew casks in dot_Brewfile", | ||
| "managerFilePatterns": ["^dot_Brewfile$"], | ||
| "matchStrings": [ | ||
| "^cask \"(?<depName>[a-z0-9][a-z0-9+@._/-]*)\"\\s*$" | ||
| ], | ||
| "datasourceTemplate": "repology", | ||
| "lookupNameTemplate": "homebrew_casks/{{{depName}}}", | ||
| "versioningTemplate": "loose" | ||
| }, |
There was a problem hiding this comment.
In Renovate custom managers, lookupNameTemplate is not a valid configuration option. The correct and standard field name to specify the package name used for lookups is packageNameTemplate.
{
"customType": "regex",
"description": "Homebrew casks in dot_Brewfile",
"managerFilePatterns": ["^dot_Brewfile$"],
Summary
Implements the full dependency monitoring approach: pinned chezmoi externals, Renovate automation, and scheduled vulnerability scanning.
Changes
Pinned archive externals (
.chezmoiexternal.toml)git-repoclones with pinned GitHub archive URLs (tags or commit SHAs).7.1.3v1.29v4.17.0v2.0.10.8.00.36.0v0.2.0Renovate (
.github/renovate.json)brew/cask/golines indot_Brewfile(Repology + Go module index).Requires: install the Renovate GitHub App on this repo.
CI
chezmoi.yml— template render + dry-run apply; pins chezmoiv2.71.0.dependency-audit.yml— weekly OSV-Scanner on downloaded externals; macOS job reports outdated Homebrew packages in the job summary.Docs
Migration
After merge, run once on each machine:
Existing
git-repocheckouts undervim/,zsh/plugins/, andshell/plugins/will be replaced by pinned archives.Test plan
.github/renovate.jsonchezmoi apply --refresh-externalson a dev machine:NERDTreeToggle, zsh syntax highlighting)