From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id B02BF20E0D; Thu, 13 Nov 2025 19:09:48 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id D5EC220DE0; Thu, 13 Nov 2025 19:09:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) by atuin.qyliss.net (Postfix) with ESMTPS id 0080920DDE for ; Thu, 13 Nov 2025 19:09:43 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 22994EC022A; Thu, 13 Nov 2025 14:09:42 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 13 Nov 2025 14:09:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1763060982; x=1763147382; bh=DYfqK5yaDF +psRphysqX5C5jTLGrl99HhLpKD20xdGQ=; b=bQ+kunuvhZBuyQLT1hii6ZXUCZ idIcZxmx1lm221nuCACvTdQMctbx5AabUs6vQ5GnJi7l8Ut9bipbKjZH45jJZOcy QyCO+XQ9yO5B41FqGC9/0k5epIU00osRb9q18U5y3Mouy9ESBcfm2vzJg6D2npkJ tPZx7uJYGMWuiiM1N4HbfmfOhgs1b97QVH0lihzE0yxodHn3yPtefQlRj1bRJlte AiCP9+J0qDB8XO7gexve/mH1T3hHOlyN5hJGpaiRr1sgxhy53IJQ/RsbFnLdgBQc IrMXfm2cxqsoI8b2rStH536mWJSIPn1VwvGiYYR/fbLFmZTUd74MCctpo8/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1763060982; x=1763147382; bh=DYfqK5yaDF+psRphysqX5C5jTLGrl99HhLp KD20xdGQ=; b=wlWeQaJRlHpDytICyvk67HXlsikcrKD1FGA9jYproG5ghfm/U0k JTHQm/nQvkenWdz3cyvz4yrd5Yfa61VUjweNSQby6PocT+H2F0MfS0sFnmSY/8DD pDi8Kup2zm3nltEtMwK2DRyZdl3jtjjHlDs6ZWrhsx4n1sNGiOzi+5IWsVLeoGuZ Qr/e7+M7rh7EgqCVdgDbzZJof+4w4ouf3QE8XTZnvXnMNaMT6tS9SQjpS/ATdDEk 0d0UN73wAxf0m1O5TXJLXfyW9L4uJX/tTb4MtaCtklTKQHPP7xRpYoCffYzuKspm YLg9GqWBam6wsX8k7AmVXVQfHsYbPOM2Heg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvtdejjeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeeiudffue eilefgtefgtddttdekkeehkefgheekudefveetgeefiefftedvteeuveenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Nov 2025 14:09:41 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id A5DEB194D8F1; Thu, 13 Nov 2025 20:09:39 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v2 5/8] release: Create directory with system update In-Reply-To: References: <20251112-updates-v2-0-88d96bf81b79@gmail.com> <20251112-updates-v2-5-88d96bf81b79@gmail.com> <87frahapgp.fsf@alyssa.is> Date: Thu, 13 Nov 2025 20:09:38 +0100 Message-ID: <87a50pbvgt.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: BWL4EAU4MGFHAVWL274PETCWFZ3J6OIL X-Message-ID-Hash: BWL4EAU4MGFHAVWL274PETCWFZ3J6OIL X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 11/13/25 11:04, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> combined =3D callSpectrumPackage release/combined/run-vm.nix {}; >>> }) (_: {}) >>> diff --git a/release/update.nix b/release/update.nix >>> new file mode 100644 >>> index 0000000000000000000000000000000000000000..ec51eb12d33030255b7b4a7= e74e14416f1f0659d >>> --- /dev/null >>> +++ b/release/update.nix >>> @@ -0,0 +1,30 @@ >>> +# SPDX-License-Identifier: MIT >>> +# SPDX-FileCopyrightText: 2021-2024 Alyssa Ross >>> +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour >>> + >>> +import ../lib/call-package.nix ( >>> +{ callSpectrumPackage, config, efi >>> +, runCommand, stdenv, rootfs >>> +}: >>> + >>> +runCommand "spectrum-update-directory" { >>> + __structuredAttrs =3D true; >>> + unsafeDiscardReferences =3D { out =3D true; }; >>> + dontFixup =3D true; >>> + env =3D { >>> + VERSION =3D config.version; >>> + ROOTHASH =3D "${rootfs}/rootfs.verity.roothash"; >>> + VERITY =3D "${rootfs}/rootfs.verity.superblock"; >>> + ROOT_FS =3D "${rootfs}/rootfs"; >>> + EFI =3D efi; >>> + }; >>=20 >> I'd just inline these as string interpolations rather than passing them >> as environment variables (except maybe VERSION). > > In general, this is very bad practice and has caused security > vulnerabilities in GitHub Actions. These have even been exploited in > the wild. However, this is *not* a vulnerability in this context as > the input is trusted and known not to contain shell metacharacters. > I mostly wanted to avoid bad habits that are fine in the Nix context, > but not in others. I think that will result in overly unidiomatic Nix code. Bad practices are always contextual. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaRYs8gAKCRCZddwkt31p FbMBAQDl7hGpHfFhgUoRobz7uzxsxzVEVsM9TqaeGEKU7bpq0gEA9OARR+8HLD8V nbtvlDM3lTo8chGGhUS7lML3Z6UUlww= =cLPr -----END PGP SIGNATURE----- --=-=-=--