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/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c FINAL RESULTS: data/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c:153: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 operand[2]; data/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c:1381: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 buf[128]; data/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c:1419:3: [2] (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). Risk is low because the source is a constant string. strcpy(buf+n, "??"); data/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c:2022: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 buf[1000]; data/golang-golang-x-arch-0.0~git20200511.f7c7858/x86/x86asm/testdata/libmach8db.c:2041:7: [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). fd = open(argv[0], OREAD); ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 2075 in approximately 0.10 seconds (20307 lines/second) Physical Source Lines of Code (SLOC) = 1832 Hits@level = [0] 0 [1] 0 [2] 5 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 5 [1+] 5 [2+] 5 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.72926 [1+] 2.72926 [2+] 2.72926 [3+] 0 [4+] 0 [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.