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/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.c
Examining data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.h
Examining data/prometheus-node-exporter-1.0.1+ds/collector/kvm_bsd.c
Examining data/prometheus-node-exporter-1.0.1+ds/collector/kvm_bsd.h
Examining data/prometheus-node-exporter-1.0.1+ds/vendor/github.com/mdlayher/wifi/internal/nl80211/nl80211.h

FINAL RESULTS:

data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.c:42:3:  [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(p[i].device, current.dinfo->devices[i].device_name);
data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.h:43: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		device[DEVSTAT_NAME_LEN];
data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.h:23:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint64_t	read;
data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.h:30:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint64_t	read;
data/prometheus-node-exporter-1.0.1+ds/collector/devstat_freebsd.h:37:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	double		read;

ANALYSIS SUMMARY:

Hits = 5
Lines analyzed = 5284 in approximately 0.27 seconds (19847 lines/second)
Physical Source Lines of Code (SLOC) = 1377
Hits@level = [0]   0 [1]   3 [2]   1 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]   5 [1+]   5 [2+]   2 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 3.63108 [1+] 3.63108 [2+] 1.45243 [3+] 0.726216 [4+] 0.726216 [5+]   0
Symlinks skipped = 1 (--allowlink overrides but see doc for security issue)
Dot directories skipped = 3 (--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.