Backtestshugorun-20261002-200313#15171

Issue #15171 Merged fix PR # Run 2 Oct 2026 · run-20261002-200313 gohugoio/hugo

Remove -embedded from the default exec.allow

Better

Our patch was judged better than the merged fix.

In this judgment, Patch B = our agent, Patch A = the merged fix.

The issue asks only to remove '-embedded' from the default exec.allow. Patch B does exactly that: it changes the sass regex to '^(dart-)?sass$' and updates the TOML test. It also adds explicit assertions that 'sass' and 'dart-sass' are accepted and 'dart-sass-embedded' and 'sass-embedded' are rejected; the rejection checks would fail before the change and pass after it. B also updates the docs (Babel.md example and docs.yaml) to match the new default. Patch A makes the same sass change but also removes '^tailwindcss$' from the default allow list. That is an unrequested behavior change: every TailwindCSS user would need to add tailwindcss to security.exec.allow, which is a breaking change outside the issue's scope. A has to patch three integration tests with custom security.exec.allow settings just to keep them passing, which shows the regression it introduces. A also leaves the node permissions defaults referencing tailwindcss, which is now inconsistent with its own allow list. A adds no meaningful new test of the -embedded removal beyond the TOML string update. B is correct, narrowly scoped, better tested, and keeps the docs consistent.

The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.

Solve

32m 19s

Wall-clock time in the container

Full test suite

No new failures

3,694 passed · 99 skipped · 3,802 total

Contamination audit

Clean

No sign the agent saw the real fix

Patch size

18vs 15 merged

Changed lines, ours vs merged

Not relevant anymore.

The two patches

Our patch+11 −7
config/security/securityConfig.goindex 510abe6bb..06d7287a5 100644@@ -39,10 +39,10 @@ const securityConfigKey = "security" var DefaultConfig = Config{ 	Exec: Exec{ 		Allow: MustNewWhitelist(-			"^(dart-)?sass(-embedded)?$", // sass, dart-sass, dart-sass-embedded.-			"^go$",                       // for Go Modules-			"^git$",                      // For Git info-			"^node$",                     // Used as the runtime for Node tools.+			"^(dart-)?sass$", // sass, dart-sass.+			"^go$",           // for Go Modules+			"^git$",          // For Git info+			"^node$",         // Used as the runtime for Node tools. 			"^postcss$", 			"^tailwindcss$", 		),config/security/securityConfig_test.goindex 69feae858..14c3339f6 100644@@ -135,7 +135,7 @@ func TestToTOML(t *testing.T) { 	got := DefaultConfig.ToTOML()  	c.Assert(got, qt.Equals,-		"[security]\n  allowContent = ['! ^text/html$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^git$', '^node$', '^postcss$', '^tailwindcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    urls = ['(?i)^https?://[a-z0-9]', '! ^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false",+		"[security]\n  allowContent = ['! ^text/html$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass$', '^go$', '^git$', '^node$', '^postcss$', '^tailwindcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    urls = ['(?i)^https?://[a-z0-9]', '! ^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false", 	) } @@ -149,6 +149,10 @@ func TestDecodeConfigDefault(t *testing.T) { 	c.Assert(pc.Exec.Allow.Accept("a"), qt.IsFalse) 	c.Assert(pc.Exec.Allow.Accept("node"), qt.IsTrue) 	c.Assert(pc.Exec.Allow.Accept("npx"), qt.IsFalse)+	c.Assert(pc.Exec.Allow.Accept("sass"), qt.IsTrue)+	c.Assert(pc.Exec.Allow.Accept("dart-sass"), qt.IsTrue)+	c.Assert(pc.Exec.Allow.Accept("dart-sass-embedded"), qt.IsFalse)+	c.Assert(pc.Exec.Allow.Accept("sass-embedded"), qt.IsFalse)  	c.Assert(pc.HTTP.URLs.Accept("https://example.org"), qt.IsTrue) 	c.Assert(pc.HTTP.Methods.Accept("POST"), qt.IsTrue)docs/content/en/functions/js/Babel.mdindex 26b5a16e7..1b04c8fc4 100644@@ -51,7 +51,7 @@ Step 5    {{< code-toggle file=hugo >}}   [security.exec]-    allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^git$', '^node$', '^postcss$', '^tailwindcss$', '^babel$']+    allow = ['^(dart-)?sass$', '^go$', '^git$', '^node$', '^postcss$', '^tailwindcss$', '^babel$']   {{< /code-toggle >}}  Step 6docs/data/docs.yamlindex 19b950dd5..43733812d 100644@@ -2224,7 +2224,7 @@ config:     enableInlineShortcodes: false     exec:       allow:-      - ^(dart-)?sass(-embedded)?$+      - ^(dart-)?sass$       - ^go$       - ^git$       - ^node$ 
Merged fix · PR #+9 −6
config/security/securityConfig.goindex 510abe6bb..daf642129 100644@@ -39,12 +39,11 @@ const securityConfigKey = "security" var DefaultConfig = Config{ 	Exec: Exec{ 		Allow: MustNewWhitelist(-			"^(dart-)?sass(-embedded)?$", // sass, dart-sass, dart-sass-embedded.-			"^go$",                       // for Go Modules-			"^git$",                      // For Git info-			"^node$",                     // Used as the runtime for Node tools.+			"^(dart-)?sass$", // sass, dart-sass+			"^go$",           // for Go Modules+			"^git$",          // For Git info+			"^node$",         // Used as the runtime for Node tools. 			"^postcss$",-			"^tailwindcss$", 		), 		// These have been tested to work with Hugo's external programs 		// on Windows, Linux and MacOS.config/security/securityConfig_test.goindex 69feae858..8318d5d6f 100644@@ -135,7 +135,7 @@ func TestToTOML(t *testing.T) { 	got := DefaultConfig.ToTOML()  	c.Assert(got, qt.Equals,-		"[security]\n  allowContent = ['! ^text/html$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^git$', '^node$', '^postcss$', '^tailwindcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    urls = ['(?i)^https?://[a-z0-9]', '! ^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false",+		"[security]\n  allowContent = ['! ^text/html$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass$', '^go$', '^git$', '^node$', '^postcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    urls = ['(?i)^https?://[a-z0-9]', '! ^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false", 	) } resources/resource_transformers/cssjs/tailwindcss_integration_test.goindex 03cd1e07e..21702c303 100644@@ -28,6 +28,7 @@ func TestTailwindV4Basic(t *testing.T) {  	files := ` -- hugo.toml --+security.exec.allow = ['^go$', '^git$', '^node$', '^tailwindcss$'] -- package.json -- {   "license": "MIT",@@ -72,6 +73,7 @@ func TestTailwindCSSImportContext(t *testing.T) { 	files := ` -- hugo.toml -- disableKinds = ['page','rss','section','sitemap','taxonomy','term']+security.exec.allow = ['^go$', '^git$', '^node$', '^tailwindcss$'] -- assets/css/main.css -- @import "tailwindcss"; @@ -112,6 +114,8 @@ func TestTailwindCSSNoInlineImportsIssue13719(t *testing.T) { disableKinds = ['page','rss','section','sitemap','taxonomy','term'] theme = 'my-theme' +security.exec.allow = ['^go$', '^git$', '^node$', '^tailwindcss$']+ [[module.mounts]] source = 'assets' target = 'assets'