From nobody Mon Dec 27 08:31:31 2021 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0C6B4190FE76 for ; Mon, 27 Dec 2021 08:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JMrVW5CtZz4dHK; Mon, 27 Dec 2021 08:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92DD41AC4E; Mon, 27 Dec 2021 08:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BR8VVTn082460; Mon, 27 Dec 2021 08:31:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BR8VVWO082459; Mon, 27 Dec 2021 08:31:31 GMT (envelope-from git) Date: Mon, 27 Dec 2021 08:31:31 GMT Message-Id: <202112270831.1BR8VVWO082459@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: 0372c6063e - main - Add new security configuration to Hugo configuration. List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0372c6063ec1e3903957ae5a4382ae62ff8bb90a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640593891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vt/0DpnJ5owDZzmr5Jd5GMMCgAfdtuBKagubI7dTCOk=; b=RzNrdA4W4V8/+iOxHrBfAxKnedz9udhkfgoy/4LZ5ifyop66HXPDGtRzBYiK0ILiuf3ohj kC36tHL4ZnZ/0+MKnZ5r3zvDzO+2iWxpaaiqjfgxZdgBdhYQH/aSMxY406BQM19wCIR8dT cl3xSLmWkpkCpAX+a/SPMlYy4ILdU5QU8KALwswv5LR1ZHJ3VDKAz32/1mrU2It1RkLid4 CVuM3hjwEbrSrZ/TSn5nbjP2DVt/jSBN1DrzdVumsQt+lAWZtgTfOPcQ/YGboIYokXq4bG yHWqahnHqVwYCzy/QGaOwZjWEKtt1BbK07qT35FEY07PD3eBVz8WCHPpcfbhdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640593891; a=rsa-sha256; cv=none; b=axmp/ngQdGt8vXSGuIFYsraOPAqVQrAUCdANs5icZ4HLbooHKeLunXTWZK6wRSWLEVuIw+ LBxix1bD70iL7efFQ5hqg29fIRnyGPgou0sxMi8OEmSK7wdoUlCoqqwUm5Qn/ggzrvio5w 3ElZKQyRSmnFO3wOznooNy6TxGHt5nA3qzHc8/KkxPGTKyonC64pGF/55GmGbY4PRKieJA 5C3dtEBUR3GNx5Hv2NaRz9dVefdD0iUqJTN8hcG6OmBWTX3DLdJGRxu7Rmqp6SEJ1MTE6Z jMM5l461q2CkljlFI3m6PSEEwQD6jv2aY6Igy4305FluAyysc/J8g53HFb8Huw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by carlavilla: URL: https://cgit.FreeBSD.org/doc/commit/?id=0372c6063ec1e3903957ae5a4382ae62ff8bb90a commit 0372c6063ec1e3903957ae5a4382ae62ff8bb90a Author: Sergio Carlavilla Delgado AuthorDate: 2021-12-27 08:24:10 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2021-12-27 08:24:10 +0000 Add new security configuration to Hugo configuration. Hugo added a security policy in 0.91 version to restric access to os/exec, remote communication and similar as can be readed here[1] * Allow the use of AsciiDoctor to 'exec' * Add 'LOAD_PATH' and 'RUBYLIB' to 'osEnv' variables to allow the use of custom AsciiDoctor extensions Reported by: Li-Wen Hsu [1] https://gohugo.io/about/security-model/ --- documentation/config/_default/config.toml | 11 +++++++++++ documentation/config/offline/config.toml | 11 +++++++++++ website/config/_default/config.toml | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/documentation/config/_default/config.toml b/documentation/config/_default/config.toml index 4ed0f325b4..3ba167405b 100644 --- a/documentation/config/_default/config.toml +++ b/documentation/config/_default/config.toml @@ -18,6 +18,17 @@ googleAnalytics = 'UA-22767463-1' description = "FreeBSD Documentation Portal" isOnline = true +[security] + enableInlineShortcodes = false + [security.exec] + allow = ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] + osEnv = ["(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|LOAD_PATH|RUBYLIB)$"] + [security.funcs] + getenv = ["^HUGO_"] + [security.http] + methods = ["(?i)GET|POST"] + urls = [".*"] + [markup.asciidocExt] extensions = ["man-macro", "inter-document-references-macro", "cross-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"] [markup.asciidocExt.attributes] diff --git a/documentation/config/offline/config.toml b/documentation/config/offline/config.toml index b34b7e4ae8..f359e2ad7e 100644 --- a/documentation/config/offline/config.toml +++ b/documentation/config/offline/config.toml @@ -17,6 +17,17 @@ enableRobotsTXT = true description = "FreeBSD Documentation Portal" isOnline = false +[security] + enableInlineShortcodes = false + [security.exec] + allow = ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] + osEnv = ["(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|LOAD_PATH|RUBYLIB)$"] + [security.funcs] + getenv = ["^HUGO_"] + [security.http] + methods = ["(?i)GET|POST"] + urls = [".*"] + [markup.asciidocExt] extensions = ["man-macro", "inter-document-references-macro", "cross-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"] [markup.asciidocExt.attributes] diff --git a/website/config/_default/config.toml b/website/config/_default/config.toml index 272afe11ed..0cc3cf6b4a 100644 --- a/website/config/_default/config.toml +++ b/website/config/_default/config.toml @@ -19,6 +19,17 @@ preserveTOC = true preserveTOC = true extensions = ["man-macro", "inter-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"] +[security] + enableInlineShortcodes = false + [security.exec] + allow = ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] + osEnv = ["(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|LOAD_PATH|RUBYLIB)$"] + [security.funcs] + getenv = ["^HUGO_"] + [security.http] + methods = ["(?i)GET|POST"] + urls = [".*"] + staticDir = ["static", "shared"] [outputs]