Location of the file: /home/maikel/projects/pythondev/codeaudit/tests/validationfiles/allshit.py
Number of potential security issues found: 51
| line | validation | severity | info | code |
|---|---|---|---|---|
| 6 | assert | Low | Assertions are for debugging and development. Misuse can lead to security vulnerabilities. | |
| 28 | exec | High | This built-in function can execute code you do not want and/or aware of. So check and validate if it is used correct. | |
| 32 | s.bind | Medium | Network sockets require additional measurements. | |
| 33 | s.bind | Medium | Network sockets require additional measurements. | |
| 42 | assert | Low | Assertions are for debugging and development. Misuse can lead to security vulnerabilities. | |
| 46 | pass | Low | Too broad exception handling risk when not used correctly. | |
| 52 | continue | Low | Too broad exception handling risk when not used correctly. | |
| 73 | hashlib.md5 | High | Use of insecure hashing algorithms detected. | |
| 74 | hashlib.sha1 | High | Use of insecure hashing algorithms detected. | |
| 102 | hashlib.sha1 | High | Use of insecure hashing algorithms detected. | |
| 116 | os.access | High | Operating System calls can have a security impact and should be inspected in detail. | |
| 119 | eval | High | This function can executes arbitrary code. | |
| 120 | exec | High | This built-in function can execute code you do not want and/or aware of. So check and validate if it is used correct. | |
| 123 | os.access | High | Operating System calls can have a security impact and should be inspected in detail. | |
| 126 | os.chmod | High | Operating System calls can have a security impact and should be inspected in detail. | |
| 141 | pass | Low | Too broad exception handling risk when not used correctly. | |
| 154 | os.system | High | Operating System calls can have a security impact and should be inspected in detail. | |
| 158 | os.popen | High | Operating System calls can have a security impact and should be inspected in detail. | |
| 159 | os.write | Low | os.write can cause availability issues if not done correct. | |
| 160 | os.writev | Low | os.writev can cause availability issues if not done correct. | |
| 163 | logging.config | Low | Potential security issues can arise with parsing objects and incorrect sanitizing. | |
| 166 | logging.config | Low | Potential security issues can arise with parsing objects and incorrect sanitizing. | |
| 174 | tarfile.TarFile | High | Extracting files within a program should never be trusted by default. This issue is detected when the zipfile and/or tarfile module with an extraction method is used. | |
| 178 | tarfile.TarFile | High | Extracting files within a program should never be trusted by default. This issue is detected when the zipfile and/or tarfile module with an extraction method is used. | |
| 185 | tarfile.TarFile | High | Extracting files within a program should never be trusted by default. This issue is detected when the zipfile and/or tarfile module with an extraction method is used. | |
| 202 | xmlrpc.server SimpleXMLRPCServer |
High | xmlrpc.server is vulnerable to the “decompression bomb” attack. | |
| 209 | xmlrpc.client | High | xmlrpc is vulnerable to the “decompression bomb” attack. | |
| 215 | os.fork | Low | On macOS use of this function is unsafe when mixed with using higher-level system APIs, and that includes using urllib.request. | |
| 217 | os.forkpty | Low | Use of forkpty can be unsafe when used on MacOS. | |
| 218 | os.fork | Low | On macOS use of this function is unsafe when mixed with using higher-level system APIs, and that includes using urllib.request. | |
| 224 | os.fork | Low | On macOS use of this function is unsafe when mixed with using higher-level system APIs, and that includes using urllib.request. | |
| 227 | compile | High | It is possible to crash the Python interpreter when using this function. | |
| 230 | base64 | Low | Base encoding visually hides otherwise easily recognized information such as passwords, but does not provide any computational confidentiality. | |
| 231 | base64 | Low | Base encoding visually hides otherwise easily recognized information such as passwords, but does not provide any computational confidentiality. | |
| 236 | http.server BaseHTTPRequestHandler |
High | Insecure for production use. | |
| 255 | http.server HTTPServer |
High | Insecure for production use. | |
| 255 | http.server BaseHTTPRequestHandler |
High | Insecure for production use. | |
| 291 | connection.recv | High | Connection.recv() uses pickle | |
| 304 | pickle.loads | High | unpickling will import any class or function that it finds in the pickle data | |
| 308 | pickle.load | High | unpickling will import any class or function that it finds in the pickle data | |
| 312 | pickle.loads | High | unpickling will import any class or function that it finds in the pickle data | |
| 326 | random.seed | Low | The pseudo-random generators of this module should not be used for security purposes. | |
| 327 | random.random | Low | The pseudo-random generators of this module should not be used for security purposes. | |
| 331 | shelve.open | High | Only loading a shelve from a trusted source is secure. So check if this is the case. | |
| 343 | os.makedirs | Low | Operating System calls can have a security impact and should be inspected in detail. | |
| 344 | zipfile.ZipFile | High | Extracting files within a program should never be trusted by default. This issue is detected when the zipfile and/or tarfile module with an extraction method is used. | |
| 346 | tarfile.TarFile | High | Extracting files within a program should never be trusted by default. This issue is detected when the zipfile and/or tarfile module with an extraction method is used. | |
| 355 | shutil.unpack_archive | Medium | Extracting files within a program should not be trusted by default. | |
| 358 | shutil.copy | Medium | Information can be transfered without permission. | |
| 373 | marshal.loads | High | The marshal module is not intended to be secure against erroneous or maliciously constructed data. | |
| 379 | marshal.load | High | The marshal module is not intended to be secure against erroneous or maliciously constructed data. | |
| FileName | FilePath | Number_Of_Lines | AST_Nodes | Modules | Functions | Classes | Comment_Lines | Complexity_Score | warnings |
|---|---|---|---|---|---|---|---|---|---|
| allshit.py | /home/maikel/projects/pythondev/codeaudit/tests/validationfiles/allshit.py | 390 | 205 | 28 | 19 | 3 | 78 | 34 | 0 |
Disclaimer:This SAST tool 'codeaudit' provides a powerful automatic security analysis for Python source code. However it's not a substitute for human review in combination with business knowledge. Undetected vulnerabilities may still exist. There is and will never be a single security tool that gives 100% automatic guarantees. By reporting any issues you find, you contribute to a better tool for everyone.