codeaudit 1.9.0__tar.gz → 1.9.1__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.0 → codeaudit-1.9.1}/CHANGELOG.md +26 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/PKG-INFO +12 -10
- {codeaudit-1.9.0 → codeaudit-1.9.1}/README.md +11 -9
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/CONTRIBUTE.md +52 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/_config.yml +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/exception_check.md +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/codeauditcommands.md +2 -2
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/codeauditchecks.html +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/demoscan.json +2 -2
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/intro.md +2 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/makeitbetter.md +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/api_interfaces.py +2 -10
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/corecli.py +1 -1
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/filehelpfunctions.py +7 -13
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/pypi_package_scan.py +4 -2
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/reporting.py +4 -10
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/dashboardapp.py +62 -62
- codeaudit-1.9.1/tests/test_valid_python.py +122 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/test_filehelpfunctions.py +7 -13
- codeaudit-1.9.1/tests/validationfiles/incorrect_python_file.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/.github/workflows/sast_validation.yml +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/.gitignore +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/LICENSE.txt +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/SECURITY.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/.gitignore +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/class_index.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/function_index.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/index.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/status.json +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/_toc.yml +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/about.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/architecture.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/changelog.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/input_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/random_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/checksinformation.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/cimode.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/complexitycheck.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/demofile.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/filescan.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/examples/overview.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/features.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/filescan.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/filescan.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/handling_errors.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/help.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/howtoscan.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/OO.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/ai_use.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/installation.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/issues.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/license.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/markingissues.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/modulescan.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/overviewplot.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/pca_overview.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/project_philosophy.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/sponsors.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/userguide.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/warnings.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/whatissast.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/docs/whysast.md +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/filescan.png +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/pyproject.toml +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/altairplots.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/api_reporting.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/dashboard_reports.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_171.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_171.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_version162.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_version162.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_version166.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/dashboardapp_version166.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp_171.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp_171.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp_180.html +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/pyodide/deployed/dashboardapp_180.js +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/__init__.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_apicalls.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_base64.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_chmod.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_edgecases.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_filescan_api.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_ftp.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_oschecks.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_random.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_subprocess.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_suppression.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/test_zstd.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/test_clean_import_list.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/test_count_weaknesses.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/linkaudit-0.9.9.tar.gz +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.9.0 → codeaudit-1.9.1}/tests/validationfiles/zstd.py +0 -0
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.9.1:
|
|
4
|
+
|
|
5
|
+
**Added**
|
|
6
|
+
|
|
7
|
+
* Extra badge in the `README.md` for direct launch of the WASM version.
|
|
8
|
+
* A switch option in the UI for the WASM version to use or suppress markers in code when scanning.
|
|
9
|
+
* AI policy section for contributions in the manual.
|
|
10
|
+
|
|
11
|
+
**Changed**
|
|
12
|
+
|
|
13
|
+
* Adjusted validation values for checking `targz` files (`max_file_size = 15 * 1024 * 1024`, `max_tar_members = 12000`).
|
|
14
|
+
* Tightened security for validating Python files using `validate_python` from the `fileaudit` Python module.
|
|
15
|
+
* Dashboard version: Improved validation for valid PyPI names on the client side.
|
|
16
|
+
* Improved handling and status of tabs in the WASM version.
|
|
17
|
+
* Minor updates to the CLI help text.
|
|
18
|
+
* Changed the manual title from **Python Security Code Audit** to **Python Code Audit**.
|
|
19
|
+
|
|
20
|
+
**Fixed**
|
|
21
|
+
|
|
22
|
+
* Improved and updated unit tests for validating the correct working of excluded directories during scans (`test_excluded_dirs`).
|
|
23
|
+
|
|
24
|
+
**Documentation**
|
|
25
|
+
|
|
26
|
+
* General updates and fixes for the manual.
|
|
27
|
+
|
|
28
|
+
|
|
3
29
|
## Version 1.9.0:
|
|
4
30
|
|
|
5
31
|
**Added**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.1
|
|
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
|
|
@@ -35,7 +35,7 @@ Description-Content-Type: text/markdown
|
|
|
35
35
|
|
|
36
36
|
# Codeaudit
|
|
37
37
|
|
|
38
|
-

|
|
38
|
+
[](https://codeaudit.nocomplexity.com/)
|
|
39
39
|
|
|
40
40
|
[](https://github.com/nocomplexity/codeaudit)
|
|
41
41
|
[](https://pypi.org/project/codeaudit)
|
|
@@ -43,6 +43,7 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
[](https://www.bestpractices.dev/projects/10970)
|
|
44
44
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
45
45
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
46
|
+
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
46
47
|
[](https://pepy.tech/projects/codeaudit)
|
|
47
48
|
|
|
48
49
|
Python Code Audit - A modern Python security source code analyzer based on distrust.
|
|
@@ -51,6 +52,15 @@ Python Code Audit is a static application security testing (SAST) tool designed
|
|
|
51
52
|
|
|
52
53
|
This tool is designed for anyone who uses or creates Python programs and wants to understand and mitigate potential security risks.
|
|
53
54
|
|
|
55
|
+
> [!TIP]
|
|
56
|
+
> **Try it instantly — no installs, no setup, no excuses.**
|
|
57
|
+
>
|
|
58
|
+
> 👉 [Launch the browser version](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
59
|
+
|
|
60
|
+
It runs **100% locally** in your browser via WebAssembly (WASM). See the full power of **Python Code Audit** within 60 seconds.
|
|
61
|
+
No downloads. No dependencies. Just click and run a security audit on any Python package on PyPI!
|
|
62
|
+
|
|
63
|
+
|
|
54
64
|
This tool is created for:
|
|
55
65
|
|
|
56
66
|
- Python Users who want to assess the security risks in the Python code they use.
|
|
@@ -82,14 +92,6 @@ Python Code Audit has the following features:
|
|
|
82
92
|
|
|
83
93
|
## Installation
|
|
84
94
|
|
|
85
|
-
> [!TIP]
|
|
86
|
-
> Try it instantly—no installs, no setup, no excuses.
|
|
87
|
-
>
|
|
88
|
-
> 👉 Launch the browser version [here](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
89
|
-
|
|
90
|
-
It runs 100% locally in your browser using WebAssembly (WASM). See the power of the tool in under 60 seconds.
|
|
91
|
-
No downloads. No dependencies. Just click and do a security audit on Python Code.
|
|
92
|
-
|
|
93
95
|
Loved the browser version? Unlock the full power. For advanced security code inspections, CI/CD integration, and all professional features, install the complete Python package:
|
|
94
96
|
|
|
95
97
|
```console
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Codeaudit
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+
[](https://codeaudit.nocomplexity.com/)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/nocomplexity/codeaudit)
|
|
6
6
|
[](https://pypi.org/project/codeaudit)
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
[](https://www.bestpractices.dev/projects/10970)
|
|
9
9
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
10
10
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
11
|
+
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
11
12
|
[](https://pepy.tech/projects/codeaudit)
|
|
12
13
|
|
|
13
14
|
Python Code Audit - A modern Python security source code analyzer based on distrust.
|
|
@@ -16,6 +17,15 @@ Python Code Audit is a static application security testing (SAST) tool designed
|
|
|
16
17
|
|
|
17
18
|
This tool is designed for anyone who uses or creates Python programs and wants to understand and mitigate potential security risks.
|
|
18
19
|
|
|
20
|
+
> [!TIP]
|
|
21
|
+
> **Try it instantly — no installs, no setup, no excuses.**
|
|
22
|
+
>
|
|
23
|
+
> 👉 [Launch the browser version](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
24
|
+
|
|
25
|
+
It runs **100% locally** in your browser via WebAssembly (WASM). See the full power of **Python Code Audit** within 60 seconds.
|
|
26
|
+
No downloads. No dependencies. Just click and run a security audit on any Python package on PyPI!
|
|
27
|
+
|
|
28
|
+
|
|
19
29
|
This tool is created for:
|
|
20
30
|
|
|
21
31
|
- Python Users who want to assess the security risks in the Python code they use.
|
|
@@ -47,14 +57,6 @@ Python Code Audit has the following features:
|
|
|
47
57
|
|
|
48
58
|
## Installation
|
|
49
59
|
|
|
50
|
-
> [!TIP]
|
|
51
|
-
> Try it instantly—no installs, no setup, no excuses.
|
|
52
|
-
>
|
|
53
|
-
> 👉 Launch the browser version [here](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
54
|
-
|
|
55
|
-
It runs 100% locally in your browser using WebAssembly (WASM). See the power of the tool in under 60 seconds.
|
|
56
|
-
No downloads. No dependencies. Just click and do a security audit on Python Code.
|
|
57
|
-
|
|
58
60
|
Loved the browser version? Unlock the full power. For advanced security code inspections, CI/CD integration, and all professional features, install the complete Python package:
|
|
59
61
|
|
|
60
62
|
```console
|
|
@@ -63,6 +63,58 @@ See the [section Development](makeitbetter) for to get a head start when making
|
|
|
63
63
|
|
|
64
64
|
:::
|
|
65
65
|
|
|
66
|
+
(AI-policy)=
|
|
67
|
+
## Generative AI / LLM Policy
|
|
68
|
+
|
|
69
|
+
Everyone is free to make contributions with or without AI assistence. Especially since English is not the native language of many people and users.
|
|
70
|
+
|
|
71
|
+
**BUT:** Due to both legal and human reasons, we have to establish boundaries.
|
|
72
|
+
|
|
73
|
+
:::{caution}
|
|
74
|
+
- We take the responsibility for this project very seriously and we expect you to take your responsibility for your contributions seriously, too.
|
|
75
|
+
- Every contribution has to be backed by a human who unequivocally owns the copyright for all changes.
|
|
76
|
+
|
|
77
|
+
No LLM bots in `Co-authored-by:`s.
|
|
78
|
+
- Absolutely **no** unsupervised agentic tools like OpenClaw.
|
|
79
|
+
|
|
80
|
+
By submitting a pull request, you declare that:
|
|
81
|
+
- You are the author of the contribution.
|
|
82
|
+
- You **understand** the code.
|
|
83
|
+
- You accept full responsibility for it.
|
|
84
|
+
:::
|
|
85
|
+
|
|
86
|
+
### Legal
|
|
87
|
+
|
|
88
|
+
When you contribute to **Python Code Audit** (On PyPI `codeaudit`), your contributions (with or without AI support) are made under the same license as the file you are working on. You retain your copyright to your changes to this project.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Human
|
|
92
|
+
|
|
93
|
+
We take responsibility to our users very serious. Every code change is reviewed manually before merging because it's our responsibility to keep the project **stable and secure**.
|
|
94
|
+
|
|
95
|
+
Please understand that by opening low-quality pull requests generated by AI you're not helping. Make small pull request that are easy to review and merge.
|
|
96
|
+
:::{note}
|
|
97
|
+
Every pull request must be created by a Human or reviewed by a human. A human is responsible for all text in an issue or pull request.
|
|
98
|
+
:::
|
|
99
|
+
|
|
100
|
+
We have no time to become part of your vibe coding loop where you drop LLM slop and we spend time and energy to review it, and you just feed it back into the LLM for another iteration.
|
|
101
|
+
|
|
102
|
+
In practice, this means:
|
|
103
|
+
|
|
104
|
+
- Pull requests that have an LLM product listed as co-author can't be merged and will be closed without further discussion.
|
|
105
|
+
|
|
106
|
+
If you used LLM tools during development, you may still submit. But you must remove all LLM author tags and take full ownership of every line.
|
|
107
|
+
|
|
108
|
+
- By submitting a pull request, **you** take full responsibility for the contents of the pull request.
|
|
109
|
+
|
|
110
|
+
*"An LLM wrote it"* is **not** an acceptable response to questions or review remarks.
|
|
111
|
+
|
|
112
|
+
So:
|
|
113
|
+
- Do **not** post LLM-generated review comments.
|
|
114
|
+
- Do **not** post summaries unless you've fact-checked them and take responsibility for 100% of their content.
|
|
115
|
+
|
|
116
|
+
*Attribution: This AI policy is based on [attrs' AI_POLICY.md](https://github.com/python-attrs/attrs/blob/main/.github/AI_POLICY.md).*
|
|
117
|
+
|
|
66
118
|
(CoC-label)=
|
|
67
119
|
## Code of Conduct
|
|
68
120
|
|
|
@@ -99,6 +99,6 @@ sphinx:
|
|
|
99
99
|
use_issues_button: True
|
|
100
100
|
home_page_in_toc: True
|
|
101
101
|
logo:
|
|
102
|
-
text: <b>Python
|
|
102
|
+
text: <b>Python Code Audit</b>
|
|
103
103
|
extra_footer: '<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a> This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>'
|
|
104
104
|
|
|
@@ -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.9.
|
|
3
|
+
Python Code Audit commands for: version: 1.9.1
|
|
4
4
|
```
|
|
5
5
|
----------------------------------------------------
|
|
6
6
|
_ __ _
|
|
@@ -23,7 +23,7 @@ Commands:
|
|
|
23
23
|
checks Creates an HTML report of all implemented security checks.
|
|
24
24
|
version Prints the module version. Or use codeaudit [-v] [--v] [-version] or [--version].
|
|
25
25
|
|
|
26
|
-
Use the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to audit and secure your Python programmes. Explore further essential open-source security tools at https://
|
|
26
|
+
Use the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to audit and secure your Python programmes. Explore further essential open-source security tools at https://pythonsecurity.nocomplexity.com/
|
|
27
27
|
|
|
28
28
|
```
|
|
29
29
|
## codeaudit overview
|
|
@@ -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.1</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-09 11:58</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.9.1</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>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
[](https://pypi.org/project/codeaudit)
|
|
6
6
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
7
7
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
8
|
+
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
9
|
+
|
|
8
10
|
|
|
9
11
|

|
|
10
12
|
|
|
@@ -18,7 +18,7 @@ When you contribute text or code to Python Code Audit, your contributions are ma
|
|
|
18
18
|
|
|
19
19
|
:::{tip}
|
|
20
20
|
All contributions are welcome!
|
|
21
|
-
Think of corrections on the manual, code and more, or better tests.
|
|
21
|
+
Think of corrections on the manual, code and more, or better tests. But be careful with [AI contributions](AI-policy).
|
|
22
22
|
|
|
23
23
|
* Questions, Feature Requests, Bug Reports should all be reported on the [Github Issue Tracker](https://github.com/nocomplexity/codeaudit/issues) .
|
|
24
24
|
|
|
@@ -139,11 +139,7 @@ def filescan(input_path, nosec=False):
|
|
|
139
139
|
scan_output = _codeaudit_directory_scan(input_path, nosec_flag=nosec)
|
|
140
140
|
output |= scan_output
|
|
141
141
|
return output
|
|
142
|
-
elif (
|
|
143
|
-
file_path.suffix.lower() == ".py"
|
|
144
|
-
and file_path.is_file()
|
|
145
|
-
and is_ast_parsable(input_path)
|
|
146
|
-
): # check on parseable single Python file
|
|
142
|
+
elif is_ast_parsable(input_path): # check on parseable single Python file
|
|
147
143
|
# do a file check
|
|
148
144
|
file_information = overview_per_file(input_path)
|
|
149
145
|
module_information = get_modules(input_path) # modules per file
|
|
@@ -464,11 +460,7 @@ def get_overview(input_path):
|
|
|
464
460
|
else:
|
|
465
461
|
output_msg = f"Directory path {input_path} contains no Python files."
|
|
466
462
|
return {"Error": output_msg}
|
|
467
|
-
elif (
|
|
468
|
-
file_path.suffix.lower() == ".py"
|
|
469
|
-
and file_path.is_file()
|
|
470
|
-
and is_ast_parsable(input_path)
|
|
471
|
-
):
|
|
463
|
+
elif is_ast_parsable(input_path):
|
|
472
464
|
security_statistics = overview_per_file(input_path)
|
|
473
465
|
return security_statistics
|
|
474
466
|
else:
|
|
@@ -73,7 +73,7 @@ def display_help():
|
|
|
73
73
|
summary = docstring.split("\n", 1)[0]
|
|
74
74
|
print(f" {command:<20} {summary}")
|
|
75
75
|
print(
|
|
76
|
-
"\nUse the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to audit and secure your Python programmes. Explore further essential open-source security tools at https://
|
|
76
|
+
"\nUse the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to audit and secure your Python programmes. Explore further essential open-source security tools at https://pythonsecurity.nocomplexity.com/\n"
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
|
|
@@ -18,6 +18,8 @@ import sys
|
|
|
18
18
|
import warnings
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
|
|
21
|
+
from fileaudit.python_check import validate_python
|
|
22
|
+
|
|
21
23
|
|
|
22
24
|
def read_in_source_file(file_path):
|
|
23
25
|
# Ensure file_path is a Path object
|
|
@@ -97,24 +99,16 @@ def get_filename_from_path(file_path):
|
|
|
97
99
|
|
|
98
100
|
def is_ast_parsable(file_path):
|
|
99
101
|
"""
|
|
100
|
-
Checks whether a Python file can be
|
|
102
|
+
Checks whether a Python file can be validated and parsed.
|
|
103
|
+
Uses the extensive security checker for valid Python files of the module https://github.com/nocomplexity/fileaudit
|
|
101
104
|
|
|
102
105
|
Args:
|
|
103
|
-
file_path (str): Path to the Python source file.
|
|
106
|
+
file_path (str | Path): Path to the Python source file.
|
|
104
107
|
|
|
105
108
|
Returns:
|
|
106
|
-
bool: True if the file
|
|
109
|
+
bool: True if the file passes Python validation, False otherwise.
|
|
107
110
|
"""
|
|
108
|
-
|
|
109
|
-
with open(file_path, "r", encoding="utf-8") as f:
|
|
110
|
-
source = f.read()
|
|
111
|
-
|
|
112
|
-
with warnings.catch_warnings():
|
|
113
|
-
warnings.simplefilter("ignore", category=SyntaxWarning)
|
|
114
|
-
ast.parse(source, filename=file_path)
|
|
115
|
-
return True
|
|
116
|
-
except (SyntaxError, UnicodeDecodeError, ValueError) as e:
|
|
117
|
-
return False
|
|
111
|
+
return validate_python(Path(file_path))
|
|
118
112
|
|
|
119
113
|
|
|
120
114
|
def has_python_files(input_path):
|
|
@@ -85,9 +85,11 @@ def get_pypi_download_info(package_name):
|
|
|
85
85
|
|
|
86
86
|
def is_valid_tar_gz(path):
|
|
87
87
|
"""Return True if the given path is a valid .tar.gz file.
|
|
88
|
-
|
|
88
|
+
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.
|
|
89
89
|
"""
|
|
90
|
-
return bool(
|
|
90
|
+
return bool(
|
|
91
|
+
validate_tar_gz(path, max_file_size=15 * 1024 * 1024, max_tar_members=12000)
|
|
92
|
+
)
|
|
91
93
|
|
|
92
94
|
|
|
93
95
|
def get_targz_package_source(
|
|
@@ -160,7 +160,7 @@ def overview_report(directory, filename=DEFAULT_OUTPUT_FILE):
|
|
|
160
160
|
print(f"ERROR: Directory '{directory}' contains no Python files.")
|
|
161
161
|
exit(1)
|
|
162
162
|
elif file_path.name.endswith(".tar.gz") and validate_tar_gz(
|
|
163
|
-
directory
|
|
163
|
+
directory, max_file_size=15 * 1024 * 1024, max_tar_members=12000
|
|
164
164
|
): # for local tar.gz or remote tar.gz scans
|
|
165
165
|
package_name = directory
|
|
166
166
|
advice = f'<p>👉 To perform a SAST scan on the source code, run:<pre><code class="language-python">codeaudit filescan {directory}</code></pre></p>'
|
|
@@ -379,11 +379,7 @@ def scan_report(input_path, filename=DEFAULT_OUTPUT_FILE, nosec=False):
|
|
|
379
379
|
directory_scan_report(
|
|
380
380
|
input_path, nosec_flag=nosec, filename=filename
|
|
381
381
|
) # create a package aka directory scan report
|
|
382
|
-
elif (
|
|
383
|
-
file_path.suffix == ".py"
|
|
384
|
-
and file_path.is_file()
|
|
385
|
-
and is_ast_parsable(input_path)
|
|
386
|
-
):
|
|
382
|
+
elif is_ast_parsable(input_path):
|
|
387
383
|
# create a sast file check report
|
|
388
384
|
if not nosec: # no filtering on reviewed items with markers in code
|
|
389
385
|
scan_output = perform_validations(
|
|
@@ -410,7 +406,7 @@ def scan_report(input_path, filename=DEFAULT_OUTPUT_FILE, nosec=False):
|
|
|
410
406
|
create_htmlfile(html_output, filename)
|
|
411
407
|
|
|
412
408
|
elif file_path.name.endswith(".tar.gz") and validate_tar_gz(
|
|
413
|
-
input_path
|
|
409
|
+
input_path, max_file_size=15 * 1024 * 1024, max_tar_members=12000
|
|
414
410
|
): # for local tar.gz or remote tar.gz scans
|
|
415
411
|
src_dir, tmp_handle = get_targz_package_source(input_path)
|
|
416
412
|
directory_scan_report(
|
|
@@ -744,9 +740,7 @@ def report_module_information(inputfile, reportname=DEFAULT_OUTPUT_FILE):
|
|
|
744
740
|
"See codeaudit modulescan -h or check the manual https://codeaudit.nocomplexity.com"
|
|
745
741
|
)
|
|
746
742
|
exit(1)
|
|
747
|
-
elif (
|
|
748
|
-
file_path.suffix == ".py" and file_path.is_file() and is_ast_parsable(inputfile)
|
|
749
|
-
):
|
|
743
|
+
elif is_ast_parsable(inputfile):
|
|
750
744
|
source = read_in_source_file(inputfile)
|
|
751
745
|
used_modules = get_imported_modules(source)
|
|
752
746
|
# Initial call to print 0% progress
|
|
@@ -197,7 +197,14 @@ async def filescan_wasm(input_path, nosec=False):
|
|
|
197
197
|
text_input = pn.widgets.TextInput(
|
|
198
198
|
name="Python Package Name", placeholder="Enter PyPI package (e.g., requests)..."
|
|
199
199
|
)
|
|
200
|
+
nosec_switch = pn.widgets.Switch(
|
|
201
|
+
label="Honor SAST suppressions", value=True, align="center"
|
|
202
|
+
)
|
|
203
|
+
tooltip = pn.widgets.TooltipIcon(
|
|
204
|
+
value="Disable security markers in the code during the scan"
|
|
205
|
+
)
|
|
200
206
|
|
|
207
|
+
switch_with_tooltip = pn.Row(nosec_switch, tooltip, align="center")
|
|
201
208
|
|
|
202
209
|
run_button = pn.widgets.Button(name="Start Scan", button_type="primary")
|
|
203
210
|
status = pn.pane.Markdown("### Ready to scan.")
|
|
@@ -207,16 +214,20 @@ loading = pn.indicators.LoadingSpinner(
|
|
|
207
214
|
)
|
|
208
215
|
|
|
209
216
|
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
overview_content = pn.Column()
|
|
218
|
+
modules_content = pn.Column()
|
|
219
|
+
complexity_content = pn.Column()
|
|
220
|
+
weaknesses_content = pn.Column()
|
|
221
|
+
weaknesses_files_content = pn.Column()
|
|
222
|
+
weaknesses_details_content = pn.Column()
|
|
212
223
|
|
|
213
224
|
tabs = pn.Tabs(
|
|
214
|
-
("Package Overview",
|
|
215
|
-
("Used Modules",
|
|
216
|
-
("Complexity Insights",
|
|
217
|
-
("Weaknesses Overview",
|
|
218
|
-
("Weaknesses per file",
|
|
219
|
-
("Weaknesses Details",
|
|
225
|
+
("Package Overview", overview_content),
|
|
226
|
+
("Used Modules", modules_content),
|
|
227
|
+
("Complexity Insights", complexity_content),
|
|
228
|
+
("Weaknesses Overview", weaknesses_content),
|
|
229
|
+
("Weaknesses per file", weaknesses_files_content),
|
|
230
|
+
("Weaknesses Details", weaknesses_details_content),
|
|
220
231
|
dynamic=True,
|
|
221
232
|
sizing_mode="stretch_both",
|
|
222
233
|
)
|
|
@@ -231,6 +242,16 @@ async def run_scan(event):
|
|
|
231
242
|
status.object = "⚠️ Please enter a package name."
|
|
232
243
|
return
|
|
233
244
|
|
|
245
|
+
if len(package_name) > 100 or any(c.isspace() for c in package_name):
|
|
246
|
+
status.object = "⚠️ Package name 100 characters or fewer with no spaces."
|
|
247
|
+
return
|
|
248
|
+
|
|
249
|
+
# check NOSEC switch from UI
|
|
250
|
+
if nosec_switch.value:
|
|
251
|
+
respect_marker = True
|
|
252
|
+
else:
|
|
253
|
+
respect_marker = False
|
|
254
|
+
|
|
234
255
|
# --- UI state updates ---
|
|
235
256
|
run_button.disabled = True
|
|
236
257
|
loading.value = True
|
|
@@ -241,7 +262,7 @@ async def run_scan(event):
|
|
|
241
262
|
await asyncio.sleep(0.1)
|
|
242
263
|
|
|
243
264
|
# ✅ WASM-safe: no threads, no nested event loops
|
|
244
|
-
result = await filescan_wasm(package_name)
|
|
265
|
+
result = await filescan_wasm(package_name, respect_marker)
|
|
245
266
|
|
|
246
267
|
# --- Handle results ---
|
|
247
268
|
if result is None:
|
|
@@ -254,58 +275,39 @@ async def run_scan(event):
|
|
|
254
275
|
else:
|
|
255
276
|
result_pane.object = result
|
|
256
277
|
status.object = f"✅ Scan completed for **{package_name}**"
|
|
257
|
-
|
|
258
278
|
# --- Update tabs ---
|
|
259
|
-
|
|
260
|
-
"Package Overview",
|
|
261
|
-
pn.Column(create_statistics_overview(result)),
|
|
262
|
-
)
|
|
263
|
-
|
|
264
|
-
tabs[1] = (
|
|
265
|
-
"Used Modules",
|
|
266
|
-
pn.Column(
|
|
267
|
-
pn.Row(
|
|
268
|
-
pn.pane.Vega(module_count_barchart(result), show_actions=True),
|
|
269
|
-
pn.pane.Vega(
|
|
270
|
-
module_distribution_view(result), show_actions=True
|
|
271
|
-
),
|
|
272
|
-
),
|
|
273
|
-
report_used_modules(result),
|
|
274
|
-
pn.Spacer(height=60),
|
|
275
|
-
),
|
|
276
|
-
)
|
|
277
|
-
|
|
278
|
-
tabs[2] = (
|
|
279
|
-
"Complexity Insights",
|
|
280
|
-
pn.Column(
|
|
281
|
-
pn.pane.Vega(complexity_heatmap(result), show_actions=True),
|
|
282
|
-
pn.pane.Vega(lines_of_code_overview(result), show_actions=True),
|
|
283
|
-
pn.pane.Vega(ast_nodes_overview(result), show_actions=True),
|
|
284
|
-
pn.Spacer(height=60),
|
|
285
|
-
),
|
|
286
|
-
)
|
|
287
|
-
|
|
288
|
-
tabs[3] = (
|
|
289
|
-
"Weaknesses Overview",
|
|
290
|
-
pn.Column(pn.pane.Vega(weaknesses_overview(result), show_actions=True)),
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
tabs[4] = (
|
|
294
|
-
"Weaknesses per file",
|
|
295
|
-
pn.Column(
|
|
296
|
-
pn.pane.Vega(sast_files_overview(result), show_actions=True),
|
|
297
|
-
pn.pane.Vega(weaknesses_radial_overview(result), show_actions=True),
|
|
298
|
-
pn.Spacer(height=60),
|
|
299
|
-
),
|
|
300
|
-
)
|
|
279
|
+
overview_content.objects = [create_statistics_overview(result)]
|
|
301
280
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
pn.Spacer(height=60),
|
|
281
|
+
modules_content.objects = [
|
|
282
|
+
pn.Row(
|
|
283
|
+
pn.pane.Vega(module_count_barchart(result), show_actions=True),
|
|
284
|
+
pn.pane.Vega(module_distribution_view(result), show_actions=True),
|
|
307
285
|
),
|
|
308
|
-
|
|
286
|
+
report_used_modules(result),
|
|
287
|
+
pn.Spacer(height=60),
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
complexity_content.objects = [
|
|
291
|
+
pn.pane.Vega(complexity_heatmap(result), show_actions=True),
|
|
292
|
+
pn.pane.Vega(lines_of_code_overview(result), show_actions=True),
|
|
293
|
+
pn.pane.Vega(ast_nodes_overview(result), show_actions=True),
|
|
294
|
+
pn.Spacer(height=60),
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
weaknesses_content.objects = [
|
|
298
|
+
pn.pane.Vega(weaknesses_overview(result), show_actions=True)
|
|
299
|
+
]
|
|
300
|
+
|
|
301
|
+
weaknesses_files_content.objects = [
|
|
302
|
+
pn.pane.Vega(sast_files_overview(result), show_actions=True),
|
|
303
|
+
pn.pane.Vega(weaknesses_radial_overview(result), show_actions=True),
|
|
304
|
+
pn.Spacer(height=60),
|
|
305
|
+
]
|
|
306
|
+
|
|
307
|
+
weaknesses_details_content.objects = [
|
|
308
|
+
report_sast_results(result),
|
|
309
|
+
pn.Spacer(height=60),
|
|
310
|
+
]
|
|
309
311
|
|
|
310
312
|
except Exception as e:
|
|
311
313
|
status.object = f"❌ Error: {str(e)}"
|
|
@@ -323,24 +325,22 @@ run_button.on_click(run_scan)
|
|
|
323
325
|
infotext = get_info_text()
|
|
324
326
|
disclaimer_text = get_disclaimer_text()
|
|
325
327
|
|
|
328
|
+
scan_row = pn.Row(run_button, switch_with_tooltip)
|
|
326
329
|
# Sidebar layout
|
|
327
330
|
ca_sidebar = pn.Column(
|
|
328
331
|
"## Package Code Security Scan",
|
|
329
332
|
text_input,
|
|
330
|
-
|
|
333
|
+
scan_row,
|
|
331
334
|
loading,
|
|
332
335
|
status,
|
|
333
336
|
pn.Spacer(height=20),
|
|
334
337
|
infotext,
|
|
335
338
|
pn.Spacer(height=10),
|
|
336
339
|
disclaimer_text,
|
|
337
|
-
sizing_mode="stretch_width",
|
|
338
340
|
)
|
|
339
341
|
|
|
340
|
-
|
|
341
342
|
main_pane = pn.Column(tabs, sizing_mode="stretch_both")
|
|
342
343
|
|
|
343
|
-
|
|
344
344
|
app = pn.template.MaterialTemplate(
|
|
345
345
|
header_background="#1E2937",
|
|
346
346
|
title="Python Security Code Audit",
|