Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122888 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 3D1801A009C for ; Tue, 2 Apr 2024 18:28:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712082553; bh=4HPoO7cxJkohCJ7y7lG7BcptUxT1eN3biXCKTe8upcA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jHsFJ3T0sIzWHCevK2WAEnlBh3TQaz/VI0EG0kzIBogDmMwoED/BI4Orw7DtvJEP6 /Bv2XprRbuFtLgEfwdThQBZBXqNSMXX4Le5hRosxiUFEIrAMG7tGmrYSQ4v8HpwI4P jnnYNalLYDYfGTDjzvUkkVMrpOCzrfnU80sd5+EbVFnWJdGQILfd+urDWCnu8GGQap 4ZfLB/d0xSU6UucaUBn0btY1dY+4yQxuopq49bdZx7V/VBCwk0otbiDBVNVWRqyULN yXFo9OYevz0ZDvMApjxfP+F9XxjQ1zxxa4wwBWa/mS/tQ6mVYSF/gV418x6VrmElVZ pRzTBRGLnar6g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 55CD6180C37 for ; Tue, 2 Apr 2024 18:29:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50,DMARC_MISSING, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 2 Apr 2024 18:29:10 +0000 (UTC) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-56df1dbb15dso1178032a12.3 for ; Tue, 02 Apr 2024 11:28:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712082521; x=1712687321; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ti9b8YV+zcy/DMOvllcCke4XHHQdZBK35BxsE14szr0=; b=Ce+TfLs2dRw3ofXvwtndUucvxBSGi/JQb4kfqlSN9ahAUSf4j2zEQWxCADhwlClcvn Ks/wsY8u83NkfZL3ex+CCRgPlqR2NN2Ej8RSio8A4uiT/WYl8B4UdxeceeYAxFi571pz VelQQ5H/pVc0oSYirRl5biIl3sLzN3OOIDu6bexNlgu6HV2vNZGttkog1lOJk2JxrQ59 uY7Vb4w0kBoEOL6ZL35bcKrhc7ttTtEHBniavCebA3nNA+po0mClLgRqbkDyPE3DZQ5R dIfhne32ir08qCBRT7h1oAPy3byUKyvF2qzvT6DwUEAx5PA6uaL370UgvwouxcLh6/bK XgKw== X-Gm-Message-State: AOJu0Yw/+7bLA1GFE6f0MKqGwSAkVuz0b0MP/JKStGsl5DnHOqX1UIGu zkvMSSKUIIA+8DT5OveRbLwOgL4Q+UE973+pTWhxV0I/2ae+KvD8xczS/YjluAoOeaOM/wgUihP h6YqocYQM9rUQsuaLg1RG7Ki1zsU= X-Google-Smtp-Source: AGHT+IGoFhEwLdq95Zzi65TclTuikvtRL4vEMKY4MJDom6g3dEMbA302omWkziQHf6aUmlCT29Ken8bgUH9kwk3ALP0= X-Received: by 2002:a05:6402:35d0:b0:56d:c928:ad76 with SMTP id z16-20020a05640235d000b0056dc928ad76mr6236594edc.26.1712082521185; Tue, 02 Apr 2024 11:28:41 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <9008050F-4EE1-4E19-B513-654602E118A7@benramsey.com> <95c92b6a-6788-fddb-a130-e4d122338b68@php.net> In-Reply-To: Date: Tue, 2 Apr 2024 18:28:30 +0000 Message-ID: Subject: Re: [PHP-DEV] Consider removing autogenerated files from tarballs To: Stanislav Malyshev Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000080647c061521466e" From: bukka@php.net (Jakub Zelenka) --00000000000080647c061521466e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Apr 2, 2024 at 7:14=E2=80=AFPM Stanislav Malyshev wrote: > Hi! > > That is something PHP is missing atm, no one can verify the build process >> for releases. >> > > Yes that's what I was suggesting. This should be done by RM. In that way, > the RM becomes more someone that verifies the build and not the actual > person that provides the build. > > I'm not sure though how the RM can really verify it. I mean, we have the > tar blob that comes from the git repo - which we assume is legit. We also > have some files that aren't in the repo. If RM builds them by themselves > then the question comes up what if RM's environment is compromised and > something bad is injected. If RM receives the files from outside source, > how the RM verifies they are genuine? I don't think reading through the > whole "configure" file and verifying it's not bad is realistic for any > person. And from what I understand, "configure" and such are quite > environment-dependant, so you can't just have a standard hash to compare > to. You can't have the RM to just run "buildconf" again and do hash check > because they may get different bits than the ones coming from the outside= , > like CI. I dunno, maybe if we had some kind of Docker image for generatin= g > it that would produce reproducible result, that'd be possible? Otherwise = I > am still not sure how the verification procedure looks like. > Yeah as I already noted that it needs to be reproducible so the RM would need to have exactly the same version of all build tools as used in CI. I think the only option would be to use Docker image for that. We could then use the same image in CI (job container). In such way we should be able to implement the same process (there might some extra bits to do but I think it should be doable in general). We could potentially store the produced hashes to some CI artifact and possibly also make it available from the downloads server (once downloaded from CI) so the RM could have a script that just automatically compare all hashes. So the ideal scenario would be that RM just runs a command that will do all for them. > Right now as I understand we're simply trusting the RM that they have > uncompromised environment and third parties have no way to verify it's th= e > case. But I guess it's time we do better? > Yes exactly that. Currently the RM can change the build as they want so if they are compromised, then we might have the same issue that happened to XZ= . Regards Jakub --00000000000080647c061521466e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Tue, Apr 2, 2024 at 7:14=E2=80=AFPM Stanislav M= alyshev <smalyshev@gmail.com&= gt; wrote:
=20 =20 =20

Hi!


That is something PHP is missing atm, no one can verify the build process for releases.

Yes that's what I was suggesting. This should be done by RM. In that way, the RM becomes more someone that verifies the build and not the actual person that provides the build.

I'm not sure though how the RM can really verify it. I mean, we have the tar blob that comes from the git repo - which we assume is legit. We also have some files that aren't in the repo. If RM builds them by themselves then the question comes up what if RM's environment is compromised and something bad is injected. If RM receives the files from outside source, how the RM verifies they are genuine?=C2=A0 I don't think reading through the whole "= configure" file and verifying it's not bad is realistic for any person. And from what I understand, "configure" and such are quite environment-dependant, so you can't just have a standard hash to compare to. You can't have the RM to just run "buildconf&quo= t; again and do hash check because they may get different bits than the ones coming from the outside, like CI. I dunno, maybe if we had some kind of Docker image for generating it that would produce reproducible result, that'd be possible? Otherwise I am still not sure how the verification procedure looks like.


Yeah as I already noted that it needs to be reproducib= le so the RM would need to have exactly the same version of all build tools= as used in CI. I think the only option would be to use Docker image for th= at. We could then use the same image in CI (job container). In such way we = should be able to implement the same process (there might some extra bits t= o do but I think it should be doable in general). We could potentially stor= e the produced hashes to some CI artifact and possibly also make it availab= le from the downloads server (once downloaded from CI) so the RM could have= a script that just automatically compare all hashes. So the ideal scenario= would be that RM just runs a command that will do all for them.
= =C2=A0

Right now as I understand we're simply trusting the RM that they have uncompromised environment and third parties have no way to verify it's the case. But I guess it's time we do better?

=

Yes exactly that. Currently the RM c= an change the build as they want so if they are compromised, then we might = have the same issue that happened to XZ.

Regards

Jakub


--00000000000080647c061521466e--