codeaudit 1.6.5__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. {codeaudit-1.6.5 → codeaudit-1.7.0}/CHANGELOG.md +31 -1
  2. {codeaudit-1.6.5 → codeaudit-1.7.0}/PKG-INFO +2 -2
  3. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/_toc.yml +8 -5
  4. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/astlines.md +0 -2
  5. codeaudit-1.7.0/docs/checks/base64_check.md +88 -0
  6. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/exception_check.md +19 -8
  7. codeaudit-1.7.0/docs/cimode.md +276 -0
  8. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/codeauditcommands.md +1 -1
  9. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/codeauditchecks.html +22 -4
  10. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/demoscan.json +16 -16
  11. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/features.md +1 -1
  12. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/filescan.md +2 -0
  13. codeaudit-1.7.0/docs/installation.md +45 -0
  14. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/intro.md +1 -1
  15. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/whysast.md +7 -3
  16. {codeaudit-1.6.5 → codeaudit-1.7.0}/pyproject.toml +1 -1
  17. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/__about__.py +1 -1
  18. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/api_helpers.py +0 -2
  19. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/api_interfaces.py +1 -1
  20. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/api_reporting.py +3 -3
  21. codeaudit-1.7.0/src/codeaudit/ci_workflowscan.py +384 -0
  22. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/corecli.py +3 -0
  23. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/dashboard_reports.py +11 -11
  24. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/data/sastchecks.csv +4 -1
  25. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/dashboardapp.py +2 -2
  26. codeaudit-1.7.0/src/dashboard/module_load_validation.html +64 -0
  27. codeaudit-1.7.0/src/dashboard/module_load_validation2.html +112 -0
  28. codeaudit-1.6.5/src/dashboard/pyodide/dashboardapp.html → codeaudit-1.7.0/src/dashboard/pyodide/dashboardapp_version166.html +10 -10
  29. codeaudit-1.6.5/src/dashboard/pyodide/dashboardapp.js → codeaudit-1.7.0/src/dashboard/pyodide/dashboardapp_version166.js +1 -1
  30. codeaudit-1.7.0/src/dashboard/pyodide/deployed/dashboardapp_version166.html +295 -0
  31. codeaudit-1.7.0/src/dashboard/pyodide/deployed/dashboardapp_version166.js +91 -0
  32. codeaudit-1.7.0/tests/test_base64.py +31 -0
  33. codeaudit-1.7.0/tests/test_dynamic_import.py +27 -0
  34. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_standardlibconstructs.py +0 -20
  35. codeaudit-1.7.0/tests/validationfiles/base64.py +20 -0
  36. codeaudit-1.7.0/tests/validationfiles/danger_imports.py +9 -0
  37. codeaudit-1.6.5/docs/checks/base64_check.md +0 -62
  38. codeaudit-1.6.5/docs/installation.md +0 -24
  39. codeaudit-1.6.5/docs/securecoding.md +0 -120
  40. codeaudit-1.6.5/docs/validatetips.md +0 -95
  41. codeaudit-1.6.5/src/dashboard/pyodide/tiny.html +0 -249
  42. codeaudit-1.6.5/src/dashboard/pyodide/tiny.js +0 -91
  43. codeaudit-1.6.5/tests/validationfiles/base64.py +0 -4
  44. {codeaudit-1.6.5 → codeaudit-1.7.0}/.github/workflows/python-test.yml +0 -0
  45. {codeaudit-1.6.5 → codeaudit-1.7.0}/.gitignore +0 -0
  46. {codeaudit-1.6.5 → codeaudit-1.7.0}/CONTRIBUTE.md +0 -0
  47. {codeaudit-1.6.5 → codeaudit-1.7.0}/LICENSE.txt +0 -0
  48. {codeaudit-1.6.5 → codeaudit-1.7.0}/README.md +0 -0
  49. {codeaudit-1.6.5 → codeaudit-1.7.0}/SECURITY.md +0 -0
  50. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/.gitignore +0 -0
  51. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/class_index.html +0 -0
  52. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
  53. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/favicon_32_cb_c827f16f.png +0 -0
  54. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/function_index.html +0 -0
  55. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/index.html +0 -0
  56. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
  57. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/status.json +0 -0
  58. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/style_cb_9ff733b0.css +0 -0
  59. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
  60. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
  61. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
  62. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
  63. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
  64. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
  65. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
  66. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
  67. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
  68. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
  69. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
  70. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
  71. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
  72. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
  73. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
  74. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
  75. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
  76. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
  77. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
  78. {codeaudit-1.6.5 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
  79. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/CLIcommands.ipynb +0 -0
  80. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/CONTRIBUTE.md +0 -0
  81. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/_config.yml +0 -0
  82. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/_static/nocxstyle.css +0 -0
  83. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/about.md +0 -0
  84. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/apidocs/api_intro.md +0 -0
  85. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/apidocs/codeaudit.rst +0 -0
  86. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/apidocs/modules.rst +0 -0
  87. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/architecture.md +0 -0
  88. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/astlines2.md +0 -0
  89. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/changelog.md +0 -0
  90. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/assert_check.md +0 -0
  91. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/binding_check.md +0 -0
  92. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/builtinfunctions_check.md +0 -0
  93. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/chmod_check.md +0 -0
  94. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/directorycreation_check.md +0 -0
  95. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/dynamicimport_check.md +0 -0
  96. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/ftp_check.md +0 -0
  97. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/hash_check.md +0 -0
  98. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/httpserver_check.md +0 -0
  99. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/input_check.md +0 -0
  100. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/loggingconf_check.md +0 -0
  101. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/marshal_check.md +0 -0
  102. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/mktemp_check.md +0 -0
  103. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/multiprocessing_check.md +0 -0
  104. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/pickle_check.md +0 -0
  105. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/random_check.md +0 -0
  106. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/shelve_check.md +0 -0
  107. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/shutil_check.md +0 -0
  108. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/subprocess_check.md +0 -0
  109. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/syscalls_check.md +0 -0
  110. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/systemcalls_check.md +0 -0
  111. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/tarfile_extract_check.md +0 -0
  112. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/xml_check.md +0 -0
  113. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checks/zipfile_check.md +0 -0
  114. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/checksinformation.md +0 -0
  115. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/codeauditchecks.md +0 -0
  116. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/codeauditoverview.md +0 -0
  117. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/complexitycheck.md +0 -0
  118. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/data_egress_implementation.md +0 -0
  119. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/data_exfiltration_detection.md +0 -0
  120. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_api_example_basic.ipynb +0 -0
  121. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_api_example_checks.ipynb +0 -0
  122. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_api_example_json.ipynb +0 -0
  123. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_api_example_overview.ipynb +0 -0
  124. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_api_example_scanning.ipynb +0 -0
  125. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/ca_checks.ipynb +0 -0
  126. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/demofile.py +0 -0
  127. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/directoryscan.html +0 -0
  128. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/example_risk_heatmap.ipynb +0 -0
  129. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
  130. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/filescan.html +0 -0
  131. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/modulescan.html +0 -0
  132. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/examples/overview.html +0 -0
  133. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/filescan.png +0 -0
  134. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/handling_errors.md +0 -0
  135. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/help.md +0 -0
  136. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/howtoscan.md +0 -0
  137. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/OO.png +0 -0
  138. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/ROI_logo.png +0 -0
  139. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/YourLogoHere.png +0 -0
  140. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/ai_use.png +0 -0
  141. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/architecture_overview.png +0 -0
  142. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/codeauditlogo.png +0 -0
  143. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/filescan_screenshot_16012026.png +0 -0
  144. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/modulescan_screenshot_16012026.png +0 -0
  145. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/nocxbanner.png +0 -0
  146. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/overview_linkaudit.png +0 -0
  147. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/images/overview_screenshot_16012026.png +0 -0
  148. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/implementedvalidations.md +0 -0
  149. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/issues.md +0 -0
  150. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/license.md +0 -0
  151. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/makeitbetter.md +0 -0
  152. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/markingissues.md +0 -0
  153. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/modulescan.md +0 -0
  154. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/overviewplot.png +0 -0
  155. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/pca_overview.png +0 -0
  156. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/project_philosophy.md +0 -0
  157. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/sponsors.md +0 -0
  158. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/userguide.md +0 -0
  159. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/warnings.md +0 -0
  160. {codeaudit-1.6.5 → codeaudit-1.7.0}/docs/whatissast.md +0 -0
  161. {codeaudit-1.6.5 → codeaudit-1.7.0}/filescan.png +0 -0
  162. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/__init__.py +0 -0
  163. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/altairplots.py +0 -0
  164. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/checkmodules.py +0 -0
  165. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/complexitycheck.py +0 -0
  166. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/data/secretslist.txt +0 -0
  167. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/filehelpfunctions.py +0 -0
  168. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
  169. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/issuevalidations.py +0 -0
  170. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/privacy_lint.py +0 -0
  171. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/pypi_package_scan.py +0 -0
  172. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/reporting.py +0 -0
  173. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/security_checks.py +0 -0
  174. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/simple.css +0 -0
  175. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/suppression.py +0 -0
  176. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/codeaudit/totals.py +0 -0
  177. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/__init__.py +0 -0
  178. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
  179. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp_version162.html +0 -0
  180. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp_version162.js +0 -0
  181. {codeaudit-1.6.5 → codeaudit-1.7.0}/src/dashboard/requirements.txt +0 -0
  182. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/__init__.py +0 -0
  183. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/count_lines_file1.py +0 -0
  184. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/clean.py +0 -0
  185. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/elastic.py +0 -0
  186. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/example1.py +0 -0
  187. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/klyne.py +0 -0
  188. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/mixed.py +0 -0
  189. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/telemetry.py +0 -0
  190. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/spytestdir/telemetryfile2.py +0 -0
  191. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/suppression/sastsuppression_0.py +0 -0
  192. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/suppression/sastsuppression_1.py +0 -0
  193. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/suppression/sastsuppression_2.py +0 -0
  194. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_apicalls.py +0 -0
  195. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_apicalls2.py +0 -0
  196. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_basicpatterns.py +0 -0
  197. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_chmod.py +0 -0
  198. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_constructspart2.py +0 -0
  199. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_correctexceptionuse.py +0 -0
  200. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_count_commentlines.py +0 -0
  201. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_directorycreation.py +0 -0
  202. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_directorycreation2.py +0 -0
  203. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_edgecases.py +0 -0
  204. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_ftp.py +0 -0
  205. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_hashstrenght.py +0 -0
  206. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_modulecheck.py +0 -0
  207. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_obfuscatingbuiltins.py +0 -0
  208. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_oschecks.py +0 -0
  209. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_pylintreport.py +0 -0
  210. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_pypiscan.py +0 -0
  211. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_random.py +0 -0
  212. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_secretfinding.py +0 -0
  213. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_subprocess.py +0 -0
  214. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_suppression.py +0 -0
  215. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_suppressionlogic.py +0 -0
  216. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_totalscheck.py +0 -0
  217. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_wasmsafe_funtions.py +0 -0
  218. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/test_zstd.py +0 -0
  219. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/unit_tests/__init__.py +0 -0
  220. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/unit_tests/test_collectsourcefiles.py +0 -0
  221. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/unit_tests/test_filehelpfunctions.py +0 -0
  222. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/unit_tests/test_readinsourcefile.py +0 -0
  223. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/allshit.py +0 -0
  224. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/apivalidations.py +0 -0
  225. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/assert.py +0 -0
  226. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/chmod_things.py +0 -0
  227. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/complexitycheck.py +0 -0
  228. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/correctcounts.py +0 -0
  229. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/directorycreation.py +0 -0
  230. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/directorycreation2.py +0 -0
  231. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
  232. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/eval.py +0 -0
  233. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/eval2.py +0 -0
  234. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/exception.py +0 -0
  235. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/file3.py +0 -0
  236. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/file_with_warnings.py +0 -0
  237. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/ftp.py +0 -0
  238. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/gzip.py +0 -0
  239. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/hashcheck.py +0 -0
  240. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/httpserver.py +0 -0
  241. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/inputstatement.py +0 -0
  242. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/marshal.py +0 -0
  243. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/modulecheck.py +0 -0
  244. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/multiprocessing.py +0 -0
  245. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/obfuscating.py +0 -0
  246. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/oschecks.py +0 -0
  247. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/pickle.py +0 -0
  248. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
  249. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/random.py +0 -0
  250. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/shelve.py +0 -0
  251. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/shutil.py +0 -0
  252. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/subprocess.py +0 -0
  253. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/syslibrary.py +0 -0
  254. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/tarfilevalidation.py +0 -0
  255. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/tempcheck.py +0 -0
  256. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/validation1.py +0 -0
  257. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/validation2.py +0 -0
  258. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/xml.py +0 -0
  259. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/zipfile.py +0 -0
  260. {codeaudit-1.6.5 → codeaudit-1.7.0}/tests/validationfiles/zstd.py +0 -0
@@ -1,7 +1,37 @@
1
1
  # Change Log
2
2
 
3
- ## Version 1.6.5:
3
+ ## Version 1.7.0:
4
+
5
+ **Added**
6
+
7
+ * **CI Option:** Added a new Continuous Integration (CI) option. (See [issue #24](https://github.com/nocomplexity/codeaudit/issues/24))
8
+
9
+ **Documentation**
10
+
11
+ * **Fixes & Updates:** Minor documentation fixes and content updates.
12
+
13
+
14
+
15
+ ## Version 1.6.6:
16
+
17
+ **Added:**
4
18
 
19
+ * Extended checking capabilities for Base64 encoding to improve validation rigor.
20
+
21
+ **Changed**
22
+
23
+ * Updated `pyproject.toml` configuration to align with the new WebAssembly (WASM) release requirements.
24
+
25
+ **Fixed**
26
+
27
+ * Resolved compatibility issues and bugs to fully support the new stable WASM version.
28
+
29
+ **Documentation**
30
+
31
+ * Miscellaneous documentation improvements and updates for clarity and coverage.
32
+
33
+
34
+ ## Version 1.6.5:
5
35
 
6
36
  **Added:**
7
37
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeaudit
3
- Version: 1.6.5
3
+ Version: 1.7.0
4
4
  Summary: A modern Python security source code analyzer (SAST) based on distrust.
5
5
  Project-URL: Documentation, https://github.com/nocomplexity/codeaudit#readme
6
6
  Project-URL: Issues, https://github.com/nocomplexity/codeaudit/issues
@@ -23,7 +23,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
23
23
  Requires-Python: >=3.11
24
24
  Requires-Dist: altair==6.0.0
25
25
  Requires-Dist: fire==0.7.1
26
- Requires-Dist: pandas==3.0.2
26
+ Requires-Dist: pandas>=2.3
27
27
  Provides-Extra: test
28
28
  Requires-Dist: black; extra == 'test'
29
29
  Requires-Dist: pylint; extra == 'test'
@@ -10,7 +10,11 @@ parts:
10
10
  - file: whatissast
11
11
  - file: whysast
12
12
  - url: https://securitytesting.nocomplexity.com/
13
- title: Mastering Security Testing for Python
13
+ title: Security Testing for Python
14
+ - url: http://securitybydesign.nocomplexity.com/
15
+ title: Security By Design
16
+ - url: https://nocomplexity.github.io/pythonsecurity/
17
+ title: Python Security Handbook
14
18
 
15
19
 
16
20
 
@@ -27,13 +31,12 @@ parts:
27
31
  sections:
28
32
  - file: data_egress_implementation
29
33
  - file: issues
30
- - file: markingissues
31
- - file: securecoding
34
+ - file: markingissues
32
35
  - file: complexitycheck
33
36
  - file: warnings
34
37
  - file: handling_errors
35
- - file: implementedvalidations
36
- - file: validatetips
38
+ - file: cimode
39
+ - file: implementedvalidations
37
40
  - file: checksinformation
38
41
  sections:
39
42
  - file: checks/assert_check
@@ -109,5 +109,3 @@ def example():
109
109
  5. **Why the Difference Matters**
110
110
  - `wc -l` is useful for getting a raw count of lines in a file, often used for file statistics or quick checks.
111
111
  - `count_ast_lines` is more relevant for analyzing **executable code complexity** or **code coverage**, as it focuses on lines that represent actual Python syntax nodes, ignoring non-executable content like comments or blank lines.
112
-
113
- Let me know if you need further examples or clarification!
@@ -0,0 +1,88 @@
1
+ # Base64 Statements
2
+
3
+ The Python Code Audit tool detects obfuscated content, particularly code that uses `base64` (and related encodings) for encoding or decoding data.
4
+
5
+ It specifically checks for the following calls:
6
+
7
+ * `base64.b64decode`
8
+ * `base64.b64encode`
9
+ * `base64.b85encode`
10
+ * `base64.z85decode`
11
+
12
+ ## Rationale
13
+
14
+ Obfuscation using Base64 is a **long-standing and simple technique** commonly employed to conceal malicious code in Python projects. It enables attackers to hide payloads that would otherwise be easily identified.
15
+
16
+ The use of obfuscated content is uncommon in well-structured, legitimate Python code and is therefore considered a strong indicator of potential security risks.
17
+
18
+ It is strongly recommended that any code containing Base64 encoding/decoding be carefully reviewed before deployment to production. **Python Code Audit** performs this check automatically.
19
+
20
+ **Key red flags include:**
21
+ * `base64.b64decode` followed immediately by `exec()` or `eval()`
22
+ * Long Base64 strings embedded in Python scripts
23
+ * Constructs such as `exec(base64.b64decode(...))` from untrusted sources
24
+
25
+ ## Common Malware Patterns
26
+
27
+ Base64 encoding patterns are frequently found in Python-based malware and droppers:
28
+
29
+ | Pattern | Code Snippet | Why It Is Detected | Implemented |
30
+ |----------------------|---------------------------------------------------|--------------------------------------------------|-------------|
31
+ | Standard b64 + exec | `exec(base64.b64decode(long_string))` | Extremely common obfuscation technique | ✅ |
32
+ | Compressed | `exec(zlib.decompress(base64.b64decode(...)))` | Suggests larger hidden payload and evasion | ✅ |
33
+ | Multi-layer | `base64.b64decode(base64.b64decode(...))` | Attempts to bypass simple pattern matching | ✅ |
34
+ | Bytes decode | `exec(base64.b64decode(data).decode())` | Hides intent by decoding to string | ✅ |
35
+ | Using aliases | `b64 = base64.b64decode; exec(b64(payload))` | Evasion of basic static analysis | ✅ |
36
+ | Z85 / b85 | `base64.b85decode(...)` or `base64.z85decode(...)` | Non-standard encodings often indicate stealth | ✅ |
37
+
38
+ ## Security Considerations
39
+
40
+ Base encoding does not provide confidentiality. As noted in RFC 4648 (Section 12), care must be taken when implementing base encoding and decoding to avoid introducing vulnerabilities.
41
+
42
+ Security considerations section from RFC 4648 (section 12):
43
+
44
+ ```text
45
+ Security Considerations
46
+
47
+ When base encoding and decoding is implemented, care should be taken
48
+ not to introduce vulnerabilities to buffer overflow attacks, or other
49
+ attacks on the implementation. A decoder should not break on invalid
50
+ input including, e.g., embedded NUL characters (ASCII 0).
51
+
52
+ If non-alphabet characters are ignored, instead of causing rejection
53
+ of the entire encoding (as recommended), a covert channel that can be
54
+ used to "leak" information is made possible. The ignored characters
55
+ could also be used for other nefarious purposes, such as to avoid a
56
+ string equality comparison or to trigger implementation bugs. The
57
+ implications of ignoring non-alphabet characters should be understood
58
+ in applications that do not follow the recommended practice.
59
+ Similarly, when the base 16 and base 32 alphabets are handled case
60
+ insensitively, alteration of case can be used to leak information or
61
+ make string equality comparisons fail.
62
+
63
+ When padding is used, there are some non-significant bits that
64
+ warrant security concerns, as they may be abused to leak information
65
+ or used to bypass string equality comparisons or to trigger
66
+ implementation problems.
67
+
68
+ Base encoding visually hides otherwise easily recognized information,
69
+ such as passwords, but does not provide any computational
70
+ confidentiality. This has been known to cause security incidents
71
+ when, e.g., a user reports details of a network protocol exchange
72
+ (perhaps to illustrate some other problem) and accidentally reveals
73
+ the password because she is unaware that the base encoding does not
74
+ protect the password.
75
+
76
+ Base encoding adds no entropy to the plaintext, but it does increase
77
+ the amount of plaintext available and provide a signature for
78
+ cryptanalysis in the form of a characteristic probability
79
+ distribution.
80
+ ```
81
+
82
+
83
+ ## References
84
+
85
+ * [Python Documentation – base64](https://docs.python.org/3/library/base64.html)
86
+ * [RFC 4648 – Security Considerations](https://datatracker.ietf.org/doc/html/rfc4648#section-12)
87
+ * [Base64 Malleability in Practice](https://eprint.iacr.org/2022/361.pdf)
88
+
@@ -1,15 +1,26 @@
1
- # Exception statements
1
+ ## Exception Statements
2
2
 
3
- Codeaudit checks the `onpass` in a except block.
3
+ Codeaudit detects the use of `pass` within an `except` block.
4
4
 
5
- The Python code `try: do_some_stuff() except Exception: pass` presents potential security risks due to its overly broad exception handling and silent failure option.
5
+ The Python pattern:
6
+ ```python
7
+ try:
8
+ do_some_stuff()
9
+ except Exception:
10
+ pass
11
+ ```
6
12
 
7
- This also applies when using `continue`!
13
+ presents potential security risks due to:
14
+ - **Overly broad exception handling** – catching `Exception` masks virtually all errors
15
+ - **Silent failure** – using `pass` suppresses all evidence that something went wrong
16
+
17
+ This security concern also applies when using `continue` inside an exception block, as it similarly bypasses error reporting.
18
+
19
+ **Python Code Audit detects:**
20
+
21
+ - `pass` statements in exception clauses
22
+ - `continue` statements in exception clauses
8
23
 
9
- So Codeaudit also checks on:
10
- * `pass` and
11
- * `continue`
12
- statements in exception clauses.
13
24
 
14
25
  ## Background
15
26
 
@@ -0,0 +1,276 @@
1
+ # CI Integration
2
+
3
+ Python Code Audit is a fast, local-first SAST tool for analysing Python code and detecting potential security weaknesses. While it is particularly useful for auditing third-party code, it should also be run regularly on your own projects to ensure continuous security validation.
4
+
5
+ Python Code Audit integrates easily into CI/CD pipelines and standard code quality workflows. A CI job can be configured in just a few steps, supporting our goal of simple, effective security tooling. This allows you to focus on reviewing findings and applying fixes based on [Security by Design principles](https://nocomplexity.github.io/securitybydesign/securityprinciples/).
6
+
7
+ If you have improvements or CI configuration tips, contributions via pull requests to this documentation are welcome.
8
+
9
+ :::{note}
10
+ [Data Exfiltration Detection functionality](data_exfiltration_detection) is not yet available in CI pipelines.
11
+ :::
12
+
13
+
14
+ :::{admonition} By default, CI scan mode uses the same analysis engine as the CLI version
15
+ :class: important
16
+
17
+ So Keep in mind:
18
+
19
+ * [Some directories are excluded from SAST scanning](excluded_directories)
20
+ * Findings marked with [markissues-label](markissues-label) are ignored by default in CI mode
21
+ :::
22
+
23
+
24
+ ## CI Mode Command
25
+
26
+ CI mode is enabled using the following CLI command:
27
+
28
+ ```bash
29
+ codeaudit cimode [file|directory] [--output text|html|json] [--nosec True|False]
30
+ ```
31
+
32
+ ### Default behaviour
33
+
34
+ * Output format: `text`
35
+ * `nosec=True` (ignores lines marked with `# nosec`)
36
+
37
+
38
+
39
+ ### Quick Test Run
40
+
41
+ You can test CI mode locally before integrating it into your pipeline:
42
+
43
+ ```bash
44
+ codeaudit cimode .
45
+ ```
46
+
47
+ Here, `.` represents the current working directory.
48
+
49
+
50
+ ### Command Options
51
+
52
+
53
+ | Option | Description |
54
+ | -------------- | ---------------------------------------------------------- |
55
+ | `-o, --output` | Output format: `text`, `html`, or `json` (default: `text`) |
56
+ | `-n, --nosec` | Ignore findings marked with `# nosec` (default: `True`) |
57
+
58
+
59
+
60
+
61
+ ## GitLab CI Integration
62
+
63
+
64
+ Integrating Python Code Audit with [GitLab.com](https://gitlab.com) is straightforward and can be completed in just a few minutes.
65
+
66
+ For GitLab CI jobs, it is recommended to always save **artifacts**, even when the job fails. This ensures that scan results are available for review in all cases. It is especially useful when using the HTML report format, as it allows you to quickly view findings directly in the browser via the CI artifacts interface.
67
+
68
+ If needed, you can also export the `json` output for further processing in a separate secure environment, for example to integrate results into dashboards, ticketing systems, or additional analysis pipelines.
69
+
70
+
71
+ ### HTML report example
72
+
73
+
74
+ ```yml
75
+ # SAST scan with Python Code Audit on GitLab.com
76
+ image: python:3.13-slim
77
+
78
+ stages:
79
+ - scan
80
+
81
+ codeaudit-scan:
82
+ stage: scan
83
+
84
+ before_script:
85
+ - python -m pip install --upgrade pip
86
+
87
+ script:
88
+ - pip install codeaudit
89
+ - codeaudit --version
90
+ - codeaudit cimode . --output html > codeaudit-output.html
91
+
92
+ allow_failure: true
93
+
94
+ artifacts:
95
+ when: always
96
+ name: "codeaudit-${CI_COMMIT_REF_NAME}"
97
+ paths:
98
+ - codeaudit-output.html
99
+ expire_in: 1 week
100
+ expose_as: "Python Code Audit Report"
101
+ ```
102
+
103
+ If a scan detects security weaknesses, the job will fail by default. In many workflows, it is common to allow CI failures so that issues are visible without blocking all development activity.
104
+
105
+ After the job completes, results are available in the CI **artifacts**. Use *Browse artifacts* to open the HTML report directly in your browser.
106
+
107
+
108
+ ### Plain Text Output Example
109
+
110
+ For simple readable output in CI logs:
111
+
112
+ ```yaml
113
+ codeaudit-scan:
114
+ stage: scan
115
+
116
+ before_script:
117
+ - python -m pip install --upgrade pip
118
+
119
+ script:
120
+ - pip install codeaudit
121
+ - codeaudit --version
122
+ - codeaudit cimode . | tee codeaudit-output.txt
123
+
124
+ allow_failure: true
125
+
126
+ artifacts:
127
+ when: always
128
+ name: "codeaudit-${CI_COMMIT_REF_NAME}"
129
+ paths:
130
+ - codeaudit-output.txt
131
+ expire_in: 1 week
132
+ expose_as: "Python Code Audit Report"
133
+ ```
134
+
135
+
136
+ ### JSON Output Example
137
+
138
+ For structured processing or integration with other tools:
139
+
140
+ ```yml
141
+ codeaudit-scan:
142
+ stage: scan
143
+
144
+ before_script:
145
+ - python -m pip install --upgrade pip
146
+
147
+ script:
148
+ - pip install codeaudit
149
+ - codeaudit --version
150
+ - codeaudit cimode . --output json | tee codeaudit-output.json
151
+
152
+ allow_failure: true
153
+
154
+ artifacts:
155
+ when: always
156
+ name: "codeaudit-${CI_COMMIT_REF_NAME}"
157
+ paths:
158
+ - codeaudit-output.json
159
+ expire_in: 1 week
160
+ expose_as: "Python Code Audit Report"
161
+ ```
162
+
163
+
164
+ ## GitHub.com CI Integration
165
+
166
+ ### For readable output in CI logs
167
+
168
+ You can use the following example CI configuration:
169
+
170
+ ```yaml
171
+ # SAST scan with Python Code Audit on GitHub Actions
172
+
173
+ name: Python Code Audit SAST Scan
174
+
175
+ on:
176
+ push:
177
+ pull_request:
178
+
179
+ jobs:
180
+ codeaudit-scan:
181
+ runs-on: ubuntu-latest
182
+
183
+ steps:
184
+ - name: Checkout repository
185
+ uses: actions/checkout@v4
186
+
187
+ - name: Set up Python
188
+ uses: actions/setup-python@v5
189
+ with:
190
+ python-version: "3.13"
191
+
192
+ - name: Upgrade pip
193
+ run: python -m pip install --upgrade pip
194
+
195
+ - name: Install Python Code Audit
196
+ run: pip install codeaudit
197
+
198
+ - name: Show version
199
+ run: codeaudit --version
200
+
201
+ - name: Run SAST scan
202
+ run: |
203
+ codeaudit cimode . --output text | tee codeaudit-output.text
204
+ exit ${PIPESTATUS[0]}
205
+
206
+ - name: Upload scan artifact
207
+ uses: actions/upload-artifact@v4
208
+ with:
209
+ name: codeaudit-${{ github.ref_name }}
210
+ path: codeaudit-output.text
211
+
212
+ ```
213
+
214
+
215
+ ### HTML output
216
+
217
+
218
+ ```yaml
219
+ # SAST scan with Python Code Audit on GitHub Actions
220
+
221
+ name: Python Code Audit SAST Scan
222
+
223
+ on:
224
+ push:
225
+ pull_request:
226
+
227
+ jobs:
228
+ codeaudit-scan:
229
+ runs-on: ubuntu-latest
230
+
231
+ steps:
232
+ - name: Checkout repository
233
+ uses: actions/checkout@v4
234
+
235
+ - name: Set up Python
236
+ uses: actions/setup-python@v5
237
+ with:
238
+ python-version: "3.13"
239
+
240
+ - name: Upgrade pip
241
+ run: python -m pip install --upgrade pip
242
+
243
+ - name: Install Python Code Audit
244
+ run: pip install codeaudit
245
+
246
+ - name: Show version
247
+ run: codeaudit --version
248
+
249
+ - name: Run SAST scan (HTML output)
250
+ run: codeaudit cimode . --output html > codeaudit-output.html
251
+
252
+ - name: Upload scan artifact
253
+ uses: actions/upload-artifact@v4
254
+ with:
255
+ name: codeaudit-${{ github.ref_name }}
256
+ path: codeaudit-output.html
257
+
258
+ ```
259
+
260
+ On GitHub Actions, HTML reports are **not rendered directly in the browser** like a live page. They are stored as **workflow artifacts**.
261
+
262
+
263
+ To download SAST result artifacts from the workflow run:
264
+
265
+ After the job finishes:
266
+
267
+ 1. Go to your repository on GitHub
268
+ 2. Open the **Actions** tab
269
+ 3. Select the workflow run
270
+ 4. Scroll to the **Artifacts** section
271
+ 5. Download the artifact (usually a `.zip` file)
272
+ 6. Extract it locally
273
+ 7. Open `codeaudit-output.html` in your browser
274
+
275
+
276
+
@@ -1,6 +1,6 @@
1
1
  % THIS FILE IS GENERATED! - Use CLIcommands.ipynb to make it better!
2
2
  # Commands Overview
3
- Python Code Audit commands for: version: 1.6.5rc4
3
+ Python Code Audit commands for: version: 1.7.0
4
4
  ```
5
5
  ----------------------------------------------------
6
6
  _ __ _
@@ -252,10 +252,28 @@ footer {
252
252
  <td>Assertions are for debugging and development. Assertions can be disabled during runtime. Use in production can introduce vulnerabilities.</td>
253
253
  </tr>
254
254
  <tr>
255
- <td>Base64 Encoding</td>
256
- <td>base64</td>
255
+ <td>Base64 Decoding</td>
256
+ <td>base64.b64decode</td>
257
+ <td>Medium</td>
258
+ <td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
259
+ </tr>
260
+ <tr>
261
+ <td>Base64 Decoding</td>
262
+ <td>base64.b64encode</td>
257
263
  <td>Low</td>
258
- <td>Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
264
+ <td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
265
+ </tr>
266
+ <tr>
267
+ <td>Base64 Decoding</td>
268
+ <td>base64.b85encode</td>
269
+ <td>Low</td>
270
+ <td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
271
+ </tr>
272
+ <tr>
273
+ <td>Base64 Decoding</td>
274
+ <td>base64.z85decode</td>
275
+ <td>Medium</td>
276
+ <td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
259
277
  </tr>
260
278
  <tr>
261
279
  <td>BZ2 File Handling</td>
@@ -744,4 +762,4 @@ footer {
744
762
  <td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
745
763
  </tr>
746
764
  </tbody>
747
- </table><br><p>Number of implemented security validations:<b>84</b></p><p>Version of codeaudit: <b>1.6.5rc4</b><p>Because Python and cybersecurity are constantly changing, issue reports <b>SHOULD</b> specify the codeaudit version used.</p><p><b>Disclaimer:</b> <i>This SAST tool <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> 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.</i></p><p>This Python security report was created on: <b>2026-05-11 16:12</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.6.5rc4</b></p><hr><footer><div class="footer-links">Check the <a href="https://nocomplexity.com/documents/codeaudit/intro.html" target="_blank">documentation</a> for help on found issues.<br>Codeaudit is made with <span class="heart">&#10084;</span> by cyber security professionals who advocate for <a href="https://nocomplexity.com/simplify-security/" target="_blank">open simple security solutions</a>.<br><a href="https://nocomplexity.com/documents/codeaudit/CONTRIBUTE.html" target="_blank">Join the community</a> and contribute to make this tool better!</div></footer></div></body></html>
765
+ </table><br><p>Number of implemented security validations:<b>87</b></p><p>Version of codeaudit: <b>1.7.0</b><p>Because Python and cybersecurity are constantly changing, issue reports <b>SHOULD</b> specify the codeaudit version used.</p><p><b>Disclaimer:</b> <i>This SAST tool <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> 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.</i></p><p>This Python security report was created on: <b>2026-06-10 15:54</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.7.0</b></p><hr><footer><div class="footer-links">Check the <a href="https://nocomplexity.com/documents/codeaudit/intro.html" target="_blank">documentation</a> for help on found issues.<br>Codeaudit is made with <span class="heart">&#10084;</span> by cyber security professionals who advocate for <a href="https://nocomplexity.com/simplify-security/" target="_blank">open simple security solutions</a>.<br><a href="https://nocomplexity.com/documents/codeaudit/CONTRIBUTE.html" target="_blank">Join the community</a> and contribute to make this tool better!</div></footer></div></body></html>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "Python_Code_Audit",
3
- "version": "1.6.5rc4",
4
- "generated_on": "2026-05-11 16:12",
3
+ "version": "1.7.0",
4
+ "generated_on": "2026-06-10 15:54",
5
5
  "file_security_info": {
6
6
  "0": {
7
7
  "FileName": "demofile.py",
@@ -212,6 +212,20 @@
212
212
  "info": "This function can be used to execute arbitrary code or crash the Python interpreter.",
213
213
  "code": "<pre><code class='language-python'>compile(&#x27;nasty-string&#x27; ,&#x27;malware.bin&#x27;,mode=single, flags=0, dont_inherit=False, optimize=-1)</code></pre>"
214
214
  },
215
+ "238": {
216
+ "line": 238,
217
+ "validation": "base64.b64encode",
218
+ "severity": "Low",
219
+ "info": "Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
220
+ "code": "<pre><code class='language-python'>import base64\nencoded = base64.b64encode(b&#x27;data to be encoded&#x27;)\ndata = base64.b64decode(encoded)</code></pre>"
221
+ },
222
+ "239": {
223
+ "line": 239,
224
+ "validation": "base64.b64decode",
225
+ "severity": "Medium",
226
+ "info": "Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
227
+ "code": "<pre><code class='language-python'>encoded = base64.b64encode(b&#x27;data to be encoded&#x27;)\ndata = base64.b64decode(encoded)</code></pre>"
228
+ },
215
229
  "244": {
216
230
  "line": 244,
217
231
  "validation": "http.server.BaseHTTPRequestHandler",
@@ -459,20 +473,6 @@
459
473
  "info": "Parsing untrusted logging configurations can lead to vulnerabilities if not handled correctly.",
460
474
  "code": "<pre><code class='language-python'>logging.config.fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None)\n#&lt;END LOGGING checks&gt;</code></pre>"
461
475
  },
462
- "238": {
463
- "line": 238,
464
- "validation": "base64",
465
- "severity": "Low",
466
- "info": "Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
467
- "code": "<pre><code class='language-python'>import base64\nencoded = base64.b64encode(b&#x27;data to be encoded&#x27;)\ndata = base64.b64decode(encoded)</code></pre>"
468
- },
469
- "239": {
470
- "line": 239,
471
- "validation": "base64",
472
- "severity": "Low",
473
- "info": "Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
474
- "code": "<pre><code class='language-python'>encoded = base64.b64encode(b&#x27;data to be encoded&#x27;)\ndata = base64.b64decode(encoded)</code></pre>"
475
- },
476
476
  "316": {
477
477
  "line": 316,
478
478
  "validation": "pickle.load",
@@ -1,7 +1,7 @@
1
1
  # Features
2
2
 
3
+ **Python Code Audit** is a modern security-focused source code analysis tool for Python, built on a **zero-trust** mindset. It identifies security risks, hidden behaviours, and trust boundaries without ever executing the code. This makes it safe to use on both your own projects and third-party code.
3
4
 
4
- **Python Code Audit** is a modern Python **security** source code analysis tool built on a *zero-trust* mindset. It focuses on identifying security risks, hidden behaviors, and trust boundaries in Python code—without executing it.
5
5
 
6
6
  :::{admonition} Key Features of Python Code Audit
7
7
  :class: tip
@@ -33,6 +33,8 @@ Per line a the in construct that can cause a security risks is shown, along with
33
33
 
34
34
  ![Example view of filescan report](filescan.png)
35
35
 
36
+ (excluded_directories)=
37
+ ## Excluded directories
36
38
 
37
39
  :::{note}
38
40
  The `codeaudit filescan` command does **NOT** include all directories. This is done on purpose!
@@ -0,0 +1,45 @@
1
+ # Installation
2
+
3
+ Python Code Audit is compatible with both Unix-based systems (Linux/macOS) and Windows.
4
+
5
+ ## Try without installation
6
+
7
+ You can use Python Code Audit without installing it on your system:
8
+
9
+ ```{button-link} https://nocomplexity.com/codeauditapp/dashboardapp.html
10
+ :color: danger
11
+ Launch web-based version
12
+ ```
13
+
14
+ :::{note}
15
+ The browser-based version runs 100% locally; however, please note that not all functionality is available. You can perform a security scan on packages available from PyPI.
16
+ :::
17
+
18
+ ## Install for full functionality
19
+
20
+ To enable all features of Python Code Audit, install the package locally.
21
+
22
+ ### Installation command
23
+
24
+ To install or upgrade to the latest version, run the following command in your terminal or command prompt:
25
+
26
+ ```bash
27
+ pip install -U codeaudit
28
+ ```
29
+
30
+ ### Verify your installation
31
+
32
+ Once the installation is complete, you can begin scanning Python packages immediately. Open a new shell or Command Prompt window and execute any of the Python Code Audit commands to verify the setup.
33
+
34
+ ### Example usage
35
+
36
+ ```bash
37
+ codeaudit filescan ultrafastrss
38
+ ```
39
+
40
+ This command scans the `ultrafastrss` package directly from PyPI.org and generates an HTML report.
41
+
42
+ :::{hint}
43
+ We recommend using `pip` for installation.
44
+ :::
45
+
@@ -136,7 +136,7 @@ To keep up with current threats, you need a Python Application Security Testing
136
136
  :::{note}
137
137
  This `Python Code Audit` tool is built to be fast, lightweight, and easy to use.
138
138
 
139
- By default, the tool scans Python code against more than **84 rules** to detect potential security vulnerabilities. These rules target unsafe constructs of the standard Python libraries that could pose a security risk.
139
+ By default, the tool scans Python code against more than **87 rules** to detect potential security vulnerabilities. These rules target unsafe constructs of the standard Python libraries that could pose a security risk.
140
140
 
141
141
  :::
142
142