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/indicator-sensors-1.2/indicator-sensors/indicator-sensors.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-application.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-application.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-fan-sensor.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-fan-sensor.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-indicator.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-indicator.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-log.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-log.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-manager.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-manager.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-notify.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-notify.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-preferences-dialog.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-preferences-dialog.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-sensor-dialog.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-sensor-dialog.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-sensor.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-sensor.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-store.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-store.h
Examining data/indicator-sensors-1.2/indicator-sensors/is-temperature-sensor.c
Examining data/indicator-sensors-1.2/indicator-sensors/is-temperature-sensor.h
Examining data/indicator-sensors-1.2/plugins/aticonfig/is-aticonfig-plugin.c
Examining data/indicator-sensors-1.2/plugins/aticonfig/is-aticonfig-plugin.h
Examining data/indicator-sensors-1.2/plugins/dbus/is-dbus-plugin.c
Examining data/indicator-sensors-1.2/plugins/dbus/is-dbus-plugin.h
Examining data/indicator-sensors-1.2/plugins/dynamic/is-dynamic-plugin.c
Examining data/indicator-sensors-1.2/plugins/dynamic/is-dynamic-plugin.h
Examining data/indicator-sensors-1.2/plugins/fake/is-fake-plugin.c
Examining data/indicator-sensors-1.2/plugins/fake/is-fake-plugin.h
Examining data/indicator-sensors-1.2/plugins/libsensors/is-libsensors-plugin.c
Examining data/indicator-sensors-1.2/plugins/libsensors/is-libsensors-plugin.h
Examining data/indicator-sensors-1.2/plugins/max/is-max-plugin.c
Examining data/indicator-sensors-1.2/plugins/max/is-max-plugin.h
Examining data/indicator-sensors-1.2/plugins/nvidia/is-nvidia-plugin.c
Examining data/indicator-sensors-1.2/plugins/nvidia/is-nvidia-plugin.h
Examining data/indicator-sensors-1.2/plugins/udisks/is-udisks-plugin.c
Examining data/indicator-sensors-1.2/plugins/udisks/is-udisks-plugin.h
Examining data/indicator-sensors-1.2/plugins/udisks2/is-udisks2-plugin.c
Examining data/indicator-sensors-1.2/plugins/udisks2/is-udisks2-plugin.h

FINAL RESULTS:

data/indicator-sensors-1.2/indicator-sensors/is-store.c:127:17:  [3] (random) g_random_int:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  priv->stamp = g_random_int();
data/indicator-sensors-1.2/plugins/fake/is-fake-plugin.c:121:23:  [3] (random) g_rand_double_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                      g_rand_double_range(self->priv->rand,
data/indicator-sensors-1.2/plugins/fake/is-fake-plugin.c:142:9:  [3] (random) g_rand_boolean:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (g_rand_boolean(priv->rand))
data/indicator-sensors-1.2/plugins/libsensors/is-libsensors-plugin.c:114: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.
    if (getenv("SNAP") != NULL)
data/indicator-sensors-1.2/plugins/libsensors/is-libsensors-plugin.c:118:31:  [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.
      path = g_build_filename(getenv("SNAP"), "etc", "sensors3.conf", NULL);
data/indicator-sensors-1.2/plugins/libsensors/is-libsensors-plugin.c:119:11:  [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).
      f = fopen(path, "r");
data/indicator-sensors-1.2/plugins/aticonfig/is-aticonfig-plugin.c:237:32:  [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).
  gpu = g_ascii_strtoll(path + strlen(ATICONFIG_GPU_PREFIX), NULL, 10);
data/indicator-sensors-1.2/plugins/nvidia/is-nvidia-plugin.c:197:27:  [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(map[i].description), NULL, 10);

ANALYSIS SUMMARY:

Hits = 8
Lines analyzed = 11409 in approximately 0.25 seconds (45434 lines/second)
Physical Source Lines of Code (SLOC) = 8900
Hits@level = [0]   1 [1]   2 [2]   1 [3]   5 [4]   0 [5]   0
Hits@level+ = [0+]   9 [1+]   8 [2+]   6 [3+]   5 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 1.01124 [1+] 0.898876 [2+] 0.674157 [3+] 0.561798 [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.