Black List Imports

Blacklists (Imports)

Overview

The "Blacklists (Imports)" feature in BugZ is designed to identify and flag potentially risky module imports in Python code. By categorizing these imports based on their security implications, BugZ helps developers mitigate security risks associated with third-party modules. This page presents a comprehensive table of blacklisted imports categorized by severity level.

Function Calls Considered Harmful

The following tables provide an overview of various security vulnerabilities identified by their unique IDs, names, the specific imports that are considered risky, and their severity levels. This information is crucial for developers looking to mitigate potential security risks in their applications.

High Severity Imports

IDNameImportsSeverity
2001import_telnetlibtelnetlibHigh
2002import_ftplibftplibHigh
2011import_xmlrpclibxmlrpcHigh
2012import_httpoxywsgiref.handlers.CGIHandler, twisted.web.twcgi.CGIScriptHigh
2013import_pycryptoCrypto.Cipher, Crypto.Hash, Crypto.IO, Crypto.Protocol, Crypto.PublicKey, Crypto.Random, Crypto.Signature, Crypto.UtilHigh
2014import_pycryptodomeCryptodome.Cipher, Cryptodome.Hash, Cryptodome.IO, Cryptodome.Protocol, Cryptodome.PublicKey, Cryptodome.Random, Cryptodome.Signature, Cryptodome.UtilHigh
2015import_pyghmipyghmiHigh

Low Severity Imports

IDNameImportsSeverity
2003import_picklepickle, cPickle, dill, shelveLow
2004import_subprocesssubprocessLow
2005import_xml_etreexml.etree.cElementTree, xml.etree.ElementTreeLow
2006import_xml_saxxml.saxLow
2007import_xml_expatxml.dom.expatbuilderLow
2008import_xml_minidomxml.dom.minidomLow
2009import_xml_pulldomxml.dom.pulldomLow
2010import_lxmllxmlLow

This table is a part of BugZ's effort to provide comprehensive security insights into commonly used but potentially risky imports in Python, enabling developers to enhance their code security effectively.

Best Practices

  • Regular Code Reviews: Incorporate regular code reviews focusing on security to catch uses of blacklisted imports.
  • Static Analysis: Use static analysis tools like BugZ routinely to automatically detect and report the use of high-risk imports.
  • Developer Education: Educate developers about the risks associated with these imports and train them on safer alternatives.

By adhering to these guidelines and using BugZ, you can significantly enhance the security posture of your applications, mitigating the risk of exploiting dangerous imports.