Shell

Shell

Made by DeepSource

A system directory is being deleted SH-2114

Security
Critical

The example line of code below was an actual bug in the Bumblebee NVIDIA driver.

Due to an accidental space, it deleted /usr instead of just the particular directory.

Bad Practice

rm -rf /usr /lib/nvidia-current/xorg/xorg

Recommended:

rm -rf /usr/lib/nvidia-current/xorg/xorg

Exceptions

If you do intend to delete a system directory, such as when working in a chroot or initramfs, you can disable this message with a directive:

# skipcq: SH-2114
rm -rf /usr