codeaudit 1.8.0__tar.gz → 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codeaudit-1.9.0/.github/workflows/python-test.yml +31 -0
- codeaudit-1.9.0/.github/workflows/sast_validation.yml +45 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/CHANGELOG.md +36 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/PKG-INFO +4 -4
- {codeaudit-1.8.0 → codeaudit-1.9.0}/SECURITY.md +1 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/cimode.md +7 -7
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/codeauditcommands.md +83 -44
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/codeauditoverview.md +15 -8
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_api_example_basic.ipynb +1 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/codeauditchecks.html +1 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/demoscan.json +2 -2
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/filescan.md +16 -13
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/installation.md +5 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/intro.md +17 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/pyproject.toml +6 -7
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/api_helpers.py +7 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/api_interfaces.py +134 -9
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/checkmodules.py +30 -2
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/dashboard_reports.py +7 -3
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/data/secretslist.txt +2 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/filehelpfunctions.py +1 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/pypi_package_scan.py +71 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/reporting.py +116 -55
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/dashboardapp.py +7 -1
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp.html +9 -9
- codeaudit-1.9.0/src/dashboard/pyodide/deployed/dashboardapp.html +295 -0
- codeaudit-1.9.0/src/dashboard/pyodide/deployed/dashboardapp_171.js +91 -0
- codeaudit-1.9.0/src/dashboard/pyodide/deployed/dashboardapp_180.html +295 -0
- codeaudit-1.9.0/src/dashboard/pyodide/deployed/dashboardapp_180.js +91 -0
- codeaudit-1.9.0/tests/test_filescan_api.py +130 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_hashstrenght.py +3 -0
- codeaudit-1.9.0/tests/unit_tests/test_clean_import_list.py +58 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/unit_tests/test_filehelpfunctions.py +2 -2
- codeaudit-1.9.0/tests/validationfiles/linkaudit-0.9.9.tar.gz +0 -0
- codeaudit-1.8.0/.github/workflows/python-test.yml +0 -24
- codeaudit-1.8.0/src/dashboard/pyodide/deployed/dashboardapp.js +0 -91
- codeaudit-1.8.0/src/dashboard/pyodide/deployed/dashboardapp_version166.html +0 -295
- codeaudit-1.8.0/src/dashboard/pyodide/deployed/dashboardapp_version166.js +0 -91
- {codeaudit-1.8.0 → codeaudit-1.9.0}/.gitignore +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/CONTRIBUTE.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/LICENSE.txt +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/README.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/.gitignore +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/class_index.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/function_index.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/index.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/status.json +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/_config.yml +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/_toc.yml +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/about.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/architecture.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/changelog.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/input_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/random_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/checksinformation.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/complexitycheck.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/demofile.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/filescan.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/examples/overview.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/features.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/filescan.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/handling_errors.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/help.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/howtoscan.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/OO.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/ai_use.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/issues.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/license.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/makeitbetter.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/markingissues.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/modulescan.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/overviewplot.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/pca_overview.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/project_philosophy.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/sponsors.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/userguide.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/warnings.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/whatissast.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/docs/whysast.md +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/filescan.png +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/altairplots.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/api_reporting.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/corecli.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp.js +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_171.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_171.js +0 -0
- {codeaudit-1.8.0/src/dashboard/pyodide/deployed → codeaudit-1.9.0/src/dashboard/pyodide}/dashboardapp_version162.html +0 -0
- {codeaudit-1.8.0/src/dashboard/pyodide/deployed → codeaudit-1.9.0/src/dashboard/pyodide}/dashboardapp_version162.js +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version166.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version166.js +0 -0
- /codeaudit-1.8.0/src/dashboard/pyodide/deployed/dashboardapp_171.js → /codeaudit-1.9.0/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp_171.html +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/__init__.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_apicalls.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_base64.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_chmod.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_edgecases.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_ftp.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_oschecks.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_random.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_subprocess.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_suppression.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/test_zstd.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/unit_tests/test_count_weaknesses.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.8.0 → codeaudit-1.9.0}/tests/validationfiles/zstd.py +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Python Package Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- 'src/**'
|
|
7
|
+
- 'tests/**'
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- 'src/**'
|
|
11
|
+
- 'tests/**'
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: 3.14
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip hatch
|
|
28
|
+
|
|
29
|
+
- name: Test with hatch
|
|
30
|
+
run: |
|
|
31
|
+
hatch test -acr
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# SAST scan with Python Code Audit on GitHub Actions
|
|
2
|
+
# Uses the development version!! So make sure it always works -)
|
|
3
|
+
|
|
4
|
+
name: Python Code Audit SAST Scan
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
paths:
|
|
9
|
+
- 'src/**'
|
|
10
|
+
pull_request:
|
|
11
|
+
paths:
|
|
12
|
+
- 'src/**'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
codeaudit-scan:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v5
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.14"
|
|
26
|
+
|
|
27
|
+
- name: Upgrade pip
|
|
28
|
+
run: python -m pip install --upgrade pip
|
|
29
|
+
|
|
30
|
+
- name: Install Python Code Audit
|
|
31
|
+
run: python -m pip install -e .
|
|
32
|
+
|
|
33
|
+
- name: Show version
|
|
34
|
+
run: codeaudit --version
|
|
35
|
+
|
|
36
|
+
- name: Run SAST scan
|
|
37
|
+
run: |
|
|
38
|
+
codeaudit cimode . --output text | tee codeaudit-output.text
|
|
39
|
+
exit ${PIPESTATUS[0]}
|
|
40
|
+
|
|
41
|
+
- name: Upload scan artifact
|
|
42
|
+
uses: actions/upload-artifact@v6
|
|
43
|
+
with:
|
|
44
|
+
name: codeaudit-${{ github.ref_name }}
|
|
45
|
+
path: codeaudit-output.text
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.9.0:
|
|
4
|
+
|
|
5
|
+
**Added**
|
|
6
|
+
|
|
7
|
+
* Support for scanning local and remote `.tar.gz` files using the `filescan` API function, simplifying package scanning before PyPI publication (available via `codeaudit filescan` and `codeaudit overview` CLI commands).
|
|
8
|
+
* Added `"test"` to the default collection of excluded scan directories.
|
|
9
|
+
|
|
10
|
+
**Changed**
|
|
11
|
+
|
|
12
|
+
* Improved the `filescan` API function.
|
|
13
|
+
* Dropped active installation support for Python versions older than 3.12 (code analysis support for older Python versions remains available).
|
|
14
|
+
* Updated GitHub Actions to use Node.js 24.
|
|
15
|
+
* Optimized the GitHub testing workflow to ignore documentation-only changes.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
**Documentation**
|
|
19
|
+
|
|
20
|
+
* Updated and improved unit tests to reflect current functionality and test coverage.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Version 1.8.1:
|
|
24
|
+
|
|
25
|
+
**Added**
|
|
26
|
+
- Dashboard: Updated info text on Dashboard version.
|
|
27
|
+
- Updated secrets list for egress scanning.
|
|
28
|
+
|
|
29
|
+
**Changed**
|
|
30
|
+
- Reporting (WASM version): Updated imported modules display logic—submodules and private modules are now hidden so that only real imported external modules are shown.
|
|
31
|
+
|
|
32
|
+
**Fixed**
|
|
33
|
+
- Reporting (WASM version): Resolved an error in the imported modules.
|
|
34
|
+
|
|
35
|
+
**Documentation**
|
|
36
|
+
- Improved API documentation.
|
|
37
|
+
- Various minor improvements.
|
|
38
|
+
|
|
3
39
|
## Version 1.8.0:
|
|
4
40
|
|
|
5
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
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
|
|
@@ -10,19 +10,19 @@ Author-email: Maikel Mardjan <mike@bm-support.org>
|
|
|
10
10
|
License-Expression: GPL-3.0-or-later
|
|
11
11
|
License-File: LICENSE.txt
|
|
12
12
|
Keywords: Complexity Checker,Python SAST,SAST,SAST API
|
|
13
|
-
Classifier: Development Status ::
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Environment :: Console
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: Intended Audience :: Science/Research
|
|
17
17
|
Classifier: Programming Language :: Python
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
21
|
Classifier: Topic :: Security
|
|
23
22
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.12
|
|
25
24
|
Requires-Dist: altair==6.0.0
|
|
25
|
+
Requires-Dist: fileaudit
|
|
26
26
|
Requires-Dist: fire==0.7.1
|
|
27
27
|
Requires-Dist: pandas>=2.3
|
|
28
28
|
Provides-Extra: test
|
|
@@ -20,7 +20,7 @@ I will send a response indicating the next steps in handling your report. After
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
> [!TIP]
|
|
23
|
-
> To learn more about security, please visit [Simplify Cyber Security](https://nocomplexity.com/simplify-security/). And do not
|
|
23
|
+
> To learn more about security, please visit [Simplify Cyber Security](https://nocomplexity.com/simplify-security/). And do not hesitate to join-in to make these Free and Open Security Playbooks better!
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -198,12 +198,12 @@ jobs:
|
|
|
198
198
|
|
|
199
199
|
steps:
|
|
200
200
|
- name: Checkout repository
|
|
201
|
-
uses: actions/checkout@
|
|
201
|
+
uses: actions/checkout@v5
|
|
202
202
|
|
|
203
203
|
- name: Set up Python
|
|
204
|
-
uses: actions/setup-python@
|
|
204
|
+
uses: actions/setup-python@v6
|
|
205
205
|
with:
|
|
206
|
-
python-version: "3.
|
|
206
|
+
python-version: "3.14"
|
|
207
207
|
|
|
208
208
|
- name: Upgrade pip
|
|
209
209
|
run: python -m pip install --upgrade pip
|
|
@@ -220,7 +220,7 @@ jobs:
|
|
|
220
220
|
exit ${PIPESTATUS[0]}
|
|
221
221
|
|
|
222
222
|
- name: Upload scan artifact
|
|
223
|
-
uses: actions/upload-artifact@
|
|
223
|
+
uses: actions/upload-artifact@v5
|
|
224
224
|
with:
|
|
225
225
|
name: codeaudit-${{ github.ref_name }}
|
|
226
226
|
path: codeaudit-output.text
|
|
@@ -243,10 +243,10 @@ jobs:
|
|
|
243
243
|
|
|
244
244
|
steps:
|
|
245
245
|
- name: Checkout repository
|
|
246
|
-
uses: actions/checkout@
|
|
246
|
+
uses: actions/checkout@v5
|
|
247
247
|
|
|
248
248
|
- name: Set up Python
|
|
249
|
-
uses: actions/setup-python@
|
|
249
|
+
uses: actions/setup-python@v6
|
|
250
250
|
with:
|
|
251
251
|
python-version: "3.13"
|
|
252
252
|
|
|
@@ -263,7 +263,7 @@ jobs:
|
|
|
263
263
|
run: codeaudit cimode . --output html > codeaudit-output.html
|
|
264
264
|
|
|
265
265
|
- name: Upload scan artifact
|
|
266
|
-
uses: actions/upload-artifact@
|
|
266
|
+
uses: actions/upload-artifact@v6
|
|
267
267
|
with:
|
|
268
268
|
name: codeaudit-${{ github.ref_name }}
|
|
269
269
|
path: codeaudit-output.html
|
|
@@ -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.
|
|
3
|
+
Python Code Audit commands for: version: 1.9.0
|
|
4
4
|
```
|
|
5
5
|
----------------------------------------------------
|
|
6
6
|
_ __ _
|
|
@@ -16,8 +16,8 @@ Usage: codeaudit COMMAND <directory|package> [report.html]
|
|
|
16
16
|
Depending on the command, you must specify a local directory, a Python file, or a package name hosted on PyPI.org.Reporting: The results are generated as a static HTML report for viewing in a web browser.
|
|
17
17
|
|
|
18
18
|
Commands:
|
|
19
|
-
overview
|
|
20
|
-
filescan
|
|
19
|
+
overview Generate an overview report of code complexity and security indicators.
|
|
20
|
+
filescan Scan Python source code, PyPI packages, or tar.gz archives for security weaknesses.
|
|
21
21
|
cimode Run a SAST scan for CI workflows.
|
|
22
22
|
modulescan Generate a report on known vulnerabilities in Python modules and packages.
|
|
23
23
|
checks Creates an HTML report of all implemented security checks.
|
|
@@ -28,50 +28,76 @@ Use the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to
|
|
|
28
28
|
```
|
|
29
29
|
## codeaudit overview
|
|
30
30
|
```text
|
|
31
|
-
|
|
31
|
+
Generate an overview report of code complexity and security indicators.
|
|
32
32
|
|
|
33
|
-
This function analyzes a Python project
|
|
34
|
-
|
|
33
|
+
This function analyzes a Python project and generates a high-level HTML
|
|
34
|
+
overview of code complexity, project size, module dependencies, and
|
|
35
|
+
security-related indicators.
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
- The name of a package hosted on PyPI.org
|
|
37
|
+
The input can be one of the following:
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
* A local directory containing Python source files
|
|
40
|
+
* A local or remote ``.tar.gz`` source archive
|
|
41
|
+
* The name of a package hosted on PyPI.org
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
codeaudit overview <package-name|directory|archive.tar.gz> [reportname.html]
|
|
44
|
+
|
|
45
|
+
For a local or remote ``.tar.gz`` archive, the archive is validated,
|
|
46
|
+
extracted to a temporary directory, scanned, and removed after the report
|
|
47
|
+
has been generated.
|
|
48
|
+
|
|
49
|
+
For a PyPI package, the source distribution (sdist) is downloaded,
|
|
43
50
|
extracted to a temporary directory, scanned, and removed after the report
|
|
44
|
-
|
|
51
|
+
has been generated.
|
|
52
|
+
|
|
53
|
+
The report includes:
|
|
45
54
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
* Summary statistics for the analyzed project
|
|
56
|
+
* Security concern indicators based on maximum code complexity
|
|
57
|
+
and total lines of code
|
|
58
|
+
* A list of discovered standard-library and external modules
|
|
59
|
+
* Detailed metrics for each Python source file
|
|
60
|
+
* A visual overview of the collected metrics
|
|
61
|
+
* Advice for performing a full SAST scan with ``codeaudit filescan``
|
|
49
62
|
|
|
50
63
|
Examples:
|
|
51
64
|
Generate an overview report for a local project directory::
|
|
52
65
|
|
|
53
66
|
codeaudit overview /projects/mycolleaguesproject
|
|
54
67
|
|
|
68
|
+
Generate an overview report for a local ``.tar.gz`` archive::
|
|
69
|
+
|
|
70
|
+
codeaudit overview /path/to/myproject.tar.gz
|
|
71
|
+
|
|
72
|
+
Generate an overview report for a remote ``.tar.gz`` archive::
|
|
73
|
+
|
|
74
|
+
codeaudit overview https://example.com/myproject.tar.gz
|
|
75
|
+
|
|
55
76
|
Generate an overview report for a PyPI package::
|
|
56
77
|
|
|
57
|
-
codeaudit overview linkaudit
|
|
78
|
+
codeaudit overview linkaudit
|
|
58
79
|
|
|
59
|
-
codeaudit overview pydantic
|
|
80
|
+
codeaudit overview pydantic
|
|
81
|
+
|
|
82
|
+
Specify an output report file::
|
|
83
|
+
|
|
84
|
+
codeaudit overview /projects/mycolleaguesproject report.html
|
|
60
85
|
|
|
61
86
|
Args:
|
|
62
|
-
directory (str): Path to a local directory containing Python source
|
|
63
|
-
or
|
|
87
|
+
directory (str): Path to a local directory containing Python source
|
|
88
|
+
files, a local or remote ``.tar.gz`` source archive, or the name of
|
|
89
|
+
a package available on PyPI.org.
|
|
64
90
|
filename (str, optional): Name (and optional path) of the HTML file to
|
|
65
|
-
write the overview report to. The filename should use the
|
|
66
|
-
extension. Defaults to ``DEFAULT_OUTPUT_FILE``.
|
|
91
|
+
write the overview report to. The filename should use the
|
|
92
|
+
``.html`` extension. Defaults to ``DEFAULT_OUTPUT_FILE``.
|
|
67
93
|
|
|
68
94
|
Returns:
|
|
69
|
-
None
|
|
95
|
+
None: The function writes a static HTML overview report to disk.
|
|
70
96
|
|
|
71
97
|
Raises:
|
|
72
|
-
SystemExit: If the provided path is not a directory, contains no
|
|
73
|
-
files,
|
|
74
|
-
package name.
|
|
98
|
+
SystemExit: If the provided path is not a directory, contains no
|
|
99
|
+
Python files, is an invalid ``.tar.gz`` archive, or is neither a
|
|
100
|
+
valid local input nor a valid PyPI package name.
|
|
75
101
|
str(object='') -> str
|
|
76
102
|
str(bytes_or_buffer[, encoding[, errors]]) -> str
|
|
77
103
|
|
|
@@ -133,26 +159,32 @@ errors defaults to 'strict'.
|
|
|
133
159
|
```
|
|
134
160
|
## codeaudit filescan
|
|
135
161
|
```text
|
|
136
|
-
|
|
162
|
+
Scan Python source code, PyPI packages, or tar.gz archives for security weaknesses.
|
|
163
|
+
|
|
137
164
|
This function performs static application security testing (SAST) on a
|
|
138
165
|
specified input. The input can be one of the following:
|
|
139
166
|
|
|
140
167
|
* A local directory containing Python source code
|
|
141
168
|
* A single local Python file
|
|
169
|
+
* A local or remote ``.tar.gz`` source archive
|
|
142
170
|
* The name of a package hosted on PyPI
|
|
143
171
|
|
|
144
|
-
codeaudit filescan <pythonfile|package-name|directory> [reportname.html] [--nosec]
|
|
172
|
+
codeaudit filescan <pythonfile|package-name|directory|archive.tar.gz> [reportname.html] [--nosec]
|
|
145
173
|
|
|
146
174
|
Based on the input type, the function analyzes the source code for potential
|
|
147
175
|
security issues, generates an HTML report summarizing the findings, and
|
|
148
176
|
writes the report to disk.
|
|
149
177
|
|
|
178
|
+
For a local or remote ``.tar.gz`` archive, the archive is validated,
|
|
179
|
+
extracted to a temporary directory, scanned as a source directory, and
|
|
180
|
+
cleaned up after the scan completes.
|
|
181
|
+
|
|
150
182
|
If a PyPI package name is provided, the function downloads the source
|
|
151
183
|
distribution (sdist), extracts it to a temporary directory, scans the
|
|
152
184
|
extracted source code, and cleans up all temporary files after the scan
|
|
153
185
|
completes.
|
|
154
186
|
|
|
155
|
-
|
|
187
|
+
Examples:
|
|
156
188
|
|
|
157
189
|
Scan a local directory and write the report to ``report.html``::
|
|
158
190
|
|
|
@@ -166,49 +198,56 @@ completes.
|
|
|
166
198
|
|
|
167
199
|
codeaudit filescan myexample.py
|
|
168
200
|
|
|
201
|
+
Scan a local tar.gz archive::
|
|
202
|
+
|
|
203
|
+
codeaudit filescan /path/to/package.tar.gz
|
|
204
|
+
|
|
205
|
+
Scan a remote tar.gz archive::
|
|
206
|
+
|
|
207
|
+
codeaudit filescan https://example.com/package.tar.gz
|
|
208
|
+
|
|
169
209
|
Scan a package hosted on PyPI::
|
|
170
210
|
|
|
171
211
|
codeaudit filescan linkaudit
|
|
172
212
|
|
|
173
213
|
codeaudit filescan requests
|
|
174
214
|
|
|
175
|
-
|
|
176
215
|
Specify an output report file::
|
|
177
216
|
|
|
178
217
|
codeaudit filescan /path/to/project report.html
|
|
179
218
|
|
|
180
|
-
Enable filtering of issues marked with ``#nosec`` or another marker
|
|
219
|
+
Enable filtering of issues marked with ``#nosec`` or another marker
|
|
220
|
+
indicating that potential code weaknesses have been reviewed or
|
|
221
|
+
intentionally ignored::
|
|
181
222
|
|
|
182
223
|
codeaudit filescan myexample.py --nosec
|
|
183
224
|
|
|
184
225
|
POSITIONAL ARGUMENTS
|
|
185
226
|
INPUT_PATH
|
|
186
|
-
Path to a local Python file or directory,
|
|
187
|
-
|
|
227
|
+
Path to a local Python file or directory, a local or remote ``.tar.gz``
|
|
228
|
+
archive, or the name of a package available on PyPI.
|
|
188
229
|
|
|
189
230
|
FLAGS
|
|
190
231
|
-f, --filename=FILENAME
|
|
191
232
|
Default: 'codeaudit-report.html'
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Args:
|
|
233
|
+
Name (and optional path) of the HTML file to write the scan report to.
|
|
234
|
+
The filename should use the ``.html`` extension.
|
|
197
235
|
|
|
198
|
-
-f, --filename=FILENAME
|
|
199
|
-
Default: 'codeaudit-report.html'
|
|
200
|
-
Name (and optional path) of the HTML file to write the scan report to. The filename should use the ``.html`` extension. Defaults to ``DEFAULT_OUTPUT_FILE``.
|
|
201
236
|
-n, --nosec=NOSEC
|
|
202
237
|
Default: False
|
|
203
|
-
Whether to filter out issues marked as reviewed or ignored in the
|
|
238
|
+
Whether to filter out issues marked as reviewed or ignored in the
|
|
239
|
+
source code.
|
|
204
240
|
|
|
205
|
-
|
|
206
|
-
|
|
241
|
+
Args:
|
|
242
|
+
input_path (str): Path to a local Python file or directory, a local or
|
|
243
|
+
remote ``.tar.gz`` archive, or the name of a package available on
|
|
244
|
+
PyPI.
|
|
207
245
|
filename (str, optional): Name (and optional path) of the HTML file to
|
|
208
246
|
write the scan report to. The filename should use the ``.html``
|
|
209
247
|
extension. Defaults to ``DEFAULT_OUTPUT_FILE``.
|
|
210
248
|
nosec (bool, optional): Whether to filter out issues marked as reviewed
|
|
211
|
-
or ignored in the source code. Defaults to ``False``, no
|
|
249
|
+
or ignored in the source code. Defaults to ``False``, meaning no
|
|
250
|
+
filtering is applied.
|
|
212
251
|
|
|
213
252
|
Returns:
|
|
214
253
|
None: The function writes a static HTML security report to disk.
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
# Command `codeaudit overview`
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
Use this command to generate a quick security-relevant assessment of a Python project or package. It provides an overview of important security and code-complexity metrics for the project.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## Usage
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
codeaudit overview <package-path|package-name> [report-name.html]
|
|
9
|
+
```bash
|
|
10
|
+
codeaudit overview <package-path|package-name|package.tar.gz> [report-name.html]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Arguments
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
* `<package-path|package-name|package.tar.gz>` (Required)
|
|
16
|
+
|
|
17
|
+
Specify one of the following:
|
|
18
|
+
|
|
19
|
+
* A local directory containing Python files.
|
|
20
|
+
* The name of a Python package hosted on PyPI.org.
|
|
21
|
+
* A local `.tar.gz` source archive.
|
|
22
|
+
* A remote `.tar.gz` source archive URL (only HTTPS allowed!).
|
|
16
23
|
|
|
17
24
|
* `[report-name.html]` (Optional)
|
|
18
|
-
The filename for the generated security report. If omitted, the tool will use a default filename. If you provide a custom name, ensure it ends with the `.html` extension.
|
|
19
25
|
|
|
26
|
+
The filename for the generated overview report. If omitted, the tool will use a default filename. If you provide a custom name, ensure it ends with the `.html` extension.
|
|
20
27
|
|
|
21
28
|
|
|
22
29
|
For every Python file the following **security** relevant statistics are determined:
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"id": "98422d63-ec29-49b2-bb4c-3912288cb584",
|
|
116
116
|
"metadata": {},
|
|
117
117
|
"source": [
|
|
118
|
-
"##
|
|
118
|
+
"## Security Assessment of Module Vulnerabilities\n",
|
|
119
119
|
"\n",
|
|
120
120
|
"This API retrieves security vulnerability data for external modules via the [OSV (Open Source Vulnerability) Database](https://nocomplexity.com/documents/securityarchitecture/references/vulnerabilitydatabases.html#vulnerability-databases).\n",
|
|
121
121
|
"\n",
|
|
@@ -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.
|
|
777
|
+
</table><br><p>Number of implemented security validations:<b>89</b></p><p>Version of codeaudit: <b>1.9.0</b><p>Because Python and cybersecurity are constantly changing, issue reports <b>SHOULD</b> specify the codeaudit version used.</p><p><b>Disclaimer:</b> <i>This SAST tool <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> provides a powerful, automatic security analysis for Python source code. However, it's not a substitute for human review in combination with business knowledge. Undetected vulnerabilities may still exist.</i></p><p>This Python security report was created on: <b>2026-08-23 12:20</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.9.0</b></p><hr><footer><div class="footer-links">Check the <a href="https://nocomplexity.com/documents/codeaudit/intro.html" target="_blank">documentation</a> for help on found issues.<br>Codeaudit is made with <span class="heart">❤</span> by cyber security professionals who advocate for <a href="https://nocomplexity.com/simplify-security/" target="_blank">open simple security solutions</a>.<br><a href="https://nocomplexity.com/documents/codeaudit/CONTRIBUTE.html" target="_blank">Join the community</a> and contribute to make this tool better!</div></footer></div></body></html>
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
# Command `codeaudit filescan`
|
|
2
2
|
|
|
3
|
-
The **Python Code Audit** `filescan` command efficiently scans Python files or
|
|
4
|
-
1. Identify and report potential security weaknesses and
|
|
5
|
-
2. [Detect Data Exfiltration](data_exfiltration_detection)
|
|
3
|
+
The **Python Code Audit** `filescan` command efficiently scans Python files, directories, or source packages to:
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
1. Identify and report potential security weaknesses.
|
|
6
|
+
2. [Detect Data Exfiltration](data_exfiltration_detection.md).
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
The tool generates a report detailing discovered security issues and flagging any **External Egress Risks** identified within the Python code.
|
|
10
9
|
|
|
10
|
+
See the section on [validations](checksinformation.md) for an overview of all implemented security checks.
|
|
11
11
|
|
|
12
|
-
To use the `
|
|
12
|
+
To use the `filescan` feature, run the following command in the console:
|
|
13
13
|
|
|
14
|
+
```text
|
|
15
|
+
codeaudit filescan <pythonfile|package-name|directory|package.tar.gz> [OUTPUTFILE]
|
|
14
16
|
```
|
|
15
|
-
codeaudit filescan <pythonfile|package-name|directory> [OUTPUTFILE]
|
|
16
|
-
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The `<package.tar.gz>` input can be either a **local** `.tar.gz` source archive or a **remote** `.tar.gz` archive URL.
|
|
19
|
+
|
|
20
|
+
**Python Code Audit** will create a detailed security scan report for any of the following:
|
|
19
21
|
|
|
22
|
+
* A single local Python file.
|
|
23
|
+
* A local directory containing Python source code.
|
|
24
|
+
* A package hosted on [PyPI.org](http://PyPI.org).
|
|
25
|
+
* A local `.tar.gz` source package.
|
|
26
|
+
* A remote `.tar.gz` source package.
|
|
20
27
|
|
|
21
|
-
So the input for `codeaudit filescan` can be:
|
|
22
|
-
* A single Python file;
|
|
23
|
-
* A package on PyPI.org: Python Code Audit checks this package on security weakness, so cloning the sources local is not needed!
|
|
24
|
-
* A local directory with Python files, e.g. a local package development environment or a cloned package.
|
|
25
28
|
|
|
26
29
|
If you do not specify [OUTPUTFILE], a HTML output file, a HTML report file is created in the current directory and will be named codeaudit-report.html.
|
|
27
30
|
|
|
@@ -12,7 +12,11 @@ Launch web-based version
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
:::{note}
|
|
15
|
-
The browser-based version runs 100% locally
|
|
15
|
+
The browser-based version runs 100% locally in your browser.
|
|
16
|
+
No data is ever sent to a server. No analytics. No telemetry.
|
|
17
|
+
|
|
18
|
+
Please note that not all functionality is available. You can perform a security scan on packages available from PyPI.
|
|
19
|
+
|
|
16
20
|
:::
|
|
17
21
|
|
|
18
22
|
## Install for full functionality
|
|
@@ -10,6 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
**Python Code Audit** is a Static Application **Security** Testing (SAST) tool used to find **security weaknesses** in Python code.
|
|
12
12
|
|
|
13
|
+
::::{grid}
|
|
14
|
+
:gutter: 3
|
|
15
|
+
|
|
16
|
+
:::{grid-item-card}
|
|
17
|
+
{octicon}`rocket;4em;caption-text` **Launch Web version**
|
|
18
|
+
|
|
19
|
+
Audit Python packages instantly. No install required. Perfect for scanning PyPI packages before you use them. Runs entirely in your browser. Zero data sent to servers. No analytics. No telemetry. Ever.
|
|
20
|
+
|
|
21
|
+
+++
|
|
22
|
+
|
|
23
|
+
```{button-link} https://nocomplexity.com/codeauditapp/dashboardapp.html
|
|
24
|
+
:color: danger
|
|
25
|
+
:align: center
|
|
26
|
+
Launch
|
|
27
|
+
```
|
|
28
|
+
:::
|
|
29
|
+
::::
|
|
13
30
|
|
|
14
31
|
::::{grid} 2
|
|
15
32
|
:class-container: text-center
|
|
@@ -7,8 +7,8 @@ name = "codeaudit"
|
|
|
7
7
|
dynamic = ["version"] # This tells Hatch that version is dynamically determined
|
|
8
8
|
description = 'A modern Python security source code analyzer (SAST) based on distrust.'
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
dependencies = ["fire==0.7.1","pandas>=2.3","altair==6.0.0"]
|
|
11
|
-
requires-python = ">=3.
|
|
10
|
+
dependencies = ["fire==0.7.1","pandas>=2.3","altair==6.0.0","fileaudit"]
|
|
11
|
+
requires-python = ">=3.12"
|
|
12
12
|
license = "GPL-3.0-or-later"
|
|
13
13
|
keywords = ["SAST", "Python SAST", "SAST API", "Complexity Checker"]
|
|
14
14
|
authors = [
|
|
@@ -19,10 +19,9 @@ classifiers = [
|
|
|
19
19
|
"Intended Audience :: Developers",
|
|
20
20
|
"Intended Audience :: Science/Research",
|
|
21
21
|
"Topic :: Security",
|
|
22
|
-
"Topic :: Software Development :: Quality Assurance",
|
|
23
|
-
"Development Status ::
|
|
24
|
-
"Programming Language :: Python",
|
|
25
|
-
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
23
|
+
"Development Status :: 5 - Production/Stable",
|
|
24
|
+
"Programming Language :: Python",
|
|
26
25
|
"Programming Language :: Python :: 3.12",
|
|
27
26
|
"Programming Language :: Python :: 3.13",
|
|
28
27
|
"Programming Language :: Python :: 3.14",
|
|
@@ -58,7 +57,7 @@ extra-dependencies = [
|
|
|
58
57
|
check = "mypy --install-types --non-interactive {args:src/codeaudit tests}"
|
|
59
58
|
|
|
60
59
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
61
|
-
python = ["3.14", "3.13", "3.12"
|
|
60
|
+
python = ["3.14", "3.13", "3.12"]
|
|
62
61
|
|
|
63
62
|
[tool.hatch.envs.hatch-test]
|
|
64
63
|
randomize = true
|
|
@@ -12,7 +12,12 @@ You should have received a copy of the GNU General Public License along with thi
|
|
|
12
12
|
Function to create nice APIs. So API helper functions.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
from codeaudit.api_interfaces import
|
|
15
|
+
from codeaudit.api_interfaces import (
|
|
16
|
+
get_modules,
|
|
17
|
+
get_overview,
|
|
18
|
+
_build_weakness_details,
|
|
19
|
+
package_imports,
|
|
20
|
+
)
|
|
16
21
|
from codeaudit.checkmodules import get_all_modules
|
|
17
22
|
from codeaudit.filehelpfunctions import (
|
|
18
23
|
collect_python_source_files,
|
|
@@ -77,6 +82,7 @@ def _codeaudit_directory_scan_wasm(input_path, nosec_flag):
|
|
|
77
82
|
"statistics_overview": package_overview,
|
|
78
83
|
"module_overview": modules_discovered,
|
|
79
84
|
}
|
|
85
|
+
|
|
80
86
|
# File scanning
|
|
81
87
|
for i, file in enumerate(files_to_check):
|
|
82
88
|
try:
|