Skip to content

Commit 5767dde

Browse files
committed
fix: hugo v0.161 insufficient tailwind security perms
1 parent 9b2abe3 commit 5767dde

12 files changed

Lines changed: 26 additions & 22 deletions

File tree

.devcontainer/base.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM mcr.microsoft.com/devcontainers/go:1.22-bookworm
55

66
ARG NODE_VERSION=22
77
ARG PNPM_VERSION=10.14.0
8-
ARG HUGO_VERSION=0.161.0
8+
ARG HUGO_VERSION=0.161.1
99

1010
ENV DEBIAN_FRONTEND=noninteractive
1111
ENV PNPM_HOME=/home/vscode/.local/share/pnpm

.github/workflows/devcontainer-image.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ on:
1414

1515
env:
1616
IMAGE_NAME: ghcr.io/hugoblox/hugo-blox-dev
17-
# Hugo >= 0.161.0 requires Node >= 22 for css.TailwindCSS Node permissions.
18-
DEFAULT_HUGO_VERSION: 0.161.0
17+
# Hugo >= 0.161.1 required: 0.161.0 introduced the Node permission
18+
# sandbox without an allowChildProcess field, blocking spawns under
19+
# tailwindcss (e.g. @parcel/watcher → detect-libc → getconf on Linux).
20+
DEFAULT_HUGO_VERSION: 0.161.1
1921
NODE_VERSION: 22
2022
PNPM_VERSION: 10.14.0
2123

modules/blox/hugo.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,13 @@ security:
7272
- ^HUGO_
7373
# Allow continuous integration vars
7474
- ^CI$
75-
node:
76-
permissions:
77-
# Hugo's default allowChildProcess regex permits tailwindcss/npx but not
78-
# `getconf`. @tailwindcss/cli pulls in @parcel/watcher, whose bundled
79-
# detect-libc@1 synchronously spawns `getconf GNU_LIBC_VERSION` at
80-
# require time on Linux to pick glibc vs musl prebuilds. Without this
81-
# entry, Ubuntu CI fails with ERR_ACCESS_DENIED while macOS works
82-
# (detect-libc short-circuits on Darwin).
83-
allowChildProcess: ^(tailwindcss|npx|getconf)$
75+
# Note: security.node.permissions is intentionally NOT set here. Hugo
76+
# >= 0.161.1's built-in defaults permit `tailwindcss` for allowAddons,
77+
# allowChildProcess, and allowWorker — sufficient for @tailwindcss/cli's
78+
# transitive spawns (e.g. @parcel/watcher → detect-libc → getconf on
79+
# Linux). The hugoVersion.min below pins to 0.161.1 because 0.161.0
80+
# introduced the Node permission sandbox without an allowChildProcess
81+
# field, so all spawns under tailwindcss were blocked on Linux.
8482
outputFormats:
8583
backlinks:
8684
mediaType: application/json
@@ -115,7 +113,11 @@ module:
115113
# 0.161.0 introduced css.TailwindCSS Node.js permission sandbox
116114
# (Node >= 22 required) and dropped support for the standalone
117115
# tailwindcss binary. The npm @tailwindcss/cli package is required.
118-
min: "0.161.0"
116+
# 0.161.1 added security.node.permissions.allowChildProcess (default
117+
# ['tailwindcss']); 0.161.0 has no way to permit any child process,
118+
# so spawns under tailwindcss (e.g. @parcel/watcher's detect-libc →
119+
# getconf on Linux) are blocked with ERR_ACCESS_DENIED.
120+
min: "0.161.1"
119121
extended: true
120122
imports:
121123
- path: github.com/HugoBlox/kit/modules/analytics

templates/academic-cv/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/data-science-blog/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/dev-portfolio/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/documentation/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/link-in-bio/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/markdown-slides/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

templates/resume/.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
VERSION=$(yq '.build.hugo_version // ""' hugoblox.yaml 2>/dev/null | grep -v '^null$' || true)
6666
6767
# Fallback to a known stable version if not specified
68-
DEFAULT_VERSION="0.161.0"
68+
DEFAULT_VERSION="0.161.1"
6969
VERSION=${VERSION:-$DEFAULT_VERSION}
7070
7171
# Validate version format (basic check)

0 commit comments

Comments
 (0)