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/kickpass-0.2.0/compat/bsd/imsg-buffer.c
Examining data/kickpass-0.2.0/compat/bsd/imsg.c
Examining data/kickpass-0.2.0/compat/bsd/imsg.h
Examining data/kickpass-0.2.0/include/config.h
Examining data/kickpass-0.2.0/include/editor.h
Examining data/kickpass-0.2.0/include/error.h
Examining data/kickpass-0.2.0/include/kickpass.h
Examining data/kickpass-0.2.0/include/kpagent.h
Examining data/kickpass-0.2.0/include/password.h
Examining data/kickpass-0.2.0/include/safe.h
Examining data/kickpass-0.2.0/include/storage.h
Examining data/kickpass-0.2.0/lib/config.c
Examining data/kickpass-0.2.0/lib/error.c
Examining data/kickpass-0.2.0/lib/kickpass.c
Examining data/kickpass-0.2.0/lib/kpagent.c
Examining data/kickpass-0.2.0/lib/password.c
Examining data/kickpass-0.2.0/lib/safe.c
Examining data/kickpass-0.2.0/lib/storage.c
Examining data/kickpass-0.2.0/src/command.h
Examining data/kickpass-0.2.0/src/command/agent.c
Examining data/kickpass-0.2.0/src/command/agent.h
Examining data/kickpass-0.2.0/src/command/cat.h
Examining data/kickpass-0.2.0/src/command/copy.c
Examining data/kickpass-0.2.0/src/command/copy.h
Examining data/kickpass-0.2.0/src/command/create.c
Examining data/kickpass-0.2.0/src/command/create.h
Examining data/kickpass-0.2.0/src/command/delete.c
Examining data/kickpass-0.2.0/src/command/delete.h
Examining data/kickpass-0.2.0/src/command/edit.h
Examining data/kickpass-0.2.0/src/command/init.c
Examining data/kickpass-0.2.0/src/command/init.h
Examining data/kickpass-0.2.0/src/command/list.c
Examining data/kickpass-0.2.0/src/command/list.h
Examining data/kickpass-0.2.0/src/command/open.c
Examining data/kickpass-0.2.0/src/command/open.h
Examining data/kickpass-0.2.0/src/command/rename.c
Examining data/kickpass-0.2.0/src/command/rename.h
Examining data/kickpass-0.2.0/src/command/cat.c
Examining data/kickpass-0.2.0/src/command/edit.c
Examining data/kickpass-0.2.0/src/editor.c
Examining data/kickpass-0.2.0/src/log.c
Examining data/kickpass-0.2.0/src/log.h
Examining data/kickpass-0.2.0/src/main.c
Examining data/kickpass-0.2.0/src/prompt.c
Examining data/kickpass-0.2.0/src/prompt.h
Examining data/kickpass-0.2.0/test/check_compat.h
Examining data/kickpass-0.2.0/test/safe.c
Examining data/kickpass-0.2.0/test/storage.c

FINAL RESULTS:

data/kickpass-0.2.0/include/kickpass.h:46:104:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	kp_error_t (*password_prompt)(struct kp_ctx *, bool, char *, const char *, ...) __attribute__((format(printf, 4, 5)));
data/kickpass-0.2.0/lib/config.c:82:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(cfg_safe.metadata, KP_METADATA_MAX_LEN, KP_CONFIG_TEMPLATE,
data/kickpass-0.2.0/src/command/agent.c:273:8:  [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[optind], argv + optind) < 0) {
data/kickpass-0.2.0/src/command/create.c:108:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf((char *)safe.metadata, KP_METADATA_MAX_LEN, KP_METADATA_TEMPLATE);
data/kickpass-0.2.0/src/editor.c:59:7:  [4] (shell) execlp:
  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 (execlp(editor, editor, path, NULL) < 0) {
data/kickpass-0.2.0/src/log.c:36:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/kickpass-0.2.0/src/log.c:54:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/kickpass-0.2.0/src/log.c:72:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/kickpass-0.2.0/src/log.c:83:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 2, 3)))
data/kickpass-0.2.0/src/main.c:305:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(usage, __progname, __progname);
data/kickpass-0.2.0/src/prompt.c:89:3:  [4] (shell) execlp:
  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.
		execlp(askpass, askpass, prompt, (char *)NULL);
