codeaudit 1.6.2__tar.gz → 1.6.4__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 (208) hide show
  1. codeaudit-1.6.4/.github/workflows/python-static.yml +28 -0
  2. codeaudit-1.6.4/.github/workflows/python-test.yml +28 -0
  3. {codeaudit-1.6.2 → codeaudit-1.6.4}/.gitignore +1 -2
  4. {codeaudit-1.6.2 → codeaudit-1.6.4}/CHANGELOG.md +23 -1
  5. {codeaudit-1.6.2 → codeaudit-1.6.4}/PKG-INFO +15 -5
  6. {codeaudit-1.6.2 → codeaudit-1.6.4}/README.md +4 -0
  7. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/codeauditcommands.md +1 -1
  8. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/ca_api_example_basic.ipynb +46 -28
  9. codeaudit-1.6.4/docs/examples/ca_api_example_overview.ipynb +160 -0
  10. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/ca_api_example_scanning.ipynb +27 -23
  11. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/codeauditchecks.html +1 -1
  12. codeaudit-1.6.4/docs/examples/demoscan.json +507 -0
  13. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/howtoscan.md +22 -0
  14. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/makeitbetter.md +24 -1
  15. {codeaudit-1.6.2 → codeaudit-1.6.4}/pyproject.toml +16 -29
  16. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/__init__.py +0 -1
  17. codeaudit-1.6.4/src/codeaudit/api_helpers.py +108 -0
  18. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/api_interfaces.py +215 -83
  19. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/api_reporting.py +2 -1
  20. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/codeaudit.py +8 -4
  21. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/dashboard_reports.py +67 -33
  22. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/issuevalidations.py +1 -0
  23. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/privacy_lint.py +11 -15
  24. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/pypi_package_scan.py +9 -6
  25. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/reporting.py +8 -67
  26. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/security_checks.py +3 -4
  27. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/totals.py +6 -7
  28. codeaudit-1.6.4/src/dashboard/__init__.py +0 -0
  29. codeaudit-1.6.4/src/dashboard/dashboardapp.py +343 -0
  30. codeaudit-1.6.4/src/dashboard/requirements.txt +7 -0
  31. codeaudit-1.6.4/tests/count_lines_file1.py +11 -0
  32. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_apicalls.py +22 -16
  33. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_basicpatterns.py +14 -13
  34. codeaudit-1.6.4/tests/test_chmod.py +26 -0
  35. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_constructspart2.py +28 -28
  36. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_correctexceptionuse.py +5 -5
  37. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_count_commentlines.py +13 -7
  38. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_directorycreation.py +32 -20
  39. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_directorycreation2.py +55 -33
  40. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_edgecases.py +14 -12
  41. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_hashstrenght.py +5 -5
  42. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_modulecheck.py +8 -6
  43. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_oschecks.py +16 -17
  44. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_pylintreport.py +11 -26
  45. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_pypiscan.py +25 -18
  46. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_secretfinding.py +8 -6
  47. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_standardlibconstructs.py +32 -30
  48. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_totalscheck.py +11 -6
  49. codeaudit-1.6.4/tests/test_wasmsafe_funtions.py +147 -0
  50. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_zstd.py +2 -1
  51. codeaudit-1.6.4/tox.ini +17 -0
  52. codeaudit-1.6.2/docs/examples/ca_api_example_overview.ipynb +0 -160
  53. codeaudit-1.6.2/docs/examples/demoscan.json +0 -205
  54. codeaudit-1.6.2/src/codeaudit/__about__.py +0 -4
  55. codeaudit-1.6.2/src/codeaudit/api_helpers.py +0 -285
  56. codeaudit-1.6.2/tests/count_lines_file1.py +0 -16
  57. codeaudit-1.6.2/tests/test_chmod.py +0 -26
  58. {codeaudit-1.6.2 → codeaudit-1.6.4}/CONTRIBUTE.md +0 -0
  59. {codeaudit-1.6.2 → codeaudit-1.6.4}/LICENSE.txt +0 -0
  60. {codeaudit-1.6.2 → codeaudit-1.6.4}/SECURITY.md +0 -0
  61. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/CLIcommands.ipynb +0 -0
  62. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/CONTRIBUTE.md +0 -0
  63. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/_config.yml +0 -0
  64. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/_static/nocxstyle.css +0 -0
  65. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/_toc.yml +0 -0
  66. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/about.md +0 -0
  67. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/apidocs/api_intro.md +0 -0
  68. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/apidocs/codeaudit.rst +0 -0
  69. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/apidocs/modules.rst +0 -0
  70. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/architecture.md +0 -0
  71. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/astlines.md +0 -0
  72. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/astlines2.md +0 -0
  73. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/changelog.md +0 -0
  74. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/assert_check.md +0 -0
  75. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/base64_check.md +0 -0
  76. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/binding_check.md +0 -0
  77. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/builtinfunctions_check.md +0 -0
  78. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/chmod_check.md +0 -0
  79. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/directorycreation_check.md +0 -0
  80. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/dynamicimport_check.md +0 -0
  81. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/exception_check.md +0 -0
  82. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/hash_check.md +0 -0
  83. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/httpserver_check.md +0 -0
  84. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/input_check.md +0 -0
  85. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/loggingconf_check.md +0 -0
  86. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/marshal_check.md +0 -0
  87. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/mktemp_check.md +0 -0
  88. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/multiprocessing_check.md +0 -0
  89. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/pickle_check.md +0 -0
  90. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/random_check.md +0 -0
  91. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/shelve_check.md +0 -0
  92. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/shutil_check.md +0 -0
  93. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/subprocess_check.md +0 -0
  94. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/syscalls_check.md +0 -0
  95. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/systemcalls_check.md +0 -0
  96. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/tarfile_extract_check.md +0 -0
  97. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/xml_check.md +0 -0
  98. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checks/zipfile_check.md +0 -0
  99. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/checksinformation.md +0 -0
  100. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/codeauditchecks.md +0 -0
  101. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/codeauditoverview.md +0 -0
  102. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/complexitycheck.md +0 -0
  103. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/data_egress_implementation.md +0 -0
  104. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/data_exfiltration_detection.md +0 -0
  105. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/ca_api_example_checks.ipynb +0 -0
  106. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/ca_api_example_json.ipynb +0 -0
  107. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/ca_checks.ipynb +0 -0
  108. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/demofile.py +0 -0
  109. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/directoryscan.html +0 -0
  110. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/filescan.html +0 -0
  111. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/modulescan.html +0 -0
  112. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/examples/overview.html +0 -0
  113. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/features.md +0 -0
  114. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/filescan.md +0 -0
  115. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/filescan.png +0 -0
  116. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/handling_errors.md +0 -0
  117. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/help.md +0 -0
  118. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/OO.png +0 -0
  119. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/ROI_logo.png +0 -0
  120. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/YourLogoHere.png +0 -0
  121. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/ai_use.png +0 -0
  122. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/architecture_overview.png +0 -0
  123. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/codeauditlogo.png +0 -0
  124. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/filescan_screenshot_16012026.png +0 -0
  125. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/modulescan_screenshot_16012026.png +0 -0
  126. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/nocxbanner.png +0 -0
  127. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/overview_linkaudit.png +0 -0
  128. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/images/overview_screenshot_16012026.png +0 -0
  129. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/implementedvalidations.md +0 -0
  130. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/installation.md +0 -0
  131. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/intro.md +0 -0
  132. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/issues.md +0 -0
  133. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/license.md +0 -0
  134. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/markingissues.md +0 -0
  135. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/modulescan.md +0 -0
  136. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/overviewplot.png +0 -0
  137. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/pca_overview.png +0 -0
  138. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/project_philosophy.md +0 -0
  139. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/securecoding.md +0 -0
  140. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/sponsors.md +0 -0
  141. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/userguide.md +0 -0
  142. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/warnings.md +0 -0
  143. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/whatissast.md +0 -0
  144. {codeaudit-1.6.2 → codeaudit-1.6.4}/docs/whysast.md +0 -0
  145. {codeaudit-1.6.2 → codeaudit-1.6.4}/filescan.png +0 -0
  146. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/altairplots.py +3 -3
  147. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/checkmodules.py +1 -1
  148. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/complexitycheck.py +0 -0
  149. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/data/sastchecks.csv +0 -0
  150. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/data/secretslist.txt +0 -0
  151. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/filehelpfunctions.py +2 -2
  152. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/htmlhelpfunctions.py +0 -0
  153. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/simple.css +0 -0
  154. {codeaudit-1.6.2 → codeaudit-1.6.4}/src/codeaudit/suppression.py +2 -2
  155. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/__init__.py +0 -0
  156. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/clean.py +0 -0
  157. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/elastic.py +0 -0
  158. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/example1.py +0 -0
  159. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/klyne.py +0 -0
  160. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/mixed.py +0 -0
  161. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/telemetry.py +0 -0
  162. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/spytestdir/telemetryfile2.py +0 -0
  163. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/suppression/sastsuppression_0.py +0 -0
  164. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/suppression/sastsuppression_1.py +0 -0
  165. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/suppression/sastsuppression_2.py +0 -0
  166. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_obfuscatingbuiltins.py +0 -0
  167. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_random.py +0 -0
  168. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_subprocess.py +0 -0
  169. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_suppression.py +0 -0
  170. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/test_suppressionlogic.py +0 -0
  171. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/allshit.py +0 -0
  172. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/apivalidations.py +0 -0
  173. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/assert.py +0 -0
  174. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/base64.py +0 -0
  175. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/chmod_things.py +0 -0
  176. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/complexitycheck.py +0 -0
  177. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/correctcounts.py +0 -0
  178. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/directorycreation.py +0 -0
  179. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/directorycreation2.py +0 -0
  180. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
  181. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/eval.py +0 -0
  182. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/eval2.py +0 -0
  183. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/exception.py +0 -0
  184. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/file3.py +0 -0
  185. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/file_with_warnings.py +0 -0
  186. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/gzip.py +0 -0
  187. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/hashcheck.py +0 -0
  188. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/httpserver.py +0 -0
  189. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/inputstatement.py +0 -0
  190. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/marshal.py +0 -0
  191. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/modulecheck.py +0 -0
  192. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/multiprocessing.py +0 -0
  193. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/obfuscating.py +0 -0
  194. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/oschecks.py +0 -0
  195. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/pickle.py +0 -0
  196. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/python2_file_willnotwork.py +0 -0
  197. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/random.py +0 -0
  198. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/shelve.py +0 -0
  199. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/shutil.py +0 -0
  200. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/subprocess.py +0 -0
  201. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/syslibrary.py +0 -0
  202. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/tarfilevalidation.py +0 -0
  203. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/tempcheck.py +0 -0
  204. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/validation1.py +0 -0
  205. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/validation2.py +0 -0
  206. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/xml.py +0 -0
  207. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/zipfile.py +0 -0
  208. {codeaudit-1.6.2 → codeaudit-1.6.4}/tests/validationfiles/zstd.py +0 -0
