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/newpid-13/newpid.c

FINAL RESULTS:

data/newpid-13/newpid.c:177:7:  [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 (argv[0], argv) < 0) {
data/newpid-13/newpid.c:167:17:  [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 *shell = getenv ("SHELL");
data/newpid-13/newpid.c:209:16:  [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 ((opt = getopt(argc, argv, "+inN:u")) != -1) {
data/newpid-13/newpid.c:108:2:  [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 net_path[PATH_MAX];
data/newpid-13/newpid.c:112:10:  [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).
	netns = open(net_path, O_RDONLY | O_CLOEXEC);
data/newpid-13/newpid.c:239:2:  [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 cstack[2048];
data/newpid-13/newpid.c:87:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, dev, IFNAMSIZ);

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 266 in approximately 0.03 seconds (9821 lines/second)
Physical Source Lines of Code (SLOC) = 210
Hits@level = [0]  10 [1]   1 [2]   3 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  17 [1+]   7 [2+]   6 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 80.9524 [1+] 33.3333 [2+] 28.5714 [3+] 14.2857 [4+] 4.7619 [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.