public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Justin Wheeler <jwheel@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/hugo] epel10: 📝 docs: Document Dart Sass allow-list requirement
Date: Sun, 15 Nov 2026 10:15:02 GMT	[thread overview]
Message-ID: <179473770255.1.8386454122356444696.rpms-hugo-aaaf7ba16ea2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/hugo
            Branch : epel10
            Commit : aaaf7ba16ea24fad645ed28349610111c4c66406
            Author : Justin Wheeler <jwheel@fedoraproject.org>
            Date   : 2026-11-13T15:35:23-05:00
            Stats  : +12/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/hugo/c/aaaf7ba16ea24fad645ed28349610111c4c66406?branch=epel10

            Log:
            📝 docs: Document Dart Sass allow-list requirement

The README suggested setting `DART_SASS_BINARY` to an absolute path, but
Hugo's `security.exec.allow` policy rejects a path that does not match
an allowed pattern, so that workaround failed with an "access denied"
error.

Recommend putting `sass` or `dart-sass` on `PATH` first, and show the
`security.exec.allow` entry needed when an absolute path is unavoidable.
Both approaches were verified with Dart Sass 1.108.2.

Assisted-by: DeepSeek V4.1 Flash (200K context window)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>

---
diff --git a/AGENTS.md b/AGENTS.md
index 6ea8546..8c223ad 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -80,6 +80,8 @@ Notes:
   Do not add `Recommends: dart-sass` until such a package exists.
 - Packaging Dart Sass from source is not currently feasible: it is written in Dart, Fedora has no Dart SDK, and shipping the prebuilt executable is prohibited.
 - Document the `DART_SASS_BINARY` workaround in `README.md` instead of pretending Sass works out of the box.
+- `DART_SASS_BINARY` with an absolute path is rejected by `security.exec.allow` unless the path is whitelisted.
+  Prefer a bare `sass` or `dart-sass` in `PATH`, which matches the default allow pattern.
 - Without Dart Sass, non-Sass site generation still works.
 
 ## ppc64le patch

diff --git a/README.md b/README.md
index bcb8f6f..052d3d8 100644
--- a/README.md
+++ b/README.md
@@ -44,10 +44,18 @@ Hugo looks for `dart-sass`, `sass`, or `dart-sass-embedded` in `PATH`, and `DART
 
 No Dart Sass package exists in Fedora as of this writing.
 Fedora's weak-dependency policy requires weak dependencies to be satisfiable from the official repositories, so `hugo` cannot declare one yet.
-Install Dart Sass from the upstream release page or from npm (`npm install --global sass`), then make it discoverable, for example:
+Install Dart Sass from the upstream release page or from npm (`npm install --global sass`), then make it discoverable.
+The simplest option is to put a `sass` or `dart-sass` executable in `PATH`:
 
 ```bash
-export DART_SASS_BINARY=/path/to/sass
+export PATH="$HOME/.local/bin:$PATH"
+```
+
+`DART_SASS_BINARY` can point at an absolute path, but Hugo's security policy only allows executables that match `security.exec.allow`, so the path must be whitelisted too:
+
+```toml
+[security.exec]
+allow = ['^(dart-)?sass$', '^/path/to/sass$']
 ```
 
 Without Dart Sass, Hugo still builds sites; only Sass transformations such as `css.Sass` fail.

                 reply	other threads:[~2026-11-15 10:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179473770255.1.8386454122356444696.rpms-hugo-aaaf7ba16ea2@fedoraproject.org \
    --to=jwheel@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox