codeaudit 1.9.1__tar.gz → 1.9.3__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.
- {codeaudit-1.9.1 → codeaudit-1.9.3}/CHANGELOG.md +20 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/PKG-INFO +3 -2
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/codeauditcommands.md +1 -1
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_api_example_scanning.ipynb +35 -29
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/codeauditchecks.html +2 -2
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/demoscan.json +2 -2
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/makeitbetter.md +13 -1
- {codeaudit-1.9.1 → codeaudit-1.9.3}/pyproject.toml +5 -4
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/altairplots.py +7 -29
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/api_interfaces.py +29 -11
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/api_reporting.py +23 -7
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/data/sastchecks.csv +1 -1
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/pypi_package_scan.py +29 -5
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/dashboardapp.py +137 -36
- codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_191.html +299 -0
- codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_191.js +91 -0
- codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_192.html +299 -0
- codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_fixedTMPfor_v1.9.0.js +91 -0
- codeaudit-1.9.3/src/dashboard/pyodide/deployed/dashboardapp_191.html +299 -0
- codeaudit-1.9.3/src/dashboard/pyodide/deployed/dashboardapp_191.js +91 -0
- codeaudit-1.9.3/src/dashboard/pyodide/deployed/dashboardapp_192.html +299 -0
- codeaudit-1.9.3/src/dashboard/pyodide/deployed/dashboardapp_fixedTMPfor_v1.9.0.js +91 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/test_count_weaknesses.py +12 -0
- codeaudit-1.9.3/tests/unit_tests/test_get_weakness_counts.py +495 -0
- codeaudit-1.9.3/tests/validationfiles/zip_example.json +144 -0
- codeaudit-1.9.1/src/dashboard/pyodide/deployed/dashboardapp.html +0 -295
- codeaudit-1.9.1/src/dashboard/pyodide/deployed/dashboardapp.js +0 -91
- {codeaudit-1.9.1 → codeaudit-1.9.3}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/.github/workflows/sast_validation.yml +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/.gitignore +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/LICENSE.txt +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/README.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/SECURITY.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/.gitignore +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/class_index.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/function_index.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/index.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/status.json +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/_config.yml +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/_toc.yml +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/about.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/architecture.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/changelog.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/input_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/random_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/checksinformation.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/cimode.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/complexitycheck.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/demofile.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/filescan.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/examples/overview.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/features.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/filescan.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/filescan.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/handling_errors.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/help.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/howtoscan.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/OO.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/ai_use.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/installation.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/intro.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/issues.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/license.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/markingissues.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/modulescan.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/overviewplot.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/pca_overview.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/project_philosophy.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/sponsors.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/userguide.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/warnings.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/whatissast.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/docs/whysast.md +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/filescan.png +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/corecli.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/dashboard_reports.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/filehelpfunctions.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/reporting.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_171.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_171.js +0 -0
- /codeaudit-1.9.1/src/dashboard/pyodide/dashboardapp.html → /codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_190.html +0 -0
- /codeaudit-1.9.1/src/dashboard/pyodide/dashboardapp.js → /codeaudit-1.9.3/src/dashboard/pyodide/dashboardapp_190.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_version162.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_version162.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_version166.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/dashboardapp_version166.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/deployed/dashboardapp_171.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/deployed/dashboardapp_171.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/deployed/dashboardapp_180.html +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/pyodide/deployed/dashboardapp_180.js +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/__init__.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_apicalls.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_base64.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_chmod.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_edgecases.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_filescan_api.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_ftp.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_oschecks.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_random.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_subprocess.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_suppression.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_valid_python.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/test_zstd.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/test_clean_import_list.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/test_filehelpfunctions.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/incorrect_python_file.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/linkaudit-0.9.9.tar.gz +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.9.1 → codeaudit-1.9.3}/tests/validationfiles/zstd.py +0 -0
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.9.3:
|
|
4
|
+
|
|
5
|
+
**Changed**
|
|
6
|
+
|
|
7
|
+
* Updated functions `weaknesses_overview` and `total_weaknesses`.
|
|
8
|
+
|
|
9
|
+
**Fixed**
|
|
10
|
+
|
|
11
|
+
* Fixed issue in API function `get_weakness_counts` and included extra tests.
|
|
12
|
+
* Corrected severity for the `input` function.
|
|
13
|
+
|
|
14
|
+
**Documentation**
|
|
15
|
+
* Validated and documented correct working and compatibility for Python 3.15.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Version 1.9.2:
|
|
20
|
+
|
|
21
|
+
* Fixed issue for API scan
|
|
22
|
+
|
|
3
23
|
## Version 1.9.1:
|
|
4
24
|
|
|
5
25
|
**Added**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.3
|
|
4
4
|
Summary: A modern Python security source code analyzer (SAST) based on distrust.
|
|
5
5
|
Project-URL: Homepage, https://codeaudit.nocomplexity.com
|
|
6
6
|
Project-URL: Documentation, https://github.com/nocomplexity/codeaudit#readme
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
21
22
|
Classifier: Topic :: Security
|
|
22
23
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
24
|
Requires-Python: >=3.12
|
|
@@ -33,7 +33,15 @@
|
|
|
33
33
|
"execution_count": 3,
|
|
34
34
|
"id": "bbcc805d-0f4d-49fc-a0f5-3ad863fe6da8",
|
|
35
35
|
"metadata": {},
|
|
36
|
-
"outputs": [
|
|
36
|
+
"outputs": [
|
|
37
|
+
{
|
|
38
|
+
"name": "stdout",
|
|
39
|
+
"output_type": "stream",
|
|
40
|
+
"text": [
|
|
41
|
+
"Exception: FileAudit Security Validation Failed - Only .py files are accepted (got extension ''): linkaudit\n"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
37
45
|
"source": [
|
|
38
46
|
"result = filescan(packagename) # linkaudit is a package that is present on PyPI.org"
|
|
39
47
|
]
|
|
@@ -48,18 +56,20 @@
|
|
|
48
56
|
"data": {
|
|
49
57
|
"text/plain": [
|
|
50
58
|
"{'name': 'Python_Code_Audit',\n",
|
|
51
|
-
" 'version': '1.
|
|
52
|
-
" 'generated_on': '2026-
|
|
59
|
+
" 'version': '1.9.1',\n",
|
|
60
|
+
" 'generated_on': '2026-10-09 19:26',\n",
|
|
53
61
|
" 'package_name': 'linkaudit',\n",
|
|
54
|
-
" 'package_release': '0.9.
|
|
62
|
+
" 'package_release': '0.9.10',\n",
|
|
63
|
+
" 'update_date': '2026-10-08',\n",
|
|
64
|
+
" 'days_since_last_update': 1,\n",
|
|
55
65
|
" 'statistics_overview': {'Number_Of_Files': 6,\n",
|
|
56
|
-
" 'Number_Of_Lines':
|
|
57
|
-
" 'AST_Nodes':
|
|
66
|
+
" 'Number_Of_Lines': 527,\n",
|
|
67
|
+
" 'AST_Nodes': 222,\n",
|
|
58
68
|
" 'Core Modules': 6,\n",
|
|
59
|
-
" 'External Modules':
|
|
69
|
+
" 'External Modules': 1,\n",
|
|
60
70
|
" 'Functions': 16,\n",
|
|
61
71
|
" 'Classes': 0,\n",
|
|
62
|
-
" 'Comment_Lines':
|
|
72
|
+
" 'Comment_Lines': 189,\n",
|
|
63
73
|
" 'Median_Complexity': 9.3,\n",
|
|
64
74
|
" 'Maximum_Complexity': 26},\n",
|
|
65
75
|
" 'module_overview': {'core_modules': ['asyncio',\n",
|
|
@@ -68,9 +78,9 @@
|
|
|
68
78
|
" 'sys',\n",
|
|
69
79
|
" 'urllib.error',\n",
|
|
70
80
|
" 'urllib.request'],\n",
|
|
71
|
-
" 'imported_modules': ['
|
|
81
|
+
" 'imported_modules': ['fire']},\n",
|
|
72
82
|
" 'file_security_info': {0: {'FileName': '__init__.py',\n",
|
|
73
|
-
" 'FilePath': '/tmp/
|
|
83
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/__init__.py',\n",
|
|
74
84
|
" 'Number_Of_Lines': 10,\n",
|
|
75
85
|
" 'AST_Nodes': 2,\n",
|
|
76
86
|
" 'Std-Modules': 0,\n",
|
|
@@ -85,14 +95,14 @@
|
|
|
85
95
|
" 'file_name': '__init__.py',\n",
|
|
86
96
|
" 'sast_result': {}},\n",
|
|
87
97
|
" 1: {'FileName': 'html_result.py',\n",
|
|
88
|
-
" 'FilePath': '/tmp/
|
|
89
|
-
" 'Number_Of_Lines':
|
|
90
|
-
" 'AST_Nodes':
|
|
98
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/html_result.py',\n",
|
|
99
|
+
" 'Number_Of_Lines': 84,\n",
|
|
100
|
+
" 'AST_Nodes': 29,\n",
|
|
91
101
|
" 'Std-Modules': 1,\n",
|
|
92
102
|
" 'External-Modules': 0,\n",
|
|
93
103
|
" 'Functions': 2,\n",
|
|
94
104
|
" 'Classes': 0,\n",
|
|
95
|
-
" 'Comment_Lines':
|
|
105
|
+
" 'Comment_Lines': 50,\n",
|
|
96
106
|
" 'Complexity_Score': 6,\n",
|
|
97
107
|
" 'warnings': 0,\n",
|
|
98
108
|
" 'core_modules': ['os'],\n",
|
|
@@ -100,14 +110,14 @@
|
|
|
100
110
|
" 'file_name': 'html_result.py',\n",
|
|
101
111
|
" 'sast_result': {}},\n",
|
|
102
112
|
" 2: {'FileName': 'markdownhelpers.py',\n",
|
|
103
|
-
" 'FilePath': '/tmp/
|
|
104
|
-
" 'Number_Of_Lines':
|
|
113
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/markdownhelpers.py',\n",
|
|
114
|
+
" 'Number_Of_Lines': 129,\n",
|
|
105
115
|
" 'AST_Nodes': 50,\n",
|
|
106
116
|
" 'Std-Modules': 2,\n",
|
|
107
117
|
" 'External-Modules': 0,\n",
|
|
108
118
|
" 'Functions': 4,\n",
|
|
109
119
|
" 'Classes': 0,\n",
|
|
110
|
-
" 'Comment_Lines':
|
|
120
|
+
" 'Comment_Lines': 38,\n",
|
|
111
121
|
" 'Complexity_Score': 20,\n",
|
|
112
122
|
" 'warnings': 0,\n",
|
|
113
123
|
" 'core_modules': ['os', 're'],\n",
|
|
@@ -115,26 +125,22 @@
|
|
|
115
125
|
" 'file_name': 'markdownhelpers.py',\n",
|
|
116
126
|
" 'sast_result': {}},\n",
|
|
117
127
|
" 3: {'FileName': 'linkaudit.py',\n",
|
|
118
|
-
" 'FilePath': '/tmp/
|
|
119
|
-
" 'Number_Of_Lines':
|
|
120
|
-
" 'AST_Nodes':
|
|
128
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/linkaudit.py',\n",
|
|
129
|
+
" 'Number_Of_Lines': 273,\n",
|
|
130
|
+
" 'AST_Nodes': 131,\n",
|
|
121
131
|
" 'Std-Modules': 5,\n",
|
|
122
132
|
" 'External-Modules': 2,\n",
|
|
123
133
|
" 'Functions': 9,\n",
|
|
124
134
|
" 'Classes': 0,\n",
|
|
125
|
-
" 'Comment_Lines':
|
|
135
|
+
" 'Comment_Lines': 74,\n",
|
|
126
136
|
" 'Complexity_Score': 26,\n",
|
|
127
137
|
" 'warnings': 0,\n",
|
|
128
138
|
" 'core_modules': ['asyncio', 'os', 'sys', 'urllib.error', 'urllib.request'],\n",
|
|
129
139
|
" 'imported_modules': ['fire', 'linkaudit'],\n",
|
|
130
140
|
" 'file_name': 'linkaudit.py',\n",
|
|
131
|
-
" 'sast_result': {
|
|
132
|
-
" 'validation': 'input',\n",
|
|
133
|
-
" 'severity': 'Low',\n",
|
|
134
|
-
" 'info': 'User input must be strictly sanitized and validated to prevent injection vulnerabilities.',\n",
|
|
135
|
-
" 'code': \"<pre><code class='language-python'> files_tocheck = markdownhelpers.collect_markdown_files(bookdirectory)\\n result_output = input("HTML output [H] (=Default) or TXT output [T]? )")\\n txtoutput = "# Result of Link Audit for markdown files (URL checker) \\\\n\\\\n"</code></pre>\"}}},\n",
|
|
141
|
+
" 'sast_result': {}},\n",
|
|
136
142
|
" 4: {'FileName': '_version.py',\n",
|
|
137
|
-
" 'FilePath': '/tmp/
|
|
143
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/_version.py',\n",
|
|
138
144
|
" 'Number_Of_Lines': 1,\n",
|
|
139
145
|
" 'AST_Nodes': 1,\n",
|
|
140
146
|
" 'Std-Modules': 0,\n",
|
|
@@ -149,7 +155,7 @@
|
|
|
149
155
|
" 'file_name': '_version.py',\n",
|
|
150
156
|
" 'sast_result': {}},\n",
|
|
151
157
|
" 5: {'FileName': 'nocxhelpers.py',\n",
|
|
152
|
-
" 'FilePath': '/tmp/
|
|
158
|
+
" 'FilePath': '/tmp/codeaudit_aftxsa3p/linkaudit-0.9.10/src/linkaudit/nocxhelpers.py',\n",
|
|
153
159
|
" 'Number_Of_Lines': 30,\n",
|
|
154
160
|
" 'AST_Nodes': 9,\n",
|
|
155
161
|
" 'Std-Modules': 0,\n",
|
|
@@ -191,7 +197,7 @@
|
|
|
191
197
|
"name": "python",
|
|
192
198
|
"nbconvert_exporter": "python",
|
|
193
199
|
"pygments_lexer": "ipython3",
|
|
194
|
-
"version": "3.14.
|
|
200
|
+
"version": "3.14.8"
|
|
195
201
|
}
|
|
196
202
|
},
|
|
197
203
|
"nbformat": 4,
|
|
@@ -422,7 +422,7 @@ footer {
|
|
|
422
422
|
<tr>
|
|
423
423
|
<td>Input Function</td>
|
|
424
424
|
<td>input</td>
|
|
425
|
-
<td>
|
|
425
|
+
<td>High</td>
|
|
426
426
|
<td>User input must be strictly sanitized and validated to prevent injection vulnerabilities.</td>
|
|
427
427
|
</tr>
|
|
428
428
|
<tr>
|
|
@@ -774,4 +774,4 @@ footer {
|
|
|
774
774
|
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
|
|
775
775
|
</tr>
|
|
776
776
|
</tbody>
|
|
777
|
-
</table><br><p>Number of implemented security validations:<b>89</b></p><p>Version of codeaudit: <b>1.9.
|
|
777
|
+
</table><br><p>Number of implemented security validations:<b>89</b></p><p>Version of codeaudit: <b>1.9.3</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-10-30 18:27</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.9.3</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">❤</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>
|
|
@@ -38,6 +38,16 @@ To lower the barrier for new contributors, I'd make the tone more welcoming, red
|
|
|
38
38
|
|
|
39
39
|
Welcome! This guide will help you set up a local development environment for Python Code Audit and start contributing to the project.
|
|
40
40
|
|
|
41
|
+
### 0. Create and activate an new environment
|
|
42
|
+
|
|
43
|
+
I prefer using [`conda`](https://nocomplexity.com/documents/pythonbook/environments.html#environments) but use what you want.
|
|
44
|
+
|
|
45
|
+
Set up a new environment:
|
|
46
|
+
```bash
|
|
47
|
+
conda create --name codeaudit_dev python=3.15
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
|
|
41
51
|
### 1. Clone the repository
|
|
42
52
|
|
|
43
53
|
We recommend working in a dedicated virtual environment to avoid conflicts with other Python projects.
|
|
@@ -48,14 +58,16 @@ The Python Code Audit source code is hosted on GitHub.
|
|
|
48
58
|
```bash
|
|
49
59
|
git clone https://github.com/nocomplexity/codeaudit
|
|
50
60
|
cd codeaudit
|
|
61
|
+
pip install -e .
|
|
51
62
|
```
|
|
52
63
|
|
|
64
|
+
|
|
53
65
|
### 2. Install development dependencies
|
|
54
66
|
|
|
55
67
|
Install `pytest`, which is used for running the test suite:
|
|
56
68
|
|
|
57
69
|
```bash
|
|
58
|
-
pip install pytest
|
|
70
|
+
pip install -U pytest
|
|
59
71
|
```
|
|
60
72
|
|
|
61
73
|
### 3. Install Hatch
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.12",
|
|
26
26
|
"Programming Language :: Python :: 3.13",
|
|
27
27
|
"Programming Language :: Python :: 3.14",
|
|
28
|
+
"Programming Language :: Python :: 3.15",
|
|
28
29
|
]
|
|
29
30
|
|
|
30
31
|
[project.optional-dependencies]
|
|
@@ -57,14 +58,14 @@ extra-dependencies = [
|
|
|
57
58
|
check = "mypy --install-types --non-interactive {args:src/codeaudit tests}"
|
|
58
59
|
|
|
59
60
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
60
|
-
python = ["3.14", "3.13", "3.12"]
|
|
61
|
+
python = ["3.15", "3.14", "3.13", "3.12"]
|
|
61
62
|
|
|
62
63
|
[tool.hatch.envs.hatch-test]
|
|
63
64
|
randomize = true
|
|
64
65
|
dependencies = ["pytest", "pytest-cov", "coverage"]
|
|
65
66
|
|
|
66
67
|
[tool.black]
|
|
67
|
-
target-version = ["
|
|
68
|
+
target-version = ["py312", "py313", "py314","py315"]
|
|
68
69
|
extend-exclude ='(python2_file_willnotwork|dunderexec_with_parsing_error).py|validationfiles|suppression|spytestdir'
|
|
69
70
|
|
|
70
71
|
[tool.coverage.run]
|
|
@@ -78,8 +79,8 @@ show_missing = true
|
|
|
78
79
|
dependencies = ["black", "pylint"]
|
|
79
80
|
|
|
80
81
|
[tool.hatch.envs.hatch-static-analysis.scripts]
|
|
81
|
-
format-check = "black --target-version
|
|
82
|
-
format-fix = "black --target-version
|
|
82
|
+
format-check = "black --target-version py314 --check src tests"
|
|
83
|
+
format-fix = "black --target-version py314 src tests"
|
|
83
84
|
lint-check = "pylint src tests"
|
|
84
85
|
|
|
85
86
|
[tool.pytest]
|
|
@@ -18,7 +18,8 @@ import pandas as pd
|
|
|
18
18
|
|
|
19
19
|
from collections import Counter
|
|
20
20
|
from pathlib import Path
|
|
21
|
-
|
|
21
|
+
from codeaudit.api_interfaces import get_weakness_counts
|
|
22
|
+
from codeaudit.api_reporting import total_weaknesses
|
|
22
23
|
|
|
23
24
|
def module_count_barchart(scanresult):
|
|
24
25
|
"""Create a bar chart showing module counts by category.
|
|
@@ -689,20 +690,8 @@ def weaknesses_overview(scanresult):
|
|
|
689
690
|
.mark_text()
|
|
690
691
|
.encode(text="msg:N")
|
|
691
692
|
)
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
counter = Counter()
|
|
695
|
-
for file_info in file_security_info.values():
|
|
696
|
-
if not isinstance(file_info, dict):
|
|
697
|
-
continue
|
|
698
|
-
sast_result = file_info.get("sast_result")
|
|
699
|
-
if not isinstance(sast_result, dict):
|
|
700
|
-
continue
|
|
701
|
-
for finding in sast_result.values():
|
|
702
|
-
if isinstance(finding, dict):
|
|
703
|
-
validation = finding.get("validation")
|
|
704
|
-
if validation and isinstance(validation, str):
|
|
705
|
-
counter[validation] += 1
|
|
693
|
+
# --- Count every validation across all files ---
|
|
694
|
+
counter = Counter(get_weakness_counts(scanresult))
|
|
706
695
|
|
|
707
696
|
if not counter:
|
|
708
697
|
return (
|
|
@@ -875,7 +864,7 @@ def sast_files_overview(scanresult):
|
|
|
875
864
|
"base_name": base_name,
|
|
876
865
|
"parent_folder": parent_folder,
|
|
877
866
|
"full_path": str(filepath),
|
|
878
|
-
"issues":
|
|
867
|
+
"issues": total_weaknesses(scanresult),
|
|
879
868
|
"complexity": file_info.get("Complexity_Score", 0),
|
|
880
869
|
}
|
|
881
870
|
)
|
|
@@ -977,19 +966,8 @@ def weaknesses_radial_overview(scanresult):
|
|
|
977
966
|
)
|
|
978
967
|
|
|
979
968
|
# --- Count every 'validation' across all files ---
|
|
980
|
-
counter = Counter()
|
|
981
|
-
|
|
982
|
-
if not isinstance(file_info, dict):
|
|
983
|
-
continue
|
|
984
|
-
sast_result = file_info.get("sast_result")
|
|
985
|
-
if not isinstance(sast_result, dict):
|
|
986
|
-
continue
|
|
987
|
-
for finding in sast_result.values():
|
|
988
|
-
if isinstance(finding, dict):
|
|
989
|
-
validation = finding.get("validation")
|
|
990
|
-
if validation and isinstance(validation, str):
|
|
991
|
-
counter[validation] += 1
|
|
992
|
-
|
|
969
|
+
counter = Counter(get_weakness_counts(scanresult))
|
|
970
|
+
|
|
993
971
|
if not counter:
|
|
994
972
|
return (
|
|
995
973
|
alt.Chart(
|
|
@@ -315,38 +315,56 @@ def read_input_file(filename, safe_directory="data_folder"):
|
|
|
315
315
|
|
|
316
316
|
def get_weakness_counts(input_file, nosec=False):
|
|
317
317
|
"""
|
|
318
|
-
|
|
318
|
+
Count SAST weaknesses.
|
|
319
|
+
|
|
320
|
+
Accepts either:
|
|
321
|
+
- A scan result dictionary.
|
|
322
|
+
- A file/package path that will be scanned.
|
|
319
323
|
"""
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
|
|
325
|
+
# Accept an existing scan result or scan a file/package
|
|
326
|
+
if isinstance(input_file, dict):
|
|
327
|
+
scan_result = input_file
|
|
328
|
+
else:
|
|
329
|
+
scan_result = filescan(input_file, nosec)
|
|
322
330
|
|
|
323
331
|
if not isinstance(scan_result, dict):
|
|
324
|
-
raise ValueError("
|
|
332
|
+
raise ValueError("Invalid scan result")
|
|
325
333
|
|
|
326
334
|
if "Error" in scan_result:
|
|
327
335
|
raise ValueError(scan_result["Error"])
|
|
328
336
|
|
|
329
337
|
file_security_info = scan_result.get("file_security_info")
|
|
338
|
+
|
|
330
339
|
if not isinstance(file_security_info, dict):
|
|
331
340
|
return {}
|
|
332
341
|
|
|
333
342
|
counter = Counter()
|
|
334
343
|
|
|
335
344
|
for file_info in file_security_info.values():
|
|
345
|
+
|
|
336
346
|
if not isinstance(file_info, dict):
|
|
337
347
|
continue
|
|
338
348
|
|
|
339
349
|
sast_result = file_info.get("sast_result", {})
|
|
350
|
+
|
|
340
351
|
if not isinstance(sast_result, dict):
|
|
341
352
|
continue
|
|
342
353
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if isinstance(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
354
|
+
for finding in sast_result.values():
|
|
355
|
+
|
|
356
|
+
# Support individual findings and lists of findings
|
|
357
|
+
findings = finding if isinstance(finding, list) else [finding]
|
|
358
|
+
|
|
359
|
+
for issue in findings:
|
|
360
|
+
|
|
361
|
+
if not isinstance(issue, dict):
|
|
362
|
+
continue
|
|
363
|
+
|
|
364
|
+
weakness_type = issue.get("validation", "Unknown")
|
|
365
|
+
|
|
366
|
+
if isinstance(weakness_type, str) and weakness_type:
|
|
367
|
+
counter[weakness_type] += 1
|
|
350
368
|
|
|
351
369
|
return dict(counter)
|
|
352
370
|
|
|
@@ -19,17 +19,33 @@ So all results are returned as Pandas Dataframe. This makes things easier for fu
|
|
|
19
19
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
def total_weaknesses(scan_result):
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
"""Count all individual weaknesses in a scan result.
|
|
24
|
+
|
|
25
|
+
Walks through each file's SAST findings and adds up every
|
|
26
|
+
individual weakness found.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
scan_result (dict): Scan output with a "file_security_info" key
|
|
30
|
+
mapping file names to their per-file results. Each file's
|
|
31
|
+
"sast_result" maps check names to either a single finding
|
|
32
|
+
or a list of findings.
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
Returns:
|
|
35
|
+
int: Total number of individual weaknesses across all files.
|
|
36
|
+
"""
|
|
29
37
|
total = 0
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
file_security_info = scan_result.get("file_security_info", {})
|
|
40
|
+
|
|
41
|
+
for file_info in file_security_info.values():
|
|
32
42
|
sast_result = file_info.get("sast_result", {})
|
|
33
|
-
|
|
43
|
+
|
|
44
|
+
for finding in sast_result.values():
|
|
45
|
+
if isinstance(finding, list):
|
|
46
|
+
total += len(finding)
|
|
47
|
+
else:
|
|
48
|
+
total += 1
|
|
34
49
|
|
|
35
50
|
return total
|
|
51
|
+
|
|
@@ -9,7 +9,7 @@ Directory Creation,os.mknod,Low,Direct file system calls require careful input v
|
|
|
9
9
|
Directory Creation,os.makedev,Low,Direct file system calls require careful input validation to prevent vulnerabilities.
|
|
10
10
|
OS Forking,os.fork,Low,"On macOS use of this function is unsafe when mixed with using higher-level system APIs, and that includes using urllib.request."
|
|
11
11
|
Dangerous Built-in: eval,eval,High,This function can execute arbitrary code. Never safe with untrusted input.
|
|
12
|
-
Input Function,input,
|
|
12
|
+
Input Function,input,High,User input must be strictly sanitized and validated to prevent injection vulnerabilities.
|
|
13
13
|
Overly Broad Exception Handling,pass,Low,Using `pass` in an `except` block can silently ignore critical security exceptions.
|
|
14
14
|
Overly Broad Exception Handling,continue,Low,Skipping over exceptions can mask critical errors and security risks.
|
|
15
15
|
Dangerous Built-in: exec,exec,High,This function can execute arbitrary code and should be used only with validated constructs.
|
|
@@ -14,6 +14,7 @@ Public API functions for Python Code Audit aka codeaudit on pypi.org
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
import gzip
|
|
17
|
+
import os
|
|
17
18
|
import json
|
|
18
19
|
import tarfile
|
|
19
20
|
import tempfile
|
|
@@ -84,12 +85,35 @@ def get_pypi_download_info(package_name):
|
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
def is_valid_tar_gz(path):
|
|
87
|
-
"""Return True if the
|
|
88
|
-
|
|
88
|
+
"""Return True only if the path points to a valid .tar.gz archive.
|
|
89
|
+
|
|
90
|
+
Archives must pass custom validation limits:
|
|
91
|
+
- Maximum file size: 15 MiB
|
|
92
|
+
- Maximum number of tar members: 12,000
|
|
89
93
|
"""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
try:
|
|
95
|
+
path = os.fspath(path)
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
path.endswith(".tar.gz")
|
|
99
|
+
and validate_tar_gz(
|
|
100
|
+
path,
|
|
101
|
+
max_file_size=15 * 1024 * 1024,
|
|
102
|
+
max_tar_members=12000,
|
|
103
|
+
)
|
|
104
|
+
and tarfile.is_tarfile(path)
|
|
105
|
+
)
|
|
106
|
+
except (OSError, ValueError, TypeError, AttributeError, tarfile.TarError):
|
|
107
|
+
return False
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# def is_valid_tar_gz(path):
|
|
111
|
+
# """Return True if the given path is a valid .tar.gz file.
|
|
112
|
+
# Custom validation values for validate_tar_gz are used. So note that NOT all tar.gz files will be accepted. Use PyPI package scan instead if possible.
|
|
113
|
+
# """
|
|
114
|
+
# return bool(
|
|
115
|
+
# validate_tar_gz(path, max_file_size=15 * 1024 * 1024, max_tar_members=12000)
|
|
116
|
+
# )
|
|
93
117
|
|
|
94
118
|
|
|
95
119
|
def get_targz_package_source(
|