fix lints

This commit is contained in:
GrosQuildu
2026-03-27 14:08:02 +01:00
committed by Paweł Płatek
parent 9ae826c3f6
commit e54b16fdb2
64 changed files with 0 additions and 64 deletions
@@ -59,4 +59,3 @@ cap_set|cap_clear|prctl\s*\(.*PR_SET
execve\s*\(|execv\s*\(|system\s*\(
getuid\s*\(|geteuid\s*\(|getgid\s*\(
```
@@ -60,4 +60,3 @@ You are a security auditor specializing in identifying banned/deprecated functio
\brand\s*\(|\bsrand\s*\(
\balloca\s*\(
```
@@ -66,4 +66,3 @@ sprintf|snprintf|vsprintf
\+\+.*\]|\[.*\+\+ # Increment in index
for\s*\(.*<= # Potential off-by-one loops
```
@@ -55,4 +55,3 @@ assert\s*\(|ASSERT\s*\(|DEBUG_ASSERT
-O[23s]|-fdelete-null-pointer-checks
if\s*\(\s*\w+\s*!=\s*NULL\s*\).*\*\w+
```
@@ -58,4 +58,3 @@ while\s*\(1\)|for\s*\(;;\)|for\s*\(.*<.*input
vector<.*>\s+\w+\s*=|string\s+\w+\s*=.*\+
std::move\s*\(
```
@@ -58,4 +58,3 @@ if\s*\(.*==\s*-1|if\s*\(.*!=\s*0
catch\s*\(|throw\s+
errno\s*=|perror\s*\(
```
@@ -62,4 +62,3 @@ noexcept\s*\(|noexcept\s*\{
catch\s*\(|try\s*\{
fopen\s*\(.*\{|open\s*\(.*\{
```
@@ -59,4 +59,3 @@ fstack-protect[a-z]*[^o]r|fstack-protector-st[a-z]*[^r]ng
_LIBCPP_HARD[A-Z]*[^E]NING|_GLIBCXX_ASSERT[A-Z]*[^I]ONS
-z,[a-z]*rel[a-z]*[^r]o
```
@@ -65,4 +65,3 @@ tmpnam|tempnam|mktemp|mkstemp|tmpfile
fsync\s*\(|fdatasync\s*\(
O_NOFOLLOW|O_DIRECTORY
```
@@ -54,4 +54,3 @@ scanf\s*\(|sscanf\s*\(|fscanf\s*\(
%n|%\d*\$
__attribute__.*format
```
@@ -52,4 +52,3 @@ static\s+\w+\s+\w+\s*=.*::
Singleton|GetInstance|Instance\(\)
:\s*\w+\(.*\),\s*\w+\( # Initialization lists
```
@@ -72,4 +72,3 @@ abs\s*\(|labs\s*\(
<=\s*0|>=\s*0.*unsigned
malloc\s*\(.*\*|calloc\s*\(
```
@@ -53,4 +53,3 @@ for\s*\(.*begin\(\)|for\s*\(.*:\s*
\.resize\(|\.reserve\(
iterator|::iterator|auto.*=.*begin
```
@@ -59,4 +59,3 @@ std::function.*=.*\[
std::thread.*\[|async.*\[|detach.*\[
callback.*\[|handler.*\[
```
@@ -59,4 +59,3 @@ fopen\s*\(|open\s*\(|socket\s*\(
fclose\s*\(|close\s*\(
return.*\berr|goto\s+err
```
@@ -59,4 +59,3 @@ std::forward\s*\(
noexcept.*move|move.*noexcept
\w+\s*=\s*std::move\s*\(
```
@@ -57,4 +57,3 @@ new\s+\w+|new\s*\(
->|\.find\(|\.get\(
if\s*\(\s*\w+\s*==\s*NULL|if\s*\(\s*!\w+\s*\)
```
@@ -54,4 +54,3 @@ You are a security auditor specializing in operator precedence vulnerabilities.
<<\s*\w+\s*[+\-*/]|>>\s*\w+\s*[+\-*/]
#define\s+\w+\s*\([^)]*\)\s+[^(]
```
@@ -64,4 +64,3 @@ access\s*\(.*open\s*\(|stat\s*\(.*open\s*\(
volatile\s+|atomic|std::atomic
signal\s*\(|sigaction\s*\(
```
@@ -57,4 +57,3 @@ std::regex|boost::regex|pcre_
REG_EXTENDED|REG_NEWLINE|REG_ICASE
\(\[.*\]\+\)\+|\(\.\*\)\+ # ReDoS patterns
```
@@ -59,4 +59,3 @@ make_shared|make_unique
enable_shared_from_this|shared_from_this
weak_ptr.*lock\(\)
```
@@ -56,4 +56,3 @@ toupper|tolower|setlocale
UTF-8|UTF-16|encoding|charset
wchar_t|char16_t|char32_t
```
@@ -59,4 +59,3 @@ sleep\s*\(|usleep\s*\(|nanosleep\s*\(
difftime\s*\(|mktime\s*\(
CLOCK_MONOTONIC|CLOCK_REALTIME
```
@@ -75,4 +75,3 @@ union\s+\w+\s*\{
->type|\.type|type_id|typeid
\*\*\w+|\*\s*\*\s*\w+
```
@@ -61,4 +61,3 @@ reinterpret_cast|\(\w+\s*\*\)\s*\w+
\bint\b.*\+|\bint\b.*\*
__attribute__.*packed|#pragma pack
```
@@ -58,4 +58,3 @@ struct\s+\w+\s*\{ # Struct definitions
memset\s*\(|bzero\s*\( # Initialization functions
send\s*\(|write\s*\(|fwrite\s*\( # Output functions
```
@@ -75,4 +75,3 @@ shared_ptr|unique_ptr|weak_ptr
return.*\.c_str\(\)|return.*\.data\(\)
close\s*\(|fclose\s*\(
```
@@ -60,4 +60,3 @@ override|final
\(\s*\w+\s+\w+\s*\)|vector<\w+>
~\w+\s*\(\s*\)\s*[^=]
```
@@ -61,4 +61,3 @@ accept\s*\(|connect\s*\(|close\s*\(
select\s*\(|poll\s*\(|epoll_wait\s*\(
EINTR|while.*errno
```
@@ -55,4 +55,3 @@ LD_PRELOAD|LD_LIBRARY_PATH|PATH
environ\b|/proc/.*environ
execve\s*\(|execle\s*\(
```
@@ -55,4 +55,3 @@ atoi\s*\(|atol\s*\(|atof\s*\(
errno\s*=\s*0|if\s*\(.*errno
if\s*\(.*!=\s*0|if\s*\(.*==\s*-1
```
@@ -76,4 +76,3 @@ struct\s+\w+\s*\{[^}]*\[\s*[01]\s*\]
sizeof\s*\(.*\)\s*\+|offsetof\s*\(
flexible|FAM\b
```
@@ -69,4 +69,3 @@ shutdown\s*\(.*SHUT_WR|shutdown\s*\(.*SHUT_RD|shutdown\s*\(.*SHUT_RDWR
shutdown\s*\(.*[12]\) # SHUT_RD=0, SHUT_WR=1, SHUT_RDWR=2
close\s*\(.*sock|closesocket\s*\(
```
@@ -69,4 +69,3 @@ inet_addr\s*\( # Also has issues but different
inet_pton\s*\( # This is the safer one
if\s*\(\s*inet_aton
```
@@ -63,4 +63,3 @@ memcpy\s*\(|memmove\s*\(|memset\s*\(
\w+\s*-\s*\w+.*\)$|sizeof.*-
ssize_t|int\s+\w+\s*=.*-
```
@@ -61,4 +61,3 @@ size_t.*=.*read|size_t.*=.*write
memcpy.*,\s*\w+\)|memset.*,\s*\w+\)
\[\s*\w+\s*\].*=
```
@@ -75,4 +75,3 @@ exec[lv]p?\s*\([^)]*,\s*0\s*\)
\*\s*\w+\s*=\s*0\s*; # Pointer = 0
==\s*0\s*[^0-9]|!=\s*0\s*[^0-9] # Comparison to 0
```
@@ -51,4 +51,3 @@ std::equal\s*\(|memcmp\s*\(|strncmp\s*\(|bcmp\s*\(
wcsncmp\s*\(|wmemcmp\s*\(
\.begin\(\).*\.begin\(\)(?!.*\.end\(\).*\.end\(\))
```
@@ -59,4 +59,3 @@ rename\s*\(|renameat\s*\(
O_NOFOLLOW|O_CLOEXEC|O_DIRECTORY
realpath\s*\(|readlink\s*\(
```
@@ -50,4 +50,3 @@ sprintf\s*\([^,]+,\s*[^,]*%s[^,]*,\s*\1
memcpy\s*\(|strcpy\s*\(|strncpy\s*\(
memmove\s*\( # This is the safe one
```
@@ -75,4 +75,3 @@ vprintf|vfprintf|vsprintf|vsnprintf|vsyslog
__attribute__.*format.*printf
void\s+\w+\s*\([^)]*const\s+char\s*\*[^)]*\.\.\.\s*\)
```
@@ -64,4 +64,3 @@ getuid\s*\(|geteuid\s*\(|getgid\s*\(|getegid\s*\(
initgroups\s*\(|setgroups\s*\(
cap_set_proc|prctl\s*\(.*CAP
```
@@ -67,4 +67,3 @@ bsearch\s*\(
int\s+\w+\s*\(.*const\s+void\s*\*.*const\s+void\s*\*
return.*-\s*\*.*\(int\s*\*\)
```
@@ -55,4 +55,3 @@ int\s+\w+\s*;|long\s+\w+\s*;|unsigned\s+\w+\s*;
%d|%ld|%u|%lu|%x|%f
if\s*\(\s*scanf|if\s*\(\s*sscanf
```
@@ -57,4 +57,3 @@ SIG[A-Z]+\s*,|SIGINT|SIGTERM|SIGHUP|SIGUSR
malloc\s*\(|free\s*\(|printf\s*\(|fprintf\s*\(
errno\s*=|errno\s*$
```
@@ -67,4 +67,3 @@ snprintf\s*\(|vsnprintf\s*\(
=\s*snprintf|=\s*vsnprintf
\+=\s*snprintf|\-=.*snprintf
```
@@ -64,4 +64,3 @@ AF_UNSPEC
sockaddr.*sa_family
bind\s*\(|listen\s*\(|accept\s*\(
```
@@ -62,4 +62,3 @@ pthread_spin_init\s*\(|pthread_spin_destroy\s*\(
pthread_spin_lock\s*\(|pthread_spin_unlock\s*\(
pthread_spin_trylock\s*\(
```
@@ -63,4 +63,3 @@ strlen\s*\([^)]+\)\s*[^+] # strlen not followed by +
memcpy.*strlen|memmove.*strlen
char\s+\w+\s*\[\s*strlen
```
@@ -65,4 +65,3 @@ strncat\s*\(\s*\w+\s*,\s*\w+\s*,\s*sizeof\s*\(
strncat\s*\(
wcsncat\s*\(
```
@@ -68,4 +68,3 @@ strncpy\s*\(
wcsncpy\s*\(
\[\s*sizeof.*-\s*1\s*\]\s*=\s*['"\\]0|=\s*'\0'
```
@@ -63,4 +63,3 @@ localtime\s*\((?!_r)|gmtime\s*\((?!_r)|ctime\s*\((?!_r)
getpwnam\s*\((?!_r)|getpwuid\s*\((?!_r)
getenv\s*\(|setenv\s*\(
```
@@ -53,4 +53,3 @@ You are a security auditor specializing in unsafe stdlib function usage in POSIX
\btmpnam\s*\(|\btempnam\s*\(|\bmktemp\s*\(
\balloca\s*\(|\bputenv\s*\(
```
@@ -78,4 +78,3 @@ va_list\s+\w+
return\s*;|return\s+\w+;
throw\s+|goto\s+
```
@@ -55,4 +55,3 @@ SHCreateProcessAsUser[AW]?\s*\(
bInheritHandles|CREATE_BREAKAWAY_FROM_JOB
CREATE_PRESERVE_CODE_AUTHZ_LEVEL|DETACHED_PROCESS
```
@@ -58,4 +58,3 @@ WriteProcessMemory\s*\(|ReadProcessMemory\s*\(
CreateRemoteThread\s*\(|NtCreateThreadEx\s*\(
OpenProcess\s*\(.*PROCESS_VM|PROCESS_ALL_ACCESS
```
@@ -52,4 +52,3 @@ LOAD_LIBRARY_SEARCH|LOAD_LIBRARY_REQUIRE_SIGNED
GetModuleHandle[AW]?\s*\(.*NULL
delay.?load|__delayLoadHelper
```
@@ -59,4 +59,3 @@ SetFileSecurity|SetSecurityInfo|SetNamedSecurityInfo
MsiInstall|MsiOpenPackage|MsiDoAction
INSTALLSTATE_|MsiSetProperty|MsiGetProperty
```
@@ -57,4 +57,3 @@ PIPE_REJECT_REMOTE_CLIENTS|PIPE_ACCESS
ImpersonateNamedPipeClient|RevertToSelf
lpSecurityAttributes|SECURITY_ATTRIBUTES
```
@@ -60,4 +60,3 @@ LocalSystem|LocalService|NetworkService
RegCreateKey|RegSetValue.*ImagePath
PROCESS_CREATION_MITIGATION_POLICY
```
@@ -60,4 +60,3 @@ SeAssignPrimaryTokenPrivilege|SeRestorePrivilege
ImpersonateLoggedOnUser|SetThreadToken|RevertToSelf
OpenProcessToken|OpenThreadToken|DuplicateToken
```
@@ -56,4 +56,3 @@ GMEM_ZEROINIT|LMEM_ZEROINIT|HEAP_ZERO_MEMORY
RtlSecureZeroMemory|SecureZeroMemory|memset_s
CryptProtectMemory|CryptUnprotectMemory
```
@@ -61,4 +61,3 @@ BCryptOpenAlgorithmProvider|BCryptGenRandom|BCryptCreateHash
CALG_MD5|CALG_SHA[^2]|CALG_RC[24]|CALG_DES
BCRYPT_MD5|BCRYPT_SHA1_|BCRYPT_RC4|BCRYPT_DES_
```
@@ -63,4 +63,3 @@ PathCch|PathIs|PathFind|PathAppend
\\\\\\.|\\\\\\?\\|GLOBALROOT
FILE_FLAG_POSIX_SEMANTICS|O_NOFOLLOW
```