Skip to content

Instantly share code, notes, and snippets.

@flatcap
Last active March 2, 2026 16:09
Show Gist options
  • Select an option

  • Save flatcap/fccc96ce693e06621a35d2dafa8ed2c5 to your computer and use it in GitHub Desktop.

Select an option

Save flatcap/fccc96ce693e06621a35d2dafa8ed2c5 to your computer and use it in GitHub Desktop.
code scanning

NeoMutt CodeQL Code Scanning

Last update: 2026-03-02

Download 1 page of 100 issues

gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "/repos/neomutt/neomutt/code-scanning/alerts?state=open&per_page=100&page=1" | json_reformat > s1.json

Export some fields

jq '.[] | .most_recent_instance.location.path,.most_recent_instance.location.start_line,.most_recent_instance.location.start_column,.number,.rule.description' s1.json > l1

Tidy the results

In Vim, edit l1 then :source tidy.vim

vim quickfix list

qf.txt

88 Issues

  • 35 For loop variable changed in body
  • 21 Local variable address stored in non-local memory
  • 9 Year field changed using an arithmetic operation without checking for leap year
  • 9 Long switch case
  • 3 Nested loops with same variable
  • 3 Futile conditional
  • 2 Time-of-check time-of-use filesystem race condition
  • 2 File created without restricting permissions
  • 2 Cleartext transmission of sensitive information
  • 1 Uncontrolled process operation
  • 1 Uncontrolled data used in OS command
