From patchwork Mon Sep 11 11:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3341 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:390:b0:d7:3b0f:3938 with SMTP id 16csp2177671dyq; Mon, 11 Sep 2023 04:08:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3BLoEm+UYyQXvo38WBI6LO0Key/lKD53ucdqZ91B8iBHTgANWnbMnvVjB5cUSC3XuIEZT X-Received: by 2002:a05:6870:70a6:b0:1bb:724f:2bca with SMTP id v38-20020a05687070a600b001bb724f2bcamr9667008oae.1.1694430531026; Mon, 11 Sep 2023 04:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694430530; cv=none; d=google.com; s=arc-20160816; b=drB6IyWyp7Lx5ArhTdP3cnalRCqD+4amxF8FU61eIQ09YsYFBqVI6QuHjX2ZdoQnzu oNCLznyW7A1KXDLkkx7svAwmo037rSDR3VGx+u6+M3UMWShFadmV1eTEJrWX9ZC3piXn FJO+jPlUb+WDhRfkU3LmUbXUln7Cs7HyEZvPw81GL29adglycSmqzNXiwOMO2oafv+11 poxJHZBRLjT7RJ2BJdmbwbl+vLKMnoNUAHB3/MykGKiZSBKr++euiEpaHsrDwwleUdVK HX1V4593DyD6Afjw1vgtc9QVJr6civx4+2eaLKfmqKzA1Qm8f3i2E0W3hXSXE+IuppHE JZHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=VaoWLgdXG3w0JQqMEnFwvxZtB07MhstrzcHcwa4tWsE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=FIUJYaF5RbwHip+BkkpMvbv0ldUmiAZrtfD8934nGg0fomdxanDjPVqogbHx44ogvV 2ZW0vmoLTkK8Qa7twst/ipEMZ1GkIjGWJlpobEpFZntHduc4iGcvZtvPGQcOyacIrqFv emsNMzuvy6NgV0XEdnoOma1wBFo3r+4OzsfQnJwvRseo1OZxV4eIrVl7pseqeq01qy4M W1dRPTJb9Cucnn04jaikhR1xMcpqA91nabOKPfQ2HyXj06//pgVT1s7EZmU56B6cEbS5 nVKQdwBvCShHDv/On72G+lgWpTxC73kyJzx+Ae2qT18NsPrT8FZeGdT87AyD9HroCM9a Pn0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=HqEhJQtD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bt2Pjyuh; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=oUeUT6ry; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id m65-20020a633f44000000b0056b5496a486si5949331pga.634.2023.09.11.04.08.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2023 04:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=HqEhJQtD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bt2Pjyuh; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=oUeUT6ry; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qfelk-00049y-4e; Mon, 11 Sep 2023 11:07:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qfeli-00049r-Ox for openvpn-devel@lists.sourceforge.net; Mon, 11 Sep 2023 11:07:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EPgtGXprHPhIFeTPnKbpoWdYOhNWlzPXxghukDU7Z3c=; b=HqEhJQtDQnq5ST6h7gQ74EIk9I MG/S2ffOBsyu8+39sZPqxWCDx9QHFkB6mDnDwEXDFLK5luHWlztbPmPuy5j7H273NH2IyASOnL9W7 Ey7gby+O1xk1tNWS/OY+FOkTiYUPnxuJbdpgsxBQ1eT3WhIGJeHbUNuQer+cPKmJXzvg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EPgtGXprHPhIFeTPnKbpoWdYOhNWlzPXxghukDU7Z3c=; b=bt2PjyuhmL7u8Yw3JKvTN+QEC2 4hW0WWGC7ijIKHwGxVEA7dD25MteFOLWMtFsxHKeB0YbmvFtxkkAweayE61DwoH4xncwAvkVigCXM AvdFrgjdEjwUFIY0mzcrd2MS+9M9rAUjUFGAujVn99xqaDAHPJQDgpcNCOTTbzAlwWNE=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qfeld-000661-HF for openvpn-devel@lists.sourceforge.net; Mon, 11 Sep 2023 11:07:51 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RkkT41pMhz9sZv for ; Mon, 11 Sep 2023 13:07:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1694430456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EPgtGXprHPhIFeTPnKbpoWdYOhNWlzPXxghukDU7Z3c=; b=oUeUT6ry/tuy9Xgo6rIacyp2zBTWCxSyl8SJjhFR/tKcZJ+P4HxQrzwiJafFgFErXMPx5l Jyb8OvHBDQFvoOlhqJxC5sCbi8t3ObryrExToiHkUgSUQZSlnwxPvdqxPGCgDOaZhxMBBX 1wP96300ICb9FQVFiMU5ucQsw3KidkVaAYD7W7YkLXrBGiLkrUElkzUVUNaEFxRQaSqtow 8tahozaOxfSSGrXCOnRaVqlCbh1HD8uEvJK+F9KDft6wWPFOgtk1HP5qdyHFPqNcGlqAMV yv5hK617H5zQ0gK8DV0uX9EFHbb7qtwp7X5aarGcIDp39q5mdqwVZ3PmTvHw1Q== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Mon, 11 Sep 2023 13:07:35 +0200 Message-Id: <20230911110735.34491-1-frank@lichtenheld.com> In-Reply-To: <20230728124005.177414-1-frank@lichtenheld.com> References: <20230728124005.177414-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RkkT41pMhz9sZv X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Not on every push due to submit limits. Use caching to not submit a scan for the same git commit twice. Since we have many days without pushes to master this saves a lot of Github and Coverity resources. Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1qfeld-000661-HF Subject: [Openvpn-devel] [PATCH v2] GHA: new workflow to submit scan to Coverity Scan service X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1772668150217115750?= X-GMAIL-MSGID: =?utf-8?q?1776739188274600967?= Not on every push due to submit limits. Use caching to not submit a scan for the same git commit twice. Since we have many days without pushes to master this saves a lot of Github and Coverity resources. v2: - add caching to not submit redundant scans Change-Id: I302ccc82f9d5c43b58350bbbf7f16ad1c559248f Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- .github/workflows/coverity-scan.yml | 69 +++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/coverity-scan.yml diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml new file mode 100644 index 00000000..c1079332 --- /dev/null +++ b/.github/workflows/coverity-scan.yml @@ -0,0 +1,69 @@ +name: coverity-scan +on: + schedule: + - cron: '0 20 * * *' # Daily at 20:00 UTC + workflow_dispatch: + +jobs: + latest: + runs-on: ubuntu-latest + steps: + - name: Check submission cache + id: check_submit + uses: actions/cache/restore@v3 + with: + path: | + cov-int + key: check-submit-${{ github.sha }} + + - name: Install dependencies + if: steps.check_submit.outputs.cache-hit != 'true' + run: sudo apt update && sudo apt install -y liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev libnl-genl-3-dev linux-libc-dev man2html libcmocka-dev python3-docutils libtool automake autoconf libssl-dev libpkcs11-helper1-dev softhsm2 gnutls-bin + + - name: Checkout OpenVPN + if: steps.check_submit.outputs.cache-hit != 'true' + uses: actions/checkout@v3 + + - name: Download Coverity Build Tool + if: steps.check_submit.outputs.cache-hit != 'true' + run: | + wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=OpenVPN%2Fopenvpn" -O cov-analysis-linux64.tar.gz + mkdir cov-analysis-linux64 + tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + + - name: autoconf + if: steps.check_submit.outputs.cache-hit != 'true' + run: autoreconf -fvi + - name: configure + if: steps.check_submit.outputs.cache-hit != 'true' + run: ./configure --enable-pkcs11 + + - name: Build with cov-build + if: steps.check_submit.outputs.cache-hit != 'true' + run: | + PATH=`pwd`/cov-analysis-linux64/bin:$PATH + cov-build --dir cov-int make + + - name: Submit the result to Coverity Scan + if: steps.check_submit.outputs.cache-hit != 'true' + run: | + tar czvf openvpn.tgz cov-int + curl --form token=$TOKEN \ + --form email=$EMAIL \ + --form file=@openvpn.tgz \ + --form version="$GITHUB_SHA" \ + --form description="master" \ + https://scan.coverity.com/builds?project=OpenVPN%2Fopenvpn + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} + + - name: Cache submission + if: steps.check_submit.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: | + cov-int + key: ${{ steps.check_submit.outputs.cache-primary-key }}