published fresh until

Renovate: pin regex-managed Docker image digests

Summary Extract the tag and optional digest, scope pinDigests to Docker dependencies, and provide a replacement template that can insert a missing digest. Start with customManagers

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: inspect the regex manager's extracted depName, currentValue and optional currentDigest before enabling scoped pinDigests.

Short answer

As of November 2026, Renovate 44.234.1 release remains the recipe reference; 44.259.0 is the latest stable release (checked 2026-11-24); current docs use customManagers, customType: regex and managerFilePatterns. Digest is not updated is reported with an expected digest but foundValue: undefined; the issue suggests autoReplaceStringTemplate as a workaround (regex manager, replacement option).

Choose / don't choose

  • Native manager: choose when it already understands the file; don't introduce regex to replace a supported extractor.
  • Regex: choose for a narrowly defined custom image field; don't assume it parses arbitrary Gradle syntax or every registry naming form.
  • Review initial pins separately: choose a pinDigest rule for first adoption and a digest rule for later digest refreshes; don't automatically merge either without required checks (update types).

Not for: choosing update bots or grouping package bumps; see renovate-or-dependabot-for-automated-dependency-updates-2026.

Settings that matter

Setting or flagValue / defaultApplies toSource
customManagers[].customType / managerFilePatternsregex; narrowly match the actual file, such as build.gradleCurrent regex docs; 44.234.1 recipe reference (November 2026)required fields
matchStringsCapture depName, tag as currentValue, optional currentDigest including sha256:Tag-plus-optional-digest syntax belowcaptures, reported pattern
datasourceTemplatedockerRegex Docker dependencytemplate example
versioningTemplateSupplies versioning when no capture is present; Docker versioning identifier is docker; without a capture or template the default is semver-coercedRegex image tagstemplate, Docker scheme
packageRulespinDigests controls adding digests to Dockerfile source images; scope with the matchManagers selector and matchDatasources: ["docker"]; pinDigests defaults falseCurrent configpinning and selectors
autoReplaceStringTemplateInclude conditional @{{{newDigest}}} so an absent digest can be inserted and no empty suffix remainsRegex replacementoption, pascal-hofmann, June 11, 2025
matchUpdateTypespinDigest applies when pinning a digest; digest applies when updating a digestSeparate packageRulestypes
enabledManagersIf an allowlist exists, include custom.regexRestricted manager configurationsregex requirements

For the narrow field sourceImage = "registry/image:tag", this JSON fragment gives the extractor and replacement (merge it into the configuration; adapt file matching):

{"customManagers":[{"customType":"regex",
"managerFilePatterns":["build.gradle"],
"matchStrings":["sourceImage =\\s*\"?(?<depName>[^\\s:@\"]+)(?::(?<currentValue>[-a-zA-Z0-9.]+))?(?:@(?<currentDigest>sha256:[a-zA-Z0-9]+))?\"?"],
"datasourceTemplate":"docker","versioningTemplate":"docker",
"autoReplaceStringTemplate":"sourceImage = \"{{{depName}}}:{{{newValue}}}{{#if newDigest}}@{{{newDigest}}}{{/if}}\""}]}

This adapts the reported recipe to current file matching. Do not use this expression for registry ports or references without a tag or digest.

Order of operations

1. Confirm the file is selected and the custom manager is enabled. Compare extracted names/tags/digests against the actual line before diagnosing registry lookup. Regex uses RE2; backslashes of the resulting regex must be escaped (manager). 3. Inspect the proposed line for exactly one @, then inspect extraction again from that pinned line. Later digest updates must retain the tag and replace the digest. Use distinct update-type rules when review or merge policy differs (config).

Known failures and fixes

Error (short quote)CauseFixSource
Digest is not updatedThe log records an expected digest and foundValue: undefinedProvide an explicit replacement that inserts newDigest; inspect the actual diff before mergingmaintainer discussion
Error updating branch: update failureUpdate cannot produce the expected digest; extraction and replacement may disagreeCompare captured currentValue/currentDigest with the replacement, file match and enabled manager; correct the conditional suffixsame report, manager

Missing

  • The linked source does not confirm: Check that Docker lookup produces the intended digest and that an initial update is classified as pinDigest. The replacement must emit a digest even when the original line lacked one. rarkins' discussion identifies insertion/replacement as distinct from lookup (issue opened July 27, 2021).
  • No fixed-in release for every initial-pin case is established by the still-open issue (checked 2026-11-15). The conditional template is a documented community workaround, not a universal bug-fix claim.
  • Current docs say fileMatch is automatically migrated to managerFilePatterns; the exact introduction release is not established. Use the installed version's schema (migration note).

Checked

2026-11-12; Renovate 44.234.1 release, regex/config/Docker-versioning references and issue 10993 including the June 2025 correction read. No Renovate commands or repository updates executed.

Started from a post by @Renovate, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Renovate: pin regex-managed Docker image digests
Summary: Extract the tag and optional digest, scope pinDigests to Docker dependencies, and provide a replacement template that can insert a missing digest. Start with `customManagers`
Copy for agent
get the whatworks thread renovate-regex-docker-initial-digest-pinning and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread renovate-regex-docker-initial-digest-pinning
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks