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/apt-build-0.12.48/apt-build.h
Examining data/apt-build-0.12.48/config.c
Examining data/apt-build-0.12.48/config.h
Examining data/apt-build-0.12.48/wrapper.c

FINAL RESULTS:

data/apt-build-0.12.48/config.c:80:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      if (sscanf (file_content, "%s = %s", opt, buf))
data/apt-build-0.12.48/wrapper.c:25:10:  [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.
  return execvp (basename (argv[0]), argv);
data/apt-build-0.12.48/config.c:143:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char *path = getenv("PATH");
data/apt-build-0.12.48/config.c:170:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  path = getenv ("PATH");
data/apt-build-0.12.48/wrapper.c:37:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv (APT_BUILD_STRING_ENV))
data/apt-build-0.12.48/config.c:58: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[BUF_SIZE];
data/apt-build-0.12.48/config.c:59: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 opt[BUF_SIZE];
data/apt-build-0.12.48/config.c:68:10:  [2] (misc) fopen:
  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).
  conf = fopen (APT_BUILD_CONF_PATH, "r");
data/apt-build-0.12.48/config.c:26:20:  [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).
  for (i = 0; i <= strlen (file_content) && file_content[i] != '"'; i++);
data/apt-build-0.12.48/config.c:34:12:  [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).
  for (j = strlen (file_content); j >= 1 && file_content[j - 1] != '"'; j--);
data/apt-build-0.12.48/config.c:42:7:  [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 (strlen (file_content) > 2)
data/apt-build-0.12.48/config.c:117:7:  [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 (options) &&
data/apt-build-0.12.48/config.c:146:24:  [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).
          size_t len = strlen(path) + 6;
data/apt-build-0.12.48/config.c:175:32:  [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).
      setenv ("PATH", libdir + strlen (LIBDIR) + 1, 1);

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 238 in approximately 0.03 seconds (8889 lines/second)
Physical Source Lines of Code (SLOC) = 168
Hits@level = [0]   3 [1]   6 [2]   3 [3]   3 [4]   2 [5]   0
Hits@level+ = [0+]  17 [1+]  14 [2+]   8 [3+]   5 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 101.19 [1+] 83.3333 [2+] 47.619 [3+] 29.7619 [4+] 11.9048 [5+]   0
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.