From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.6045.1667521990544572178 for ; Thu, 03 Nov 2022 17:33:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=OKZ/L8lv; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 322D8205D3F9; Thu, 3 Nov 2022 17:33:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 322D8205D3F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667521990; bh=/IUPVepFi+Y06XO/rpj1dlJljJSK1R7F293VtNdSNCM=; h=From:To:Cc:Subject:Date:From; b=OKZ/L8lv4fDb96/P/Kg9szNO4fvij2j81R92eHwHtlZiX0xnpuEecsSxHhNaZLP/a Zy5J+QnPDYjq47dZHvHLyCs5xutPCK5uXGWSRPGgiYTaut9/4lREhGB9lJ9+pR79nD 482OCRvSMR34lRH52QXdjslla0lYjJ6Jxyxw2yj4= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Andrew Fish , Leif Lindholm , Liming Gao , Michael D Kinney , Sean Brogan Subject: [PATCH v3 0/2] Enable Initial CodeQL Support Date: Thu, 3 Nov 2022 20:32:33 -0400 Message-Id: <20221104003235.2429-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4115 This patch series enables initial CodeQL support within the edk2 repository. After this patch, a CodeQL Analyze step will run on a subset of edk2 packages in Pull Requests. The plan to scale additional CodeQL queries is documented in the RFC and it is recommeneded to read that for more detail: https://github.com/tianocore/edk2/discussions/3258#discussioncomment-3682= 099 In summary, this change will: - Main workflow file - .github/workflows/codeql-analysis.yml 1. Add a code scanning workflow with the CodeQL Analysis GitHub action 2. Build packages on Windows + VS2019 3. Perform CodeQL analysis on the build results - Custom configuration file - .github/codeql/codeql-config.yml 1. Specify the edk2 CodeQL query set 2. Apply a query filter to exclude errors, warnings, and recommendations - edk2 query set file - .github/codeql/edk2.qls 1. Enable a single query: cpp/conditionallyuninitializedvariable Per the RFC, this enables CodeQL but does not allow any alerts by suppressing all of the severity levels. When the code changes necessary to resolve problems found with cpp/conditionallyuninitializedvariable are checked in, the severity filter can be adjusted such that query is enabled. V3 Changes: 1. Remove Node.js and cspell installation from workflow These are not needed for the build used for CodeQL. V2 Changes: 1. Switch from Ubuntu + GCC5 As noted in the v1 series, there is an occassional issue with filesystem paths on Ubuntu + GCC at the moment that prevents this change from being checked in. A bug has been filed against CodeQL and the CodeQL team has confirmed this is a bug. They were not aware of the bug until this report. https://github.com/github/codeql-action/issues/1338 In the meantime, this v2 patch series places the workflow on Windows with VS2019 which has been reliable across testing. Cc: Andrew Fish Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Cc: Sean Brogan Signed-off-by: Michael Kubacki Michael Kubacki (2): Maintainers.txt: Add .github maintainers and reviewers .github: Add initial CodeQL config and workflow files .github/codeql/codeql-config.yml | 30 +++++++ .github/codeql/edk2.qls | 12 +++ .github/workflows/codeql-analysis.yml | 91 ++++++++++++++++++++ Maintainers.txt | 6 ++ 4 files changed, 139 insertions(+) create mode 100644 .github/codeql/codeql-config.yml create mode 100644 .github/codeql/edk2.qls create mode 100644 .github/workflows/codeql-analysis.yml --=20 2.28.0.windows.1