From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 8Dc4NvUfn2PEowAAbAwnHQ (envelope-from ) for ; Sun, 18 Dec 2022 15:13:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GLEANvUfn2OepAAAauVa8A (envelope-from ) for ; Sun, 18 Dec 2022 15:13:09 +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 B573B1CDD9 for ; Sun, 18 Dec 2022 15:13:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6uP1-0005q7-Ov; Sun, 18 Dec 2022 09:12:32 -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 1p6uOo-0005p5-Ua for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 09:12:21 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6uOm-0004cZ-Qi for emacs-orgmode@gnu.org; Sun, 18 Dec 2022 09:12:18 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 191FE240101 for ; Sun, 18 Dec 2022 15:12:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671372734; bh=pBzRciq/l8Li5gs/o2rEgpqcVXYq2qXZ25yux++vQ4k=; h=From:To:Cc:Subject:Date:From; b=aTWHk3XiFCr5v28f0jP0nmd+k0mnAXpst++t9Xk5g2Te1XETmn/cvdtzjPQr6Bsyg 9ZfyP8Ogmdl5QgLI1mCMr2TPwSKTkDhax4z7tqfX0J+BzyD8oBTK5xhNcCewgJYAQv h1rJ2dP1c+jDsASOK6DgGRAcUtxK5mhNNMaj82LEciUsfgj3hV2q6CPXacg6gXO6DR JjPcK/7QAtZLQUvpCLYOgTEyIoyrnpdwgw33liziJkRA1DW25OyVMH8VZ0Y4hUu6Dr AxbTTyHnocrvjR9EGr62Jj4XzJtZHAovrGuvZVbmrJDbeKuED0a1xnnTf19XT86OuJ kv/WRtNQBVRFg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZlCJ35Hqz9rxG; Sun, 18 Dec 2022 15:12:12 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom variable In-Reply-To: References: <87359ld5ye.fsf@kyleam.com> <874ju0j538.fsf@localhost> <87len9uj5s.fsf@localhost> <87ilicua53.fsf@localhost> Date: Sun, 18 Dec 2022 14:12:07 +0000 Message-ID: <87mt7k6bt4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=aTWHk3Xi; dmarc=pass (policy=none) header.from=posteo.net; 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=1671372789; a=rsa-sha256; cv=none; b=R3/z8OTSZUqDVw8qIbpMFz8lma5R6G8QuMr8a5iIz9GY4VkwxDWy6Gb7534Q4yRZ8pv3sM 1O+Iokrrbr7nqsGZ49TNDWtAimz+mnWfxE1g/mjcoQgTTBJaT+sZ5JwO+IxQ31pO8+18lz uvX2e8RDYL9PBV6ZrdID05OocxIPpQ7d1EBgdHaCKF8wQkIxRC0nCaefokFK0tV1Y/2pDD SDF5lOX7R5s2h9byx6tGQwfcQwHUZjEnUrwe+F8q9DBOGk3cyEOwwJpu2GU997nGdYNfKs iMh5keMYUVSRlAU2qGnFgNhsaCISAYeerg2RUTWOkwoUBRTIp58hvluaMcG17Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671372789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cff0lUSjkEAP2Nt511woZV2kEdB7hUSZccXssu1tkkE=; b=YZ9b69w0hHiJN4JQv+97eelZKG6yq7uXcVwgGacD4JrgoEcowe1vkGAlqF5AAkxMidHvsO tY7oy3+rtr3eFWURaIkyFNjJDU3vywDdPv+GB2wbcIfXJ/l9yDfylK1jshkx0zNR0P2W1O 0Kxz4OKnRM11f4ikeHQRbPHmXU+d5H6yVNNvkUPwSMtEyLwAGuVZg0ivEMd9qI+FWzWcMa TOkkMHu4nn+ppMIOntKGw0G4grxUD/6rvPPrlofJWmKGPLjT17N7sThuxVV0MaTuhzmbSh NhLTLGbtm/qc+8fZBpJYU0h/1DWk5rNVzy7rmuivWau2+n0zQpw7bEYS1X1Lyw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=aTWHk3Xi; dmarc=pass (policy=none) header.from=posteo.net; 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-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.41 X-Spam-Score: -4.41 X-Migadu-Queue-Id: B573B1CDD9 X-TUID: t31Jlktm6Qkf Max Nikulin writes: >> 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. To clarify, I do not consider this patch to be the end state of security handling. I do plan to extend the code evaluation query in a way that it can be used to allow "All" in current command call, session, + mark files as safe, similar to `org--confirm-resource-safe'. Just not yet in this release. So, I don't think that the code is going to be dead. The new variable is also in line with the existing `org-link-elisp-confirm-function', `org-link-shell-confirm-function', and `org-confirm-babel-evaluate'. > Perhaps advising `org-babel-execute-src-block' with `y-or-n-p' is a > better treatment for my paranoia. Emm. No? The main issue with `y-or-n-p' is that it treats as "yes". I have pressed painstakingly in prompts too many times to consider y-or-n-p safe. >> 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. No, not really. From skimming through grep buffer, most of the calls are not inhibiting `eval'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at