data/kickpass-0.2.0/lib/kickpass.c:41:9:  [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.
	home = getenv("HOME");
data/kickpass-0.2.0/src/command/agent.c:479:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "d", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/command/cat.c:99:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "pm", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/command/create.c:149:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "gl:ot:", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/command/edit.c:197:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "pmgl:", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/command/init.c:87:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/command/open.c:105:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "t:", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/editor.c:53:11:  [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.
	editor = getenv("EDITOR");
data/kickpass-0.2.0/src/main.c:137:21:  [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 ((socket_path = getenv(KP_AGENT_SOCKET_ENV)) != NULL) {
data/kickpass-0.2.0/src/main.c:191:16:  [3] (buffer) getopt_long:
  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_long(argc, argv, "+vh", longopts, NULL)) != -1) {
data/kickpass-0.2.0/src/prompt.c:53: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.
	if ((askpass = getenv("KP_ASKPASS")) == NULL) {
data/kickpass-0.2.0/compat/bsd/imsg-buffer.c:96:2:  [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(buf->buf + buf->wpos, data, len);
data/kickpass-0.2.0/compat/bsd/imsg-buffer.c:232: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[CMSG_SPACE(sizeof(int))];
data/kickpass-0.2.0/compat/bsd/imsg.c:77: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[CMSG_SPACE(sizeof(int) * 1)];
data/kickpass-0.2.0/compat/bsd/imsg.c:176:2:  [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(imsg->data, ibuf->r.rptr, datalen);
data/kickpass-0.2.0/include/kickpass.h:44: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 ws_path[PATH_MAX];
data/kickpass-0.2.0/include/kpagent.h:40: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 path[PATH_MAX]; /* name of the safe */
data/kickpass-0.2.0/include/kpagent.h:41: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 password[KP_PASSWORD_MAX_LEN]; /* plain text password (null terminated) */
data/kickpass-0.2.0/include/kpagent.h:42: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 metadata[KP_METADATA_MAX_LEN]; /* plain text metadata (null terminated) */
data/kickpass-0.2.0/include/kpagent.h:48: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 path[PATH_MAX]; /* name of the safe */
data/kickpass-0.2.0/include/safe.h:38: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).
	bool open;           /* whether the safe is open or not */
data/kickpass-0.2.0/include/safe.h:40: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 name[PATH_MAX]; /* name of the safe */
data/kickpass-0.2.0/lib/config.c:37:52:  [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.
#define CONFIG_GET(config, ctx, type) ((type *)(&((char *)ctx)[config->offset]))
data/kickpass-0.2.0/lib/config.c:64: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/config.c:101: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/config.c:178: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 abspath[PATH_MAX] = "";
data/kickpass-0.2.0/lib/config.c:237:11:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	*value = atol(str_value);
data/kickpass-0.2.0/lib/kickpass.c:89: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/kpagent.c:218: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(data, imsg.data, size);
data/kickpass-0.2.0/lib/safe.c:46: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/safe.c:64:17:  [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).
	safe->cipher = open(path, O_RDWR | O_NONBLOCK);
data/kickpass-0.2.0/lib/safe.c:109: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         path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/safe.c:134:17:  [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).
	safe->cipher = open(path, O_RDWR | O_NONBLOCK | O_CREAT, S_IRUSR | S_IWUSR);
data/kickpass-0.2.0/lib/safe.c:149: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/safe.c:196: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/safe.c:260: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 path[PATH_MAX] = "";
data/kickpass-0.2.0/lib/safe.c:327:59:  [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).
kp_safe_init(struct kp_safe *safe, const char *name, bool open, bool ro)
data/kickpass-0.2.0/lib/safe.c:344:15:  [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).
	safe->open = open;
data/kickpass-0.2.0/lib/safe.c:357: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 oldpath[PATH_MAX] = "", newpath[PATH_MAX] = "";
data/kickpass-0.2.0/lib/storage.c:56:11:  [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.
	unsigned char  salt[KP_STORAGE_SALT_SIZE];
data/kickpass-0.2.0/lib/storage.c:57:11:  [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.
	unsigned char  nonce[KP_STORAGE_NONCE_SIZE];
data/kickpass-0.2.0/lib/storage.c:78:2:  [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(&(field), (packed), (s)/8);\
data/kickpass-0.2.0/lib/storage.c:84:2:  [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((packed), &(field), (s)/8);\
data/kickpass-0.2.0/lib/storage.c:100:2:  [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(packed, header->salt, KP_STORAGE_SALT_SIZE);
data/kickpass-0.2.0/lib/storage.c:102:2:  [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(packed, header->nonce, KP_STORAGE_NONCE_SIZE);
data/kickpass-0.2.0/lib/storage.c:116:2:  [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(header->salt, packed, KP_STORAGE_SALT_SIZE);
data/kickpass-0.2.0/lib/storage.c:118:2:  [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(header->nonce, packed, KP_STORAGE_NONCE_SIZE);
data/kickpass-0.2.0/lib/storage.c:128:11:  [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.
	unsigned char key[crypto_aead_chacha20poly1305_KEYBYTES];
data/kickpass-0.2.0/lib/storage.c:153:11:  [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.
	unsigned char key[crypto_aead_chacha20poly1305_KEYBYTES];
data/kickpass-0.2.0/lib/storage.c:180:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE];
data/kickpass-0.2.0/lib/storage.c:181: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 path[PATH_MAX];
data/kickpass-0.2.0/lib/storage.c:266:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE];
data/kickpass-0.2.0/src/command/agent.c:61: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 path[PATH_MAX];
data/kickpass-0.2.0/src/command/agent.c:176: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 socket_dir[PATH_MAX];
data/kickpass-0.2.0/src/command/agent.c:177: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 socket_path[PATH_MAX];
data/kickpass-0.2.0/src/command/agent.c:288:18:  [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).
		if ((devnull = open("/dev/null", O_RDWR)) < 0) {
data/kickpass-0.2.0/src/command/create.c:57: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 cfg_path[PATH_MAX] = "";
data/kickpass-0.2.0/src/command/create.c:118:6:  [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).
	if (open) {
data/kickpass-0.2.0/src/command/create.c:155:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			password_len = atoi(optarg);
data/kickpass-0.2.0/src/command/create.c:161:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			timeout = atoi(optarg);
data/kickpass-0.2.0/src/command/delete.c:44: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 path[PATH_MAX];
data/kickpass-0.2.0/src/command/edit.c:58: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 cfg_path[PATH_MAX] = "";
data/kickpass-0.2.0/src/command/edit.c:141: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(safe->password, password, password_len);
data/kickpass-0.2.0/src/command/edit.c:161:8:  [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).
	tty = fopen("/dev/tty", "r+");
data/kickpass-0.2.0/src/command/edit.c:209:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			password_len = atoi(optarg);
data/kickpass-0.2.0/src/command/init.c:48: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 sub[PATH_MAX] = "";
data/kickpass-0.2.0/src/command/init.c:90:24:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			ctx->cfg.memlimit = atol(optarg);
data/kickpass-0.2.0/src/command/list.c:54: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 path[PATH_MAX];
data/kickpass-0.2.0/src/command/list.c:90: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 path[PATH_MAX];
data/kickpass-0.2.0/src/command/open.c:108:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			timeout = atoi(optarg);
data/kickpass-0.2.0/src/editor.c:45: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 path[PATH_MAX];
data/kickpass-0.2.0/src/editor.c:49:15:  [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).
	assert(safe->open);
data/kickpass-0.2.0/src/editor.c:68:7:  [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).
	fd = fopen(path, "r");
data/kickpass-0.2.0/src/editor.c:128:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(path)) < 0) {
data/kickpass-0.2.0/src/main.c:167: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(tty, O_RDWR);
data/kickpass-0.2.0/test/safe.c:29: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 path[PATH_MAX];
data/kickpass-0.2.0/test/storage.c:28:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE] = { 0 };
data/kickpass-0.2.0/test/storage.c:43:2:  [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(header.salt, salt, KP_STORAGE_SALT_SIZE);
data/kickpass-0.2.0/test/storage.c:44:2:  [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(header.nonce, nonce, KP_STORAGE_NONCE_SIZE);
data/kickpass-0.2.0/test/storage.c:50:11:  [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.
	unsigned char ref[KP_STORAGE_HEADER_SIZE] = {
data/kickpass-0.2.0/test/storage.c:68:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE] = {
data/kickpass-0.2.0/test/storage.c:109:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE] = { 0 };
data/kickpass-0.2.0/test/storage.c:111:11:  [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.
	unsigned char cipher[sizeof(plain)+crypto_aead_chacha20poly1305_ABYTES] = { 0 };
data/kickpass-0.2.0/test/storage.c:154:11:  [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.
	unsigned char packed_header[KP_STORAGE_HEADER_SIZE] = { 0 };
data/kickpass-0.2.0/test/storage.c:165:11:  [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.
	unsigned char plain[sizeof(cipher)-crypto_aead_chacha20poly1305_ABYTES] = { 0 };
data/kickpass-0.2.0/lib/safe.c:81:16:  [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).
	rdir = path + strlen(ctx->ws_path);
data/kickpass-0.2.0/lib/storage.c:132:19:  [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).
			ctx->password, strlen(ctx->password),
data/kickpass-0.2.0/lib/storage.c:157:19:  [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).
			ctx->password, strlen(ctx->password),
data/kickpass-0.2.0/lib/storage.c:188:17:  [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).
	password_len = strlen(safe->password);
data/kickpass-0.2.0/lib/storage.c:190:17:  [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).
	metadata_len = strlen(safe->metadata);
data/kickpass-0.2.0/lib/storage.c:210:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)plain, (char *)safe->password, password_len);
data/kickpass-0.2.0/lib/storage.c:212:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)&plain[password_len+1], (char *)safe->metadata, metadata_len);
data/kickpass-0.2.0/lib/storage.c:274:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(safe->cipher, packed_header, KP_STORAGE_HEADER_SIZE)
data/kickpass-0.2.0/lib/storage.c:291:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	cipher_size = read(safe->cipher, cipher,
data/kickpass-0.2.0/lib/storage.c:313:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)safe->password, (char *)plain, KP_PASSWORD_MAX_LEN);
data/kickpass-0.2.0/lib/storage.c:316:17:  [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).
	password_len = strlen((char *)safe->password);
data/kickpass-0.2.0/lib/storage.c:318:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)safe->metadata, (char *)&plain[password_len+1], KP_METADATA_MAX_LEN);
data/kickpass-0.2.0/src/command/copy.c:74:17:  [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).
	password_len = strlen(safe.password);
data/kickpass-0.2.0/src/command/edit.c:132:17:  [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).
	password_len = strlen(password);
data/kickpass-0.2.0/src/command/list.c:166:26:  [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).
		printf("%s/\n", root + strlen(ctx->ws_path) + 1);
data/kickpass-0.2.0/src/command/list.c:168:11:  [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).
	ignore = strlen(root) + 1;
data/kickpass-0.2.0/src/editor.c:134:17:  [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).
	metadata_len = strlen(safe->metadata);
data/kickpass-0.2.0/src/main.c:308:21:  [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 opts_len = strlen(cmds[i].cmd->opts);

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 5902 in approximately 0.25 seconds (23158 lines/second)
Physical Source Lines of Code (SLOC) = 4018
Hits@level = [0]  30 [1]  18 [2]  74 [3]  11 [4]  11 [5]   0
Hits@level+ = [0+] 144 [1+] 114 [2+]  96 [3+]  22 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 35.8387 [1+] 28.3723 [2+] 23.8925 [3+] 5.47536 [4+] 2.73768 [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.