@@ -0,0 +1,28 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python Static Analysis
5
+
6
+ on: [push, pull_request]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.14"]
15
+ check: [] # tmp Remove "formatting"
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v3
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip tox
26
+ - name: Test with tox
27
+ run: |
28
+ tox -e ${{ matrix.check }}
@@ -0,0 +1,28 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python Package Test
5
+
6
+ on: [push, pull_request]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v3
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip tox
25
+ - name: Test with tox
26
+ run: |
27
+ export py_ver=$( echo "${{ matrix.python-version }}" | sed 's/\.//')
28
+ tox -e py${py_ver}
@@ -145,5 +145,4 @@ dmypy.json
145
145
  ## NOCX
146
146
  _build/*
147
147
  .gitignore
148
-
149
-
148
+ pyodide
@@ -1,8 +1,30 @@
1
1
  # Change Log
2
2
 
3
+
4
+ ## Version 1.6.3:
5
+
6
+ 🚀 Added
7
+ - WASM Test Drive: Updated documentation to highlight the WebAssembly (WASM) version, allowing users to test-drive the tool directly in the browser without local installation.
8
+
9
+ - Enhanced FileScan API: The filescan API now returns detailed results on found weaknesses, matching the comprehensive output of the CLI version.
10
+
11
+ 🛠️ Changed
12
+ - API Refactoring: Extensive refactoring of API functions for better modularity and performance.
13
+
14
+ - Version Retrieval: Improved the logic for retrieving version information. Special thanks to @jurgenwigg (#PR16).
15
+
16
+ 🐞 Fixed
17
+ - Dashboard Reporting: Squashed bugs and improved the reliability of the dashboard reporting APIs.
18
+
19
+ - Project Metadata: Implemented fixes and improvements for pyproject.toml configuration.
20
+
21
+ 📝 Documentation
22
+ - Updated [README.md](https://github.com/nocomplexity/codeaudit/blob/main/README.md) with link to the WASM-based demonstration.
23
+
24
+
3
25
  ## Version 1.6.2:
4
26
 
5
- ## Changelog
27
+
6
28
 
7
29
  **Added**
8
30
  * **Automated Python Testing:** Implemented automation for testing across various Python versions to ensure cross-version compatibility.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeaudit
3
- Version: 1.6.2
3
+ Version: 1.6.4
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
@@ -20,10 +20,16 @@ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Security
22
22
  Classifier: Topic :: Software Development :: Quality Assurance
23
- Requires-Python: >=3.8
24
- Requires-Dist: altair>=5.5
25
- Requires-Dist: fire>=0.7.0
26
- Requires-Dist: pandas>=2.3
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: altair==6.0.0
25
+ Requires-Dist: fire==0.7.1
26
+ Requires-Dist: pandas==3.0.2
27
+ Provides-Extra: test
28
+ Requires-Dist: black; extra == 'test'
29
+ Requires-Dist: pylint; extra == 'test'
30
+ Requires-Dist: pytest; extra == 'test'
31
+ Requires-Dist: pytest-cov; extra == 'test'
32
+ Requires-Dist: tox; extra == 'test'
27
33
  Description-Content-Type: text/markdown
28
34
 
29
35
  # Codeaudit
@@ -82,6 +88,10 @@ Python Code Audit has the following features:
82
88
  pip install -U codeaudit
83
89
  ```
84
90
 
91
+ If you would like to test this security tool without installing it, simply use the WASM version [available here](https://nocomplexity.com/codeauditapp/dashboardapp.html).
92
+
93
+
94
+
85
95
  If you have installed **Python Code Audit** previously and want to ensure you are using the latest validations and features, simply run this command again. Python Code Audit is frequently updated with new checks.
86
96
 
87
97
 
@@ -54,6 +54,10 @@ Python Code Audit has the following features:
54
54
  pip install -U codeaudit
55
55
  ```
56
56
 
57
+ If you would like to test this security tool without installing it, simply use the WASM version [available here](https://nocomplexity.com/codeauditapp/dashboardapp.html).
58
+
59
+
60
+
57
61
  If you have installed **Python Code Audit** previously and want to ensure you are using the latest validations and features, simply run this command again. Python Code Audit is frequently updated with new checks.
58
62
 
59
63
 
@@ -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.2
3
+ Python Code Audit commands for: version: 1.6.3.dev39+ga990bb23a.d20260411
4
4
  ```
5
5
  ----------------------------------------------------
6
6
  _ __ _
@@ -36,7 +36,7 @@
36
36
  },
37
37
  {
38
38
  "cell_type": "code",
39
- "execution_count": 10,
39
+ "execution_count": 1,
40
40
  "id": "ce7f815a-92f0-4bcb-abf1-526e31115ec7",
41
41
  "metadata": {},
42
42
  "outputs": [],
@@ -46,17 +46,17 @@
46
46
  },
47
47
  {
48
48
  "cell_type": "code",
49
- "execution_count": 11,
49
+ "execution_count": 2,
50
50
  "id": "2b6fd416-4756-4b9b-89d2-587b7805d9a9",
51
51
  "metadata": {},
52
52
  "outputs": [
53
53
  {
54
54
  "data": {
55
55
  "text/plain": [
56
- "{'python_version': '3.13.11', 'python_implementation': 'CPython'}"
56
+ "{'python_version': '3.14.3', 'python_implementation': 'CPython'}"
57
57
  ]
58
58
  },
59
- "execution_count": 11,
59
+ "execution_count": 2,
60
60
  "metadata": {},
61
61
  "output_type": "execute_result"
62
62
  }
@@ -81,33 +81,33 @@
81
81
  },
82
82
  {
83
83
  "cell_type": "code",
84
- "execution_count": 12,
84
+ "execution_count": 3,
85
85
  "id": "7c3df6ef-1bbf-400b-8b4e-4e5bd0700471",
86
86
  "metadata": {},
87
87
  "outputs": [],
88
88
  "source": [
89
- "from codeaudit.api_interfaces import version"
89
+ "from codeaudit.api_interfaces import version_info"
90
90
  ]
91
91
  },
92
92
  {
93
93
  "cell_type": "code",
94
- "execution_count": 13,
94
+ "execution_count": 4,
95
95
  "id": "6258c5f0-4002-425d-b643-c6d491eb1335",
96
96
  "metadata": {},
97
97
  "outputs": [
98
98
  {
99
99
  "data": {
100
100
  "text/plain": [
101
- "{'name': 'Python_Code_Audit', 'version': '1.4.1'}"
101
+ "{'name': 'Python_Code_Audit', 'version': '1.6.3.dev39+ga990bb23a.d20260411'}"
102
102
  ]
103
103
  },
104
- "execution_count": 13,
104
+ "execution_count": 4,
105
105
  "metadata": {},
106
106
  "output_type": "execute_result"
107
107
  }
108
108
  ],
109
109
  "source": [
110
- "version()"
110
+ "version_info()"
111
111
  ]
112
112
  },
113
113
  {
@@ -156,7 +156,7 @@
156
156
  },
157
157
  {
158
158
  "cell_type": "code",
159
- "execution_count": 14,
159
+ "execution_count": 5,
160
160
  "id": "1e5c0e2d-67f4-4188-ab1f-c7ca3e232f0d",
161
161
  "metadata": {},
162
162
  "outputs": [],
@@ -166,7 +166,7 @@
166
166
  },
167
167
  {
168
168
  "cell_type": "code",
169
- "execution_count": 15,
169
+ "execution_count": 6,
170
170
  "id": "fcd4390b-842b-436e-b1a8-5eb3c98a9cbb",
171
171
  "metadata": {},
172
172
  "outputs": [],
@@ -176,7 +176,7 @@
176
176
  },
177
177
  {
178
178
  "cell_type": "code",
179
- "execution_count": 16,
179
+ "execution_count": 7,
180
180
  "id": "de511475-53b0-4a1c-83e0-f20118ccb39a",
181
181
  "metadata": {},
182
182
  "outputs": [
@@ -184,8 +184,8 @@
184
184
  "data": {
185
185
  "text/plain": [
186
186
  "{'name': 'Python_Code_Audit',\n",
187
- " 'version': '1.4.1',\n",
188
- " 'generated_on': '2026-01-06 18:54',\n",
187
+ " 'version': '1.6.3.dev39+ga990bb23a.d20260411',\n",
188
+ " 'generated_on': '2026-04-11 13:56',\n",
189
189
  " 'pandas_vulnerability_info': [{'id': 'PYSEC-2020-73',\n",
190
190
  " 'summary': '',\n",
191
191
  " 'details': \"** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an untrusted file that is passed to the read_pickle() function, if __reduce__ makes an os.system call. NOTE: third parties dispute this issue because the read_pickle() function is documented as unsafe and it is the user's responsibility to use the function in a secure manner.\",\n",
@@ -193,7 +193,7 @@
193
193
  " 'severity': []}]}"
194
194
  ]
195
195
  },
196
- "execution_count": 16,
196
+ "execution_count": 7,
197
197
  "metadata": {},
198
198
  "output_type": "execute_result"
199
199
  }
@@ -222,7 +222,7 @@
222
222
  },
223
223
  {
224
224
  "cell_type": "code",
225
- "execution_count": 19,
225
+ "execution_count": 8,
226
226
  "id": "e9fe4117-0494-452d-9eb5-044be59ea8a8",
227
227
  "metadata": {},
228
228
  "outputs": [],
@@ -232,7 +232,7 @@
232
232
  },
233
233
  {
234
234
  "cell_type": "code",
235
- "execution_count": 20,
235
+ "execution_count": 9,
236
236
  "id": "bdcc1fb0-0efc-4821-ac40-9cc13271af55",
237
237
  "metadata": {},
238
238
  "outputs": [
@@ -240,8 +240,8 @@
240
240
  "data": {
241
241
  "text/plain": [
242
242
  "{'name': 'Python_Code_Audit',\n",
243
- " 'version': '1.4.1',\n",
244
- " 'generated_on': '2026-01-06 19:10',\n",
243
+ " 'version': '1.6.3.dev39+ga990bb23a.d20260411',\n",
244
+ " 'generated_on': '2026-04-11 13:56',\n",
245
245
  " 'requests_vulnerability_info': [{'id': 'GHSA-652x-xj99-gmcc',\n",
246
246
  " 'summary': 'Exposure of Sensitive Information to an Unauthorized Actor in Requests',\n",
247
247
  " 'details': 'Requests (aka python-requests) before 2.3.0 allows remote servers to obtain sensitive information by reading the Proxy-Authorization header in a redirected request.',\n",
@@ -256,7 +256,7 @@
256
256
  " 'score': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N'}]},\n",
257
257
  " {'id': 'GHSA-9wx4-h78v-vm56',\n",
258
258
  " 'summary': 'Requests `Session` object does not verify requests after making first request with verify=False',\n",
259
- " 'details': 'When making requests through a Requests `Session`, if the first request is made with `verify=False` to disable cert verification, all subsequent requests to the same origin will continue to ignore cert verification regardless of changes to the value of `verify`. This behavior will continue for the lifecycle of the connection in the connection pool.\\n\\n### Remediation\\nAny of these options can be used to remediate the current issue, we highly recommend upgrading as the preferred mitigation.\\n\\n* Upgrade to `requests>=2.32.0`.\\n* For `requests<2.32.0`, avoid setting `verify=False` for the first request to a host while using a Requests Session.\\n* For `requests<2.32.0`, call `close()` on `Session` objects to clear existing connections if `verify=False` is used.\\n\\n### Related Links\\n* https://github.com/psf/requests/pull/6655',\n",
259
+ " 'details': \"When using a `requests.Session`, if the first request to a given origin is made with `verify=False`, TLS certificate verification may remain disabled for all subsequent requests to that origin, even if `verify=True` is explicitly specified later.\\n\\nThis occurs because the underlying connection is reused from the session's connection pool, causing the initial TLS verification setting to persist for the lifetime of the pooled connection. As a result, applications may unintentionally send requests without certificate verification, leading to potential man-in-the-middle attacks and compromised confidentiality or integrity.\\n\\nThis behavior affects versions of `requests` prior to 2.32.0.\",\n",
260
260
  " 'aliases': ['CVE-2024-35195'],\n",
261
261
  " 'severity': [{'type': 'CVSS_V3',\n",
262
262
  " 'score': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N'}]},\n",
@@ -268,6 +268,12 @@
268
268
  " 'score': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'},\n",
269
269
  " {'type': 'CVSS_V4',\n",
270
270
  " 'score': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N'}]},\n",
271
+ " {'id': 'GHSA-gc5v-m9x4-r6x2',\n",
272
+ " 'summary': 'Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function',\n",
273
+ " 'details': '### Impact\\nThe `requests.utils.extract_zipped_paths()` utility function uses a predictable filename when extracting files from zip archives into the system temporary directory. If the target file already exists, it is reused without validation. A local attacker with write access to the temp directory could pre-create a malicious file that would be loaded in place of the legitimate one.\\n\\n### Affected usages\\n**Standard usage of the Requests library is not affected by this vulnerability.** Only applications that call `extract_zipped_paths()` directly are impacted.\\n\\n### Remediation\\nUpgrade to at least Requests 2.33.0, where the library now extracts files to a non-deterministic location.\\n\\nIf developers are unable to upgrade, they can set `TMPDIR` in their environment to a directory with restricted write access.',\n",
274
+ " 'aliases': ['CVE-2026-25645'],\n",
275
+ " 'severity': [{'type': 'CVSS_V3',\n",
276
+ " 'score': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N'}]},\n",
271
277
  " {'id': 'GHSA-j8r2-6x86-q33q',\n",
272
278
  " 'summary': 'Unintended leak of Proxy-Authorization header in requests',\n",
273
279
  " 'details': \"### Impact\\n\\nSince Requests v2.3.0, Requests has been vulnerable to potentially leaking `Proxy-Authorization` headers to destination servers, specifically during redirects to an HTTPS origin. This is a product of how `rebuild_proxies` is used to recompute and [reattach the `Proxy-Authorization` header](https://github.com/psf/requests/blob/f2629e9e3c7ce3c3c8c025bcd8db551101cbc773/requests/sessions.py#L319-L328) to requests when redirected. Note this behavior has _only_ been observed to affect proxied requests when credentials are supplied in the URL user information component (e.g. `https://username:password@proxy:8080`).\\n\\n**Current vulnerable behavior(s):**\\n\\n1. HTTP → HTTPS: **leak**\\n2. HTTPS → HTTP: **no leak**\\n3. HTTPS → HTTPS: **leak**\\n4. HTTP → HTTP: **no leak**\\n\\nFor HTTP connections sent through the proxy, the proxy will identify the header in the request itself and remove it prior to forwarding to the destination server. However when sent over HTTPS, the `Proxy-Authorization` header must be sent in the CONNECT request as the proxy has no visibility into further tunneled requests. This results in Requests forwarding the header to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate those credentials.\\n\\nThe reason this currently works for HTTPS connections in Requests is the `Proxy-Authorization` header is also handled by urllib3 with our usage of the ProxyManager in adapters.py with [`proxy_manager_for`](https://github.com/psf/requests/blob/f2629e9e3c7ce3c3c8c025bcd8db551101cbc773/requests/adapters.py#L199-L235). This will compute the required proxy headers in `proxy_headers` and pass them to the Proxy Manager, avoiding attaching them directly to the Request object. This will be our preferred option going forward for default usage.\\n\\n### Patches\\nStarting in Requests v2.31.0, Requests will no longer attach this header to redirects with an HTTPS destination. This should have no negative impacts on the default behavior of the library as the proxy credentials are already properly being handled by urllib3's ProxyManager.\\n\\nFor users with custom adapters, this _may_ be potentially breaking if you were already working around this behavior. The previous functionality of `rebuild_proxies` doesn't make sense in any case, so we would encourage any users impacted to migrate any handling of Proxy-Authorization directly into their custom adapter.\\n\\n### Workarounds\\nFor users who are not able to update Requests immediately, there is one potential workaround.\\n\\nYou may disable redirects by setting `allow_redirects` to `False` on all calls through Requests top-level APIs. Note that if you're currently relying on redirect behaviors, you will need to capture the 3xx response codes and ensure a new request is made to the redirect destination.\\n```\\nimport requests\\nr = requests.get('http://github.com/', allow_redirects=False)\\n```\\n\\n### Credits\\n\\nThis vulnerability was discovered and disclosed by the following individuals.\\n\\nDennis Brinkrolf, Haxolot (https://haxolot.com/)\\nTobias Funke, (tobiasfunke93@gmail.com)\",\n",
@@ -312,7 +318,7 @@
312
318
  " 'severity': []}]}"
313
319
  ]
314
320
  },
315
- "execution_count": 20,
321
+ "execution_count": 9,
316
322
  "metadata": {},
317
323
  "output_type": "execute_result"
318
324
  }
@@ -331,7 +337,7 @@
331
337
  },
332
338
  {
333
339
  "cell_type": "code",
334
- "execution_count": 17,
340
+ "execution_count": 10,
335
341
  "id": "32b48180-42d5-4338-b5b6-1e5f55aad380",
336
342
  "metadata": {},
337
343
  "outputs": [],
@@ -341,7 +347,7 @@
341
347
  },
342
348
  {
343
349
  "cell_type": "code",
344
- "execution_count": 18,
350
+ "execution_count": 11,
345
351
  "id": "51962776-0aa5-4da0-9ab9-0e5dfb94a3a5",
346
352
  "metadata": {},
347
353
  "outputs": [
@@ -349,8 +355,8 @@
349
355
  "data": {
350
356
  "text/plain": [
351
357
  "{'name': 'Python_Code_Audit',\n",
352
- " 'version': '1.4.1',\n",
353
- " 'generated_on': '2026-01-06 18:54',\n",
358
+ " 'version': '1.6.3.dev39+ga990bb23a.d20260411',\n",
359
+ " 'generated_on': '2026-04-11 13:56',\n",
354
360
  " 'validations': [{'name': 'Assertions',\n",
355
361
  " 'construct': 'assert',\n",
356
362
  " 'severity': 'Low',\n",
@@ -543,6 +549,18 @@
543
549
  " 'construct': 'subprocess.run',\n",
544
550
  " 'severity': 'Medium',\n",
545
551
  " 'info': 'Requires careful input validation to prevent command injection vulnerabilities.'},\n",
552
+ " {'name': 'Subprocess Usage',\n",
553
+ " 'construct': 'subprocess.check_output',\n",
554
+ " 'severity': 'Medium',\n",
555
+ " 'info': 'Requires careful input validation to prevent command injection vulnerabilities.'},\n",
556
+ " {'name': 'Subprocess Usage',\n",
557
+ " 'construct': 'subprocess.getstatusoutput',\n",
558
+ " 'severity': 'Medium',\n",
559
+ " 'info': 'Requires careful input validation to prevent command injection vulnerabilities.'},\n",
560
+ " {'name': 'Subprocess Usage',\n",
561
+ " 'construct': 'subprocess.getoutput',\n",
562
+ " 'severity': 'Medium',\n",
563
+ " 'info': 'Requires careful input validation to prevent command injection vulnerabilities.'},\n",
546
564
  " {'name': 'Tarfile Extraction',\n",
547
565
  " 'construct': 'tarfile.TarFile',\n",
548
566
  " 'severity': 'High',\n",
@@ -673,7 +691,7 @@
673
691
  " 'info': 'These modules are for development only and are not secure for production use.'}]}"
674
692
  ]
675
693
  },
676
- "execution_count": 18,
694
+ "execution_count": 11,
677
695
  "metadata": {},
678
696
  "output_type": "execute_result"
679
697
  }
@@ -699,7 +717,7 @@
699
717
  "name": "python",
700
718
  "nbconvert_exporter": "python",
701
719
  "pygments_lexer": "ipython3",
702
- "version": "3.13.11"
720
+ "version": "3.14.3"
703
721
  }
704
722
  },
705
723
  "nbformat": 4,
@@ -0,0 +1,160 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "a7c7195e-93bf-40c3-88b1-61b7601fad2d",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Example:Security Weaknesses Overview\n",
9
+ "\n",
10
+ "This notebook demonstrates how to use the Python Code Audit APIs to generate a visual overview of all detected weaknesses in a file or package.\n",
11
+ "\n",
12
+ "The identified security weaknesses are displayed using an [Altair](https://altair-viz.github.io/index.html) radial chart.\n"
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "code",
17
+ "execution_count": 5,
18
+ "id": "09e351e8-5a8e-4365-b94a-8f61703ecd04",
19
+ "metadata": {},
20
+ "outputs": [],
21
+ "source": [
22
+ "from codeaudit.api_interfaces import filescan \n",
23
+ "from codeaudit.altairplots import weaknesses_radial_overview"
24
+ ]
25
+ },
26
+ {
27
+ "cell_type": "code",
28
+ "execution_count": 6,
29
+ "id": "b532b94a-c19c-4203-8eac-dfa04c0f52cf",
30
+ "metadata": {},
31
+ "outputs": [],
32
+ "source": [
33
+ "demo_file = 'demofile.py' #Instead of using a single file, you can also use a directory. The file or directory gets scanned on security weaknesses."
34
+ ]
35
+ },
36
+ {
37
+ "cell_type": "code",
38
+ "execution_count": 9,
39
+ "id": "44016841-cf88-4e72-82ed-b57f4cc79a04",
40
+ "metadata": {},
41
+ "outputs": [],
42
+ "source": [
43
+ "result = filescan(demo_file) #The `get_constructs_counts` API call, scans the file or directory and returns a Python dict."
44
+ ]
45
+ },
46
+ {
47
+ "cell_type": "code",
48
+ "execution_count": 10,
49
+ "id": "88bb7d58-b242-43a7-9e87-06d163302bee",
50
+ "metadata": {},
51
+ "outputs": [
52
+ {
53
+ "data": {
54
+ "text/html": [
55
+ "\n",
56
+ "<style>\n",
57
+ " #altair-viz-b5f2daf02c0b4831b838c90c5126e3fd.vega-embed {\n",
58
+ " width: 100%;\n",
59
+ " display: flex;\n",
60
+ " }\n",
61
+ "\n",
62
+ " #altair-viz-b5f2daf02c0b4831b838c90c5126e3fd.vega-embed details,\n",
63
+ " #altair-viz-b5f2daf02c0b4831b838c90c5126e3fd.vega-embed details summary {\n",
64
+ " position: relative;\n",
65
+ " }\n",
66
+ "</style>\n",
67
+ "<div id=\"altair-viz-b5f2daf02c0b4831b838c90c5126e3fd\"></div>\n",
68
+ "<script type=\"text/javascript\">\n",
69
+ " var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
70
+ " (function(spec, embedOpt){\n",
71
+ " let outputDiv = document.currentScript.previousElementSibling;\n",
72
+ " if (outputDiv.id !== \"altair-viz-b5f2daf02c0b4831b838c90c5126e3fd\") {\n",
73
+ " outputDiv = document.getElementById(\"altair-viz-b5f2daf02c0b4831b838c90c5126e3fd\");\n",
74
+ " }\n",
75
+ "\n",
76
+ " const paths = {\n",
77
+ " \"vega\": \"https://cdn.jsdelivr.net/npm/vega@6?noext\",\n",
78
+ " \"vega-lib\": \"https://cdn.jsdelivr.net/npm/vega-lib?noext\",\n",
79
+ " \"vega-lite\": \"https://cdn.jsdelivr.net/npm/vega-lite@6.1.0?noext\",\n",
80
+ " \"vega-embed\": \"https://cdn.jsdelivr.net/npm/vega-embed@7?noext\",\n",
81
+ " };\n",
82
+ "\n",
83
+ " function maybeLoadScript(lib, version) {\n",
84
+ " var key = `${lib.replace(\"-\", \"\")}_version`;\n",
85
+ " return (VEGA_DEBUG[key] == version) ?\n",
86
+ " Promise.resolve(paths[lib]) :\n",
87
+ " new Promise(function(resolve, reject) {\n",
88
+ " var s = document.createElement('script');\n",
89
+ " document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
90
+ " s.async = true;\n",
91
+ " s.onload = () => {\n",
92
+ " VEGA_DEBUG[key] = version;\n",
93
+ " return resolve(paths[lib]);\n",
94
+ " };\n",
95
+ " s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
96
+ " s.src = paths[lib];\n",
97
+ " });\n",
98
+ " }\n",
99
+ "\n",
100
+ " function showError(err) {\n",
101
+ " outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
102
+ " throw err;\n",
103
+ " }\n",
104
+ "\n",
105
+ " function displayChart(vegaEmbed) {\n",
106
+ " vegaEmbed(outputDiv, spec, embedOpt)\n",
107
+ " .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
108
+ " }\n",
109
+ "\n",
110
+ " if(typeof define === \"function\" && define.amd) {\n",
111
+ " requirejs.config({paths});\n",
112
+ " let deps = [\"vega-embed\"];\n",
113
+ " require(deps, displayChart, err => showError(`Error loading script: ${err.message}`));\n",
114
+ " } else {\n",
115
+ " maybeLoadScript(\"vega\", \"6\")\n",
116
+ " .then(() => maybeLoadScript(\"vega-lite\", \"6.1.0\"))\n",
117
+ " .then(() => maybeLoadScript(\"vega-embed\", \"7\"))\n",
118
+ " .catch(showError)\n",
119
+ " .then(() => displayChart(vegaEmbed));\n",
120
+ " }\n",
121
+ " })({\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}}, \"data\": {\"name\": \"data-5bbceaf43b279ecf4bbafab4c9e368b4\"}, \"mark\": {\"type\": \"arc\", \"innerRadius\": 20}, \"encoding\": {\"color\": {\"field\": \"legend_label\", \"legend\": {\"title\": \"Weaknesses (Count)\"}, \"scale\": {\"scheme\": \"category20\"}, \"type\": \"nominal\"}, \"radius\": {\"field\": \"count\", \"scale\": {\"type\": \"sqrt\", \"zero\": true}, \"type\": \"quantitative\"}, \"theta\": {\"field\": \"theta1\", \"stack\": null, \"title\": null, \"type\": \"quantitative\"}, \"theta2\": {\"field\": \"theta0\"}, \"tooltip\": [{\"field\": \"construct\", \"type\": \"nominal\"}, {\"field\": \"count\", \"type\": \"quantitative\"}]}, \"height\": 600, \"title\": \"Overview of Security Weaknesses\", \"width\": 600, \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.1.0.json\", \"datasets\": {\"data-5bbceaf43b279ecf4bbafab4c9e368b4\": [{\"construct\": \"tarfile.TarFile\", \"count\": 6, \"legend_label\": \"tarfile.TarFile (6)\", \"fraction\": 0.09523809523809523, \"theta0\": 0.0, \"theta1\": 0.09523809523809523}, {\"construct\": \"os.fork\", \"count\": 3, \"legend_label\": \"os.fork (3)\", \"fraction\": 0.047619047619047616, \"theta0\": 0.09523809523809523, \"theta1\": 0.14285714285714285}, {\"construct\": \"assert\", \"count\": 2, \"legend_label\": \"assert (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.14285714285714285, \"theta1\": 0.1746031746031746}, {\"construct\": \"exec\", \"count\": 2, \"legend_label\": \"exec (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.1746031746031746, \"theta1\": 0.20634920634920634}, {\"construct\": \"pass\", \"count\": 2, \"legend_label\": \"pass (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.20634920634920634, \"theta1\": 0.23809523809523808}, {\"construct\": \"s.bind\", \"count\": 2, \"legend_label\": \"s.bind (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.23809523809523808, \"theta1\": 0.2698412698412698}, {\"construct\": \"logging.config\", \"count\": 2, \"legend_label\": \"logging.config (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.2698412698412698, \"theta1\": 0.30158730158730157}, {\"construct\": \"lzma.open\", \"count\": 2, \"legend_label\": \"lzma.open (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.30158730158730157, \"theta1\": 0.3333333333333333}, {\"construct\": \"base64\", \"count\": 2, \"legend_label\": \"base64 (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.3333333333333333, \"theta1\": 0.36507936507936506}, {\"construct\": \"os.access\", \"count\": 2, \"legend_label\": \"os.access (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.36507936507936506, \"theta1\": 0.3968253968253968}, {\"construct\": \"hashlib.sha1\", \"count\": 2, \"legend_label\": \"hashlib.sha1 (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.3968253968253968, \"theta1\": 0.42857142857142855}, {\"construct\": \"pickle.loads\", \"count\": 2, \"legend_label\": \"pickle.loads (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.42857142857142855, \"theta1\": 0.4603174603174603}, {\"construct\": \"sys.settrace\", \"count\": 2, \"legend_label\": \"sys.settrace (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.4603174603174603, \"theta1\": 0.49206349206349204}, {\"construct\": \"sys.setprofile\", \"count\": 2, \"legend_label\": \"sys.setprofile (2)\", \"fraction\": 0.031746031746031744, \"theta0\": 0.492063492063492, \"theta1\": 0.5238095238095237}, {\"construct\": \"os.forkpty\", \"count\": 1, \"legend_label\": \"os.forkpty (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.5238095238095237, \"theta1\": 0.5396825396825395}, {\"construct\": \"xmlrpc.server.SimpleXMLRPCServer\", \"count\": 1, \"legend_label\": \"xmlrpc.server.SimpleXMLRPCServer (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.5396825396825395, \"theta1\": 0.5555555555555554}, {\"construct\": \"os.popen\", \"count\": 1, \"legend_label\": \"os.popen (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.5555555555555554, \"theta1\": 0.5714285714285712}, {\"construct\": \"os.system\", \"count\": 1, \"legend_label\": \"os.system (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.5714285714285712, \"theta1\": 0.587301587301587}, {\"construct\": \"os.write\", \"count\": 1, \"legend_label\": \"os.write (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.587301587301587, \"theta1\": 0.6031746031746028}, {\"construct\": \"os.writev\", \"count\": 1, \"legend_label\": \"os.writev (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6031746031746028, \"theta1\": 0.6190476190476186}, {\"construct\": \"continue\", \"count\": 1, \"legend_label\": \"continue (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6190476190476186, \"theta1\": 0.6349206349206344}, {\"construct\": \"tempfile.mktemp\", \"count\": 1, \"legend_label\": \"tempfile.mktemp (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6349206349206344, \"theta1\": 0.6507936507936503}, {\"construct\": \"hashlib.md5\", \"count\": 1, \"legend_label\": \"hashlib.md5 (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6507936507936503, \"theta1\": 0.6666666666666661}, {\"construct\": \"compile\", \"count\": 1, \"legend_label\": \"compile (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6666666666666661, \"theta1\": 0.6825396825396819}, {\"construct\": \"shutil.rmtree\", \"count\": 1, \"legend_label\": \"shutil.rmtree (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6825396825396819, \"theta1\": 0.6984126984126977}, {\"construct\": \"shutil.copy\", \"count\": 1, \"legend_label\": \"shutil.copy (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.6984126984126977, \"theta1\": 0.7142857142857135}, {\"construct\": \"http.server.BaseHTTPRequestHandler\", \"count\": 1, \"legend_label\": \"http.server.BaseHTTPRequestHandler (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.7142857142857135, \"theta1\": 0.7301587301587293}, {\"construct\": \"shutil.unpack_archive\", \"count\": 1, \"legend_label\": \"shutil.unpack_archive (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.7301587301587293, \"theta1\": 0.7460317460317452}, {\"construct\": \"random.random\", \"count\": 1, \"legend_label\": \"random.random (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.7460317460317452, \"theta1\": 0.761904761904761}, {\"construct\": \"random.seed\", \"count\": 1, \"legend_label\": \"random.seed (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.761904761904761, \"theta1\": 0.7777777777777768}, {\"construct\": \"connection.recv\", \"count\": 1, \"legend_label\": \"connection.recv (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.7777777777777768, \"theta1\": 0.7936507936507926}, {\"construct\": \"os.chmod\", \"count\": 1, \"legend_label\": \"os.chmod (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.7936507936507926, \"theta1\": 0.8095238095238084}, {\"construct\": \"eval\", \"count\": 1, \"legend_label\": \"eval (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8095238095238084, \"theta1\": 0.8253968253968242}, {\"construct\": \"marshal.loads\", \"count\": 1, \"legend_label\": \"marshal.loads (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8253968253968242, \"theta1\": 0.8412698412698401}, {\"construct\": \"os.makedirs\", \"count\": 1, \"legend_label\": \"os.makedirs (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8412698412698401, \"theta1\": 0.8571428571428559}, {\"construct\": \"shelve.open\", \"count\": 1, \"legend_label\": \"shelve.open (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8571428571428559, \"theta1\": 0.8730158730158717}, {\"construct\": \"bz2.BZ2File\", \"count\": 1, \"legend_label\": \"bz2.BZ2File (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8730158730158717, \"theta1\": 0.8888888888888875}, {\"construct\": \"bz2.open\", \"count\": 1, \"legend_label\": \"bz2.open (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.8888888888888875, \"theta1\": 0.9047619047619033}, {\"construct\": \"gzip.open\", \"count\": 1, \"legend_label\": \"gzip.open (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.9047619047619033, \"theta1\": 0.9206349206349191}, {\"construct\": \"lzma.LZMAFile\", \"count\": 1, \"legend_label\": \"lzma.LZMAFile (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.9206349206349191, \"theta1\": 0.936507936507935}, {\"construct\": \"pickle.load\", \"count\": 1, \"legend_label\": \"pickle.load (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.936507936507935, \"theta1\": 0.9523809523809508}, {\"construct\": \"zipfile.ZipFile\", \"count\": 1, \"legend_label\": \"zipfile.ZipFile (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.9523809523809508, \"theta1\": 0.9682539682539666}, {\"construct\": \"xmlrpc.client\", \"count\": 1, \"legend_label\": \"xmlrpc.client (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.9682539682539666, \"theta1\": 0.9841269841269824}, {\"construct\": \"marshal.load\", \"count\": 1, \"legend_label\": \"marshal.load (1)\", \"fraction\": 0.015873015873015872, \"theta0\": 0.9841269841269824, \"theta1\": 0.9999999999999982}]}}, {\"mode\": \"vega-lite\"});\n",
122
+ "</script>"
123
+ ],
124
+ "text/plain": [
125
+ "alt.Chart(...)"
126
+ ]
127
+ },
128
+ "execution_count": 10,
129
+ "metadata": {},
130
+ "output_type": "execute_result"
131
+ }
132
+ ],
133
+ "source": [
134
+ "chart = weaknesses_radial_overview(result) \n",
135
+ "chart"
136
+ ]
137
+ }
138
+ ],
139
+ "metadata": {
140
+ "kernelspec": {
141
+ "display_name": "Python 3 (ipykernel)",
142
+ "language": "python",
143
+ "name": "python3"
144
+ },
145
+ "language_info": {
146
+ "codemirror_mode": {
147
+ "name": "ipython",
148
+ "version": 3
149
+ },
150
+ "file_extension": ".py",
151
+ "mimetype": "text/x-python",
152
+ "name": "python",
153
+ "nbconvert_exporter": "python",
154
+ "pygments_lexer": "ipython3",
155
+ "version": "3.14.3"
156
+ }
157
+ },
158
+ "nbformat": 4,
159
+ "nbformat_minor": 5
160
+ }