Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codeql: add security-extended query suite - v2 #10259

Closed

Conversation

0xEniola
Copy link
Contributor

Add the CodeQL security-extended suite to the CodeQL workflow configuration.

The security-extended query suite consists of all the queries in the default query suite, with addition of queries with slightly lower precision and severity, although, relative to the default query suite, the security-extended suite may return a greater number of false positive code scanning results.

It will allow us to catch likely flaws in the codebase that we may have missed during development, and flaws that are not checked for with the default suite, hence, allowing for greater hardening of Suricata, and eradicating potential threats.

Previous PR: #10258

  • Incorporate previous PR; modify commit message.

Add the CodeQL security-extended suite to
the CodeQL workflow configuration.
@0xEniola 0xEniola requested a review from jasonish as a code owner January 26, 2024 09:46
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c3b3c11) 82.28% compared to head (75e2da1) 82.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10259      +/-   ##
==========================================
- Coverage   82.28%   82.28%   -0.01%     
==========================================
  Files         977      977              
  Lines      271950   271950              
==========================================
- Hits       223784   223767      -17     
- Misses      48166    48183      +17     
Flag Coverage Δ
fuzzcorpus 63.39% <ø> (-0.01%) ⬇️
suricata-verify 61.50% <ø> (-0.03%) ⬇️
unittests 62.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Going from 52 to 87 queries if I get right the logs from the runners
with addition like NonConstantFormat

I do not know if we need a ticket for such a QA improvement...

@0xEniola
Copy link
Contributor Author

Looks good to me.

Going from 52 to 87 queries if I get right the logs from the runners with addition like NonConstantFormat

I do not know if we need a ticket for such a QA improvement...

So, to close the opened ticket?

@catenacyber
Copy link
Contributor

This is a question for us, not for you Daniel :-)

@0xEniola
Copy link
Contributor Author

This is a question for us, not for you Daniel :-)

Oh 😅.

Understood.
So, to add this PR as note to the ticket I created as note like you said right?

@jufajardini
Copy link
Contributor

This is a question for us, not for you Daniel :-)

Oh 😅.

Understood. So, to add this PR as note to the ticket I created as note like you said right?

Can be a good idea :)

@0xEniola
Copy link
Contributor Author

0xEniola commented Feb 7, 2024

List of Queries present in the security-extended query suite.

  • Array offset used before range check: CWE-120, 125
  • Authentication bypass by spoofing: CWE-290
  • Certificate not checked: CWE-295
  • Certificate result conflation: CWE-295
  • Cleartext storage of sensitive information in an SQLite database: CWE-313
  • Cleartext storage of sensitive information in buffer: CWE-312
  • Comma before misleading indentation: CWE-1078, 670
  • File created without restricting permissions: CWE-732
  • Incorrect 'not' operator usage: CWE-480
  • Incorrect allocation-error handling: CWE-570,252,755
  • Invalid pointer dereference: CWE-119,125,193,787
  • Missing return-value check for a 'scanf'-like function: CWE-252,253
  • Non-constant format string: CWE-134
  • Not enough memory allocated for array of pointer type: CWE-131,122
  • Not enough memory allocated for pointer type: CWE-131,122
  • NULL application name with an unquoted path in call to CreateProcess: CWE-428
  • Overflow in uncontrolled allocation size: CWE-190,789
  • Overruning write: CWE-119,131
  • Possibly wrong buffer size in string copy: CWE-676,119,251
  • Potential exposure of sensitive system data to an unauthorized control sphere: CWE-497
  • Potentially overrunning write: CWE-120, 787, 805
  • Potentially overrunning write with float to string conversion: 120, 787,805
  • Potentially uninitialized local variable: CWE-665, 457
  • Potentially unsafe call to strncat: CWE-788, 676, 119, 251
  • Potentially unsafe use of strcat: CWE-676, 120, 251
  • Suspicious 'sizeof' use: CWE-467
  • Suspicious pointer scaling: CWE-468
  • Suspicious pointer scaling to void: CWE-468
  • Unbounded write: CWE-120, 787, 805
  • Uncontrolled data used in path expression: CWE-022, 023, 036, 073
  • Uncontrolled process operation: CWE-114
  • Unsigned difference expression compared to zero: CWE-191
  • Unterminated variadic call: CWE-121
  • Untrusted input for a condition: CWE-807
  • Use of potentially dangerous function: CWE-676

@victorjulien victorjulien added this to the 8.0 milestone Feb 14, 2024
@victorjulien
Copy link
Member

Merged in #10413, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants