From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aOicEnczm2MsHQEAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 15:47:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kGLTEXczm2NTsAAAG6o9tA (envelope-from ) for ; Thu, 15 Dec 2022 15:47:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 051DF2732D for ; Thu, 15 Dec 2022 15:47:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5pVR-000409-Ib; Thu, 15 Dec 2022 09:46:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5pVO-0003wI-MX for emacs-orgmode@gnu.org; Thu, 15 Dec 2022 09:46:38 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5pVN-0008NS-2V for emacs-orgmode@gnu.org; Thu, 15 Dec 2022 09:46:38 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1p5pVL-0003NA-Bu for emacs-orgmode@gnu.org; Thu, 15 Dec 2022 15:46:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom variable Date: Thu, 15 Dec 2022 21:46:26 +0700 Message-ID: References: <87359ld5ye.fsf@kyleam.com> <874ju0j538.fsf@localhost> <87len9uj5s.fsf@localhost> <87ilicua53.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: <87ilicua53.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671115639; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SH6/yuJUKHt3o2bVZMDOQmLgs2NsGi+kToxZNj72yRw=; b=L50EscwpDzf5YveaHOjeF0vtcDyV5dwqcLQboV/VHjVS2ifpTjuDHJors/Y8X0eJQ1UVDL S0Uz940OxqflMsjyhX82+JqFmNzysivmDKvPiw/oLkiPrE/Kt3dWHsZKrVSis6MmKtD4Lg JUhPTghD2ZyIYaDs2xkDy4knDNdP5zPI2mvGXB6NF7piXFGfqNdy5F0d/jJECx2mGblA2Y W+DZE3EuzOCT/BeBXhvG6QOwDwO2QwtsDUWpYCqJ9ZXRIyKteoPrRhtL+YH6YDBK7FKqw7 tTe87iyKXRFYRqaBWlIoFJsr2TqFcasoesDBye6+1D+XLsF/v/H3fGqQLv6ZSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671115639; a=rsa-sha256; cv=none; b=iwrrXmm0Y1vh+AwKLSvR34S3djGYPD3BB+2pSfIYn/TyDAfAorAtiSczetPxs3lmsuFuoV 6aKPTvl6gwjbPoAxQHvCoaJTPleFX6ujr8jrzpB2cbznROnSyaOYkCsNzDwilldtSwXM4t HXnJKNGVrG8HFTff7xD+md5l+tS0wrwgBBbwp5hIdmrzRl+hM6k44OOUQpnFYzOZ6gtP1q 2SA346Yq7d6fY+o8dkT3PsPVulofwCRgJRNe1AtdcUHVAi39G8nnnf4I9948p8sthfzs03 wGx4BQ4bVY9Mo7gIGsqCD5oo9vOsvwBRawFnsYXcOx5fVK/VzJFs8gp1tjINDQ== X-Spam-Score: 4.22 X-Migadu-Queue-Id: 051DF2732D X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.22 X-TUID: ylDRJT1m3+7z On 15/12/2022 19:25, Ihor Radchenko wrote: > Max Nikulin writes: > >> I would consider reverting the commit causing user prompt for every >> variable. > > I disagree. If anything, we can set the default value of > `org-confirm-babel-evaluate-cell' to nil and apply this patch. > > Then, we can get the old behaviour back yet allowing concerned users to > have more security. I am leaving it up to you. Form my point of view it will be dead code that increases complexity with no practical outcome. Unfortunately setting `org-confirm-babel-evaluate-cell' to anything other than nil results in annoyance rather than security. Perhaps advising `org-babel-execute-src-block' with `y-or-n-p' is a better treatment for my paranoia. > This patch does not only affect src blocks. It affects all the users of > `org-babel-read'. Mostly it is called with INHIBIT-LISP-EVAL set to t. >> https://list.orgmode.org/Y1uFDWOjZb85lk+3@protected.localdomain >> Re: [BUG][Security] begin_src :var evaluated before the prompt to >> confirm execution > > How is it related to the current discussion? > The purpose of the security feature discussed here is not for web > browsers or anything like that. I am not going to add malicious source blocks to my private org files. For some code it is better to have a prompt, but generally the issue is not excessively important. I tend to inspect org files fetched from net in some other application at first (browser, less, or vim). Accidental evaluation of code is a real danger for those who insist on opening links to org file directly in emacs or even propose to use org as a kind of browser. I raised the security issue in response to passionate messages demanding direct ways to work with org files from the web. I decided to remind the context with hope that it would help to reevaluate severity of the issue. I do not have a better proposal, but I think I see movement in a wrong direction.