public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io, mikuback@linux.microsoft.com
Subject: Re: [edk2-devel] CodeQL Analysis in edk2
Date: Wed, 28 Feb 2024 12:29:52 +0100	[thread overview]
Message-ID: <c2flznfvnlzzv4bklsq7dhzm7gvgs46246kwb7esndx2k7qxwz@ycoaxq3gmvbv> (raw)
In-Reply-To: <80abb140-9a9c-43b8-ba0b-d8ea631d9051@linux.microsoft.com>

On Tue, Feb 27, 2024 at 11:04:47AM -0500, Michael Kubacki wrote:
> Hi Gerd,
> 
> A real-world example is here: https://github.com/microsoft/mu_basecore/blob/release/202311/CodeQlFilters.yml
> 
> That can currently operate at the file and CodeQL rule level granularity. In
> this case, the null pointer test rule ("cpp/missing-null-test" as shown in
> https://github.com/tianocore/edk2/security/code-scanning/1277) could be
> excluded in MpLib.c.

CodeQL apparently has support for assertions[1].  The documentation
sounds like this can be extended.  So maybe it is possible to add an
'Edk2Assert' class, to have CodeQL recognize ASSERT() + variants in the
edk2 source code?

That should reduce the number of filter rules needed and simplify
maintenance long-term.

take care,
  Gerd

[1] https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/commons/Assertions.qll/module.Assertions.html



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116112): https://edk2.groups.io/g/devel/message/116112
Mute This Topic: https://groups.io/mt/102444916/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      parent reply	other threads:[~2024-02-28 11:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 15:43 [edk2-devel] CodeQL Analysis in edk2 Michael Kubacki
2023-11-13 13:39 ` Laszlo Ersek
2023-11-13 13:42   ` Laszlo Ersek
2023-11-15  0:35     ` Michael Kubacki
2023-11-15 12:00       ` Laszlo Ersek
2024-02-27 11:39 ` Gerd Hoffmann
2024-02-27 16:04   ` Michael Kubacki
2024-02-28  3:43     ` Laszlo Ersek
2024-02-28  3:55       ` Michael Kubacki
2024-02-28 11:29     ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2flznfvnlzzv4bklsq7dhzm7gvgs46246kwb7esndx2k7qxwz@ycoaxq3gmvbv \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox