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/cronutils-1.9/runalarm.c
Examining data/cronutils-1.9/runlock.c
Examining data/cronutils-1.9/runstat.c
Examining data/cronutils-1.9/subprocess.c
Examining data/cronutils-1.9/subprocess.h
Examining data/cronutils-1.9/tempdir.c
Examining data/cronutils-1.9/tempdir.h

FINAL RESULTS:

data/cronutils-1.9/runstat.c:79:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, sizeof(buf), fmt, ap);
data/cronutils-1.9/subprocess.c:96:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (execvp(command, args)) {
data/cronutils-1.9/runalarm.c:69:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((arg = getopt(argc, argv, "+t:hd")) > 0) {
data/cronutils-1.9/runlock.c:81:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((arg = getopt(argc, argv, "+df:ht:")) > 0) {
data/cronutils-1.9/runstat.c:109:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((arg = getopt(argc, argv, "+C:f:hd")) > 0) {
data/cronutils-1.9/runlock.c:69:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[BUFSIZ];
data/cronutils-1.9/runlock.c:134:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open(lock_filename, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR)) < 0) {
data/cronutils-1.9/runstat.c:69:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/cronutils-1.9/runstat.c:102:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/cronutils-1.9/runstat.c:173:18:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  if ((temp_fd = mkstemp(temp_filename)) < 0) {
data/cronutils-1.9/runstat.c:292:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char type[10] = {'\0'};
data/cronutils-1.9/runlock.c:159:26:  [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).
      if (write(fd, buf, strlen(buf)) == -1) {
data/cronutils-1.9/runstat.c:247:29:  [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).
    if (write(temp_fd, buf, strlen(buf)) == -1) {
data/cronutils-1.9/runstat.c:272:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(sock.sun_path, collectd_sockname, sizeof(sock.sun_path) - 1);
data/cronutils-1.9/runstat.c:275:17:  [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(sock.sun_path) + sizeof(sock.sun_family)) == -1) {
data/cronutils-1.9/runstat.c:295:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(type, "gauge", 9);
data/cronutils-1.9/runstat.c:298:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(type, "counter", 9);

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 864 in approximately 0.14 seconds (6254 lines/second)
Physical Source Lines of Code (SLOC) = 661
Hits@level = [0]  24 [1]   6 [2]   6 [3]   3 [4]   2 [5]   0
Hits@level+ = [0+]  41 [1+]  17 [2+]  11 [3+]   5 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 62.0272 [1+] 25.7186 [2+] 16.6415 [3+] 7.5643 [4+] 3.02572 [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.