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-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c Examining data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.h Examining data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c Examining data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.h FINAL RESULTS: data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:178:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*paths)[i], path, sizeof(char)*(strlen(path))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:180:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*accts)[i], acct, sizeof(char)*(strlen(acct))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:213:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*paths)[i], path, sizeof(char)*(strlen(path)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:215:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*accts)[i], acct, sizeof(char)*(strlen(acct)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:142:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp_paths[listNumber], pathTmp, sizeof(char)*(strlen(pathTmp)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:143:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp_accts[listNumber], acctTmp, sizeof(char)*(strlen(acctTmp)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:12:5: [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(buf, "Unknown error", 128); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:22:5: [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(server->host), server->host, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:24:5: [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(username), username, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:25:5: [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(server->path), server->path, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:29:5: [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(secret), secret, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:41:22: [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). attribute.length = strlen(label); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:60:5: [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(server->host), server->host, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:63:5: [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(server->path), server->path, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:101:5: [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(server->host), server->host, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:104:5: [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(server->path), server->path, data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:177:57: [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). (*paths)[i] = (char *) malloc(sizeof(char)*(strlen(path))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:178:53: [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). memcpy((*paths)[i], path, sizeof(char)*(strlen(path))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:179:57: [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). (*accts)[i] = (char *) malloc(sizeof(char)*(strlen(acct))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:180:53: [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). memcpy((*accts)[i], acct, sizeof(char)*(strlen(acct))); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:212:53: [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). (*paths)[i] = (char *) malloc(sizeof(char)*(strlen(path)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:213:49: [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). memcpy((*paths)[i], path, sizeof(char)*(strlen(path)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:214:53: [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). (*accts)[i] = (char *) malloc(sizeof(char)*(strlen(acct)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/osxkeychain/osxkeychain_darwin.c:215:49: [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). memcpy((*accts)[i], acct, sizeof(char)*(strlen(acct)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:53:31: [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 (strncmp(key, attribute, strlen(key)) == 0) data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:80:49: [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 (strncmp(value, "io.docker.Credentials", strlen(value)) != 0) { data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:139:60: [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). tmp_paths[listNumber] = (char *) calloc(1, sizeof(char)*(strlen(pathTmp)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:140:60: [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). tmp_accts[listNumber] = (char *) calloc(1, sizeof(char)*(strlen(acctTmp)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:142:56: [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). memcpy(tmp_paths[listNumber], pathTmp, sizeof(char)*(strlen(pathTmp)+1)); data/golang-github-docker-docker-credential-helpers-0.6.3/secretservice/secretservice_linux.c:143:56: [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). memcpy(tmp_accts[listNumber], acctTmp, sizeof(char)*(strlen(acctTmp)+1)); ANALYSIS SUMMARY: Hits = 30 Lines analyzed = 414 in approximately 0.07 seconds (6355 lines/second) Physical Source Lines of Code (SLOC) = 345 Hits@level = [0] 0 [1] 24 [2] 6 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 30 [1+] 30 [2+] 6 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 86.9565 [1+] 86.9565 [2+] 17.3913 [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.