ncrypt/smime.c:743:11: 2 Cleartext transmission of sensitive information
ncrypt/smime.c:778:13: 3 Cleartext transmission of sensitive information
maildir/message.c:585:10: 1103 File created without restricting permissions
mh/shared.c:86:10: 691 File created without restricting permissions
compose/functions.c:659:9: 187 For loop variable changed in body
compose/functions.c:671:9: 188 For loop variable changed in body
docs/makedoc.c:769:17: 1307 For loop variable changed in body
docs/makedoc.c:774:17: 1308 For loop variable changed in body
docs/makedoc.c:779:17: 1309 For loop variable changed in body
docs/makedoc.c:808:19: 1303 For loop variable changed in body
docs/makedoc.c:813:19: 1304 For loop variable changed in body
docs/makedoc.c:818:19: 1305 For loop variable changed in body
docs/makedoc.c:1224:7: 1259 For loop variable changed in body
docs/makedoc.c:1237:9: 1260 For loop variable changed in body
email/header.c:332:13: 1312 For loop variable changed in body
email/parse.c:229:17: 507 For loop variable changed in body
email/parse.c:645:5: 208 For loop variable changed in body
email/parse.c:650:5: 209 For loop variable changed in body
email/rfc2047.c:389:9: 1063 For loop variable changed in body
email/rfc2231.c:118:7: 571 For loop variable changed in body
email/url.c:205:9: 572 For loop variable changed in body
imap/utf7.c:119:7: 213 For loop variable changed in body
imap/utf7.c:129:27: 214 For loop variable changed in body
imap/util.c:726:11: 1183 For loop variable changed in body
mutt/buffer.c:446:20: 932 For loop variable changed in body
mutt/file.c:1378:28: 508 For loop variable changed in body
mutt/file.c:1383:11: 509 For loop variable changed in body
mutt/path.c:80:13: 217 For loop variable changed in body
mutt/slist.c:201:7: 218 For loop variable changed in body
ncrypt/gnupgparse.c:280:13: 223 For loop variable changed in body
ncrypt/gnupgparse.c:286:13: 224 For loop variable changed in body
ncrypt/gnupgparse.c:292:13: 225 For loop variable changed in body
ncrypt/gnupgparse.c:359:20: 226 For loop variable changed in body
ncrypt/gpgme_functions.c:200:7: 1109 For loop variable changed in body
ncrypt/gpgme_functions.c:217:9: 228 For loop variable changed in body
ncrypt/gpgme_functions.c:225:11: 573 For loop variable changed in body
ncrypt/smime.c:299:20: 231 For loop variable changed in body
nntp/complete.c:66:9: 230 For loop variable changed in body
pattern/pattern.c:115:7: 483 For loop variable changed in body
mutt/signal.c:84:3: 1330 Futile conditional
mutt/signal.c:98:5: 1329 Futile conditional
mutt/signal.c:117:3: 1328 Futile conditional
alias/dlg_alias.c:241:3: 325 Local variable address stored in non-local memory
alias/dlg_query.c:317:3: 326 Local variable address stored in non-local memory
browser/dlg_browser.c:856:3: 1130 Local variable address stored in non-local memory
browser/dlg_browser.c:857:3: 1131 Local variable address stored in non-local memory
conn/dlg_verifycert.c:173:3: 331 Local variable address stored in non-local memory
editor/window.c:295:3: 1187 Local variable address stored in non-local memory
email/parse.c:260:9: 334 Local variable address stored in non-local memory
email/rfc2231.c:233:5: 336 Local variable address stored in non-local memory
email/thread.c:112:3: 527 Local variable address stored in non-local memory
gui/thread.c:1067:5: 1298 Local variable address stored in non-local memory
history/dlg_history.c:132:3: 1132 Local variable address stored in non-local memory
imap/browse.c:164:3: 341 Local variable address stored in non-local memory
imap/browse.c:276:5: 1100 Local variable address stored in non-local memory
imap/command.c:764:3: 343 Local variable address stored in non-local memory
imap/imap.c:1491:3: 344 Local variable address stored in non-local memory
mutt/notify.c:210:3: 1110 Local variable address stored in non-local memory
ncrypt/dlg_gpgme.c:235:3: 1135 Local variable address stored in non-local memory
ncrypt/dlg_pgp.c:233:3: 1133 Local variable address stored in non-local memory
ncrypt/dlg_smime.c:210:3: 1134 Local variable address stored in non-local memory
pager/dlg_pager.c:356:3: 353 Local variable address stored in non-local memory
postpone/dlg_postpone.c:221:3: 1136 Local variable address stored in non-local memory
docs/makedoc.c:621:7: 1306 Long switch case
email/parse.c:692:3: 521 Long switch case
flags.c:69:3: 575 Long switch case
muttlib.c:137:5: 1193 Long switch case
ncrypt/gnupgparse.c:172:5: 19 Long switch case
ncrypt/smime.c:2048:5: 20 Long switch case
notmuch/notmuch.c:1403:3: 21 Long switch case
pattern/compile.c:421:5: 23 Long switch case
pattern/compile.c:983:5: 692 Long switch case
postpone/postpone.c:222:24: 356 Nested loops with same variable
postpone/postpone.c:257:22: 357 Nested loops with same variable
postpone/postpone.c:294:16: 358 Nested loops with same variable
mutt/file.c:168:18: 1207 Time-of-check time-of-use filesystem race condition
mutt/file.c:180:3: 6 Time-of-check time-of-use filesystem race condition
mutt/filter.c:156:36: 1327 Uncontrolled data used in OS command
send/sendmail.c:172:14: 384 Uncontrolled process operation
expando/node_conddate.c:88:10: 1099 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:355:9: 319 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:360:9: 486 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:371:11: 321 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:385:11: 322 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:593:8: 522 Year field changed using an arithmetic operation without checking for leap year
mutt/date.c:758:8: 1114 Year field changed using an arithmetic operation without checking for leap year
pattern/compile.c:282:11: 324 Year field changed using an arithmetic operation without checking for leap year
pattern/compile.c:396:8: 323 Year field changed using an arithmetic operation without checking for leap year
%s/"//e
0
g/\.c$/norm Jr:Jr:A:Jr Jr
%!sort -t' ' -k3,3 -k1,1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment