Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/pgaudit-1.5.0/pgaudit.c

FINAL RESULTS:

data/pgaudit-1.5.0/pgaudit.c:530:29:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                            strcpy(commandStr + passwordPos + 1, TOKEN_REDACTED);
data/pgaudit-1.5.0/pgaudit.c:1446:45:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
pgaudit_object_access_hook(ObjectAccessType access,
data/pgaudit-1.5.0/pgaudit.c:1457:37:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        (*next_object_access_hook) (access, classId, objectId, subId, arg);
data/pgaudit-1.5.0/pgaudit.c:518:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                          strlen(TOKEN_PASSWORD);
data/pgaudit-1.5.0/pgaudit.c:521:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                                strlen(TOKEN_REDACTED) + 1);
data/pgaudit-1.5.0/pgaudit.c:523:29:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                            strncpy(commandStr,

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 2001 in approximately 0.07 seconds (27377 lines/second)
Physical Source Lines of Code (SLOC) = 1160
Hits@level = [0]   0 [1]   3 [2]   0 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]   6 [1+]   6 [2+]   3 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 5.17241 [1+] 5.17241 [2+] 2.58621 [3+] 2.58621 [4+] 2.58621 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.