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/minia-3.2.1+git20200522.4960a99/merci/merci.cpp
Examining data/minia-3.2.1+git20200522.4960a99/scripts/filter_by_previous_contigs.cpp
Examining data/minia-3.2.1+git20200522.4960a99/src/GraphSimplificationAttempts.cpp
Examining data/minia-3.2.1+git20200522.4960a99/src/Minia.cpp
Examining data/minia-3.2.1+git20200522.4960a99/src/Minia.hpp
Examining data/minia-3.2.1+git20200522.4960a99/src/main.cpp
Examining data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp
Examining data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/kseq.h

FINAL RESULTS:

data/minia-3.2.1+git20200522.4960a99/src/GraphSimplificationAttempts.cpp:41:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buffer, progressFormat1, ++_nbBubbleRemovalPasses);
data/minia-3.2.1+git20200522.4960a99/src/GraphSimplificationAttempts.cpp:348:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buffer, progressFormat1, ++_nbBubbleRemovalPasses);
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp:119:19:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        int ret = sscanf(seq->name.s, "%s %d %s %d %s %f %s %d", &osef_s, &osef, &osef_s, &osef, &osef_s, &mul, &osef_s, &osef);
data/minia-3.2.1+git20200522.4960a99/src/Minia.cpp:104:46:  [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 *hidden_env_variable_out_tmp = std::getenv("MINIA_OUT_TMP");
data/minia-3.2.1+git20200522.4960a99/merci/merci.cpp:114:23:  [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).
    IBank *in = Bank::open (assembly);
data/minia-3.2.1+git20200522.4960a99/merci/merci.cpp:241:23:  [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).
    IBank *in = Bank::open (reads);
data/minia-3.2.1+git20200522.4960a99/merci/merci.cpp:442:23:  [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).
    IBank *in = Bank::open (assembly);
data/minia-3.2.1+git20200522.4960a99/scripts/filter_by_previous_contigs.cpp:74:42:  [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).
                IBank* bankReads = Bank::open(tool.getInput()->getStr("-reads"));
data/minia-3.2.1+git20200522.4960a99/src/GraphSimplificationAttempts.cpp:40:5:  [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 buffer[128];
data/minia-3.2.1+git20200522.4960a99/src/GraphSimplificationAttempts.cpp:347:5:  [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 buffer[128];
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp:77:12:  [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.
    static char buf[10240];
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp:78:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "NODE_%d_length_%d_cov_%0.2f_ID_%d", i, len, mul, i * 2 - 1);
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp:90:18:  [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).
    unsigned k = atoi(argv[2]) - 1; // megahit uses a different de bruijn definition as us, so it's k-1 for us
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/contigs_to_fastg.cpp:118:16:  [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.
        static char osef_s[100];
data/minia-3.2.1+git20200522.4960a99/thirdparty/contig2fastg/kseq.h:135:4:  [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(str->s + str->l, ks->buf + ks->begin, i - ks->begin);  \

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 2232 in approximately 0.08 seconds (27441 lines/second)
Physical Source Lines of Code (SLOC) = 1376
Hits@level = [0]   4 [1]   0 [2]  11 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  19 [1+]  15 [2+]  15 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 13.8081 [1+] 10.9012 [2+] 10.9012 [3+] 2.90698 [4+] 2.18023 [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.