codeaudit 1.8.1__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.1 → codeaudit-1.9.0}/CHANGELOG.md +20 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/PKG-INFO +3 -3
- {codeaudit-1.8.1 → codeaudit-1.9.0}/SECURITY.md +1 -1
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/cimode.md +7 -7
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/codeauditcommands.md +83 -44
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/codeauditoverview.md +15 -8
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/codeauditchecks.html +1 -1
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/demoscan.json +2 -2
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/filescan.md +16 -13
- {codeaudit-1.8.1 → codeaudit-1.9.0}/pyproject.toml +4 -5
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/api_interfaces.py +41 -6
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/filehelpfunctions.py +1 -1
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/pypi_package_scan.py +71 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/reporting.py +116 -55
- codeaudit-1.9.0/tests/test_filescan_api.py +130 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_hashstrenght.py +3 -0
- {codeaudit-1.8.1 → 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.1/.github/workflows/python-test.yml +0 -24
- {codeaudit-1.8.1 → codeaudit-1.9.0}/.gitignore +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/CONTRIBUTE.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/LICENSE.txt +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/README.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/.gitignore +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/class_index.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/function_index.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/index.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/status.json +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/_config.yml +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/_toc.yml +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/about.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/architecture.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/changelog.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/input_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/random_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/checksinformation.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/complexitycheck.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/demofile.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/filescan.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/examples/overview.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/features.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/filescan.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/handling_errors.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/help.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/howtoscan.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/OO.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/ai_use.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/installation.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/intro.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/issues.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/license.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/makeitbetter.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/markingissues.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/modulescan.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/overviewplot.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/pca_overview.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/project_philosophy.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/sponsors.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/userguide.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/warnings.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/whatissast.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/docs/whysast.md +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/filescan.png +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/altairplots.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/api_reporting.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/corecli.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/dashboard_reports.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/dashboardapp.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_171.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_171.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version162.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version162.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version166.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/dashboardapp_version166.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp_171.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp_171.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp_180.html +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/pyodide/deployed/dashboardapp_180.js +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/__init__.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_apicalls.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_base64.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_chmod.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_edgecases.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_ftp.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_oschecks.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_random.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_subprocess.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_suppression.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/test_zstd.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/unit_tests/test_clean_import_list.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/unit_tests/test_count_weaknesses.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.8.1 → codeaudit-1.9.0}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.8.1 → 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,25 @@
|
|
|
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
|
+
|
|
3
23
|
## Version 1.8.1:
|
|
4
24
|
|
|
5
25
|
**Added**
|
|
@@ -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
|
|
@@ -15,14 +15,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:
|
|
@@ -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
|
|
|
@@ -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 = [
|
|
@@ -21,8 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Topic :: Security",
|
|
22
22
|
"Topic :: Software Development :: Quality Assurance",
|
|
23
23
|
"Development Status :: 5 - Production/Stable",
|
|
24
|
-
"Programming Language :: Python",
|
|
25
|
-
"Programming Language :: Python :: 3.11",
|
|
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
|
|
@@ -41,7 +41,14 @@ from codeaudit.filehelpfunctions import (
|
|
|
41
41
|
is_ast_parsable,
|
|
42
42
|
)
|
|
43
43
|
from codeaudit.privacy_lint import data_egress_scan
|
|
44
|
-
from codeaudit.pypi_package_scan import
|
|
44
|
+
from codeaudit.pypi_package_scan import (
|
|
45
|
+
get_package_source,
|
|
46
|
+
get_pypi_download_info,
|
|
47
|
+
get_latest_release_date,
|
|
48
|
+
days_since_update,
|
|
49
|
+
is_valid_tar_gz,
|
|
50
|
+
get_targz_package_source,
|
|
51
|
+
)
|
|
45
52
|
from codeaudit.security_checks import ast_security_checks, perform_validations
|
|
46
53
|
from codeaudit.suppression import filter_sast_results
|
|
47
54
|
from codeaudit.totals import (
|
|
@@ -51,6 +58,8 @@ from codeaudit.totals import (
|
|
|
51
58
|
total_modules,
|
|
52
59
|
)
|
|
53
60
|
|
|
61
|
+
SCAN_ERROR = "Invalid input: not a *.py file or directory with Python files, invalid/missing .tar.gz on given location, or package not found on PyPI."
|
|
62
|
+
|
|
54
63
|
|
|
55
64
|
def version():
|
|
56
65
|
"""Returns the version of Python Code Audit - WASM safe"""
|
|
@@ -70,6 +79,7 @@ def filescan(input_path, nosec=False):
|
|
|
70
79
|
directory.
|
|
71
80
|
- **Single Python file**: Scans the file if it exists and can be parsed
|
|
72
81
|
into an AST.
|
|
82
|
+
- **Local or remote** `tar.gz` archive, e.g. on a remote repository, E.g. to scan apps are on not (yet)PyPI
|
|
73
83
|
- **PyPI package** on PyPI.org: Downloads the
|
|
74
84
|
source distribution from PyPI, scans it, and cleans up temporary files.
|
|
75
85
|
|
|
@@ -84,7 +94,7 @@ def filescan(input_path, nosec=False):
|
|
|
84
94
|
- `/docs`
|
|
85
95
|
- `/docker`
|
|
86
96
|
- `/dist`
|
|
87
|
-
- `/
|
|
97
|
+
- `/test[s]`
|
|
88
98
|
- all directories that start with . (dot) or _ (underscore)
|
|
89
99
|
|
|
90
100
|
But you can easily change this if needed!
|
|
@@ -143,15 +153,41 @@ def filescan(input_path, nosec=False):
|
|
|
143
153
|
) # there is only 1 file , so index 0 equals as for package to make functionality that use the output that works on the dict or json can equal for a package or a single file!
|
|
144
154
|
output |= {"file_security_info": file_output}
|
|
145
155
|
return output
|
|
156
|
+
elif is_valid_tar_gz(input_path):
|
|
157
|
+
src_dir, tmp_handle = get_targz_package_source(input_path)
|
|
158
|
+
try:
|
|
159
|
+
package_name = get_filename_from_path(input_path)
|
|
160
|
+
output |= {"package_name": package_name}
|
|
161
|
+
scan_output = _codeaudit_directory_scan(src_dir, nosec_flag=nosec)
|
|
162
|
+
output |= scan_output
|
|
163
|
+
# Replace the value of "imported_modules" in the nested dict
|
|
164
|
+
correct_imported_modules = package_imports(output)
|
|
165
|
+
output["module_overview"]["imported_modules"] = correct_imported_modules
|
|
166
|
+
# correct statistics for modules count in a package
|
|
167
|
+
output["statistics_overview"]["External Modules"] = len(
|
|
168
|
+
correct_imported_modules
|
|
169
|
+
)
|
|
170
|
+
finally:
|
|
171
|
+
# Cleaning up temp directory
|
|
172
|
+
tmp_handle.cleanup() # deletes everything from temp directory
|
|
173
|
+
return output
|
|
174
|
+
|
|
146
175
|
elif pypi_data := get_pypi_download_info(input_path):
|
|
147
176
|
package_name = (
|
|
148
177
|
input_path # The variable input_path is now equal to the package name
|
|
149
178
|
)
|
|
150
179
|
url = pypi_data["download_url"]
|
|
151
180
|
release = pypi_data["release"]
|
|
181
|
+
update_date = get_latest_release_date(package_name)
|
|
182
|
+
days_since_last_update = days_since_update(update_date)
|
|
152
183
|
if url is not None:
|
|
153
184
|
src_dir, tmp_handle = get_package_source(url)
|
|
154
|
-
output |= {
|
|
185
|
+
output |= {
|
|
186
|
+
"package_name": package_name,
|
|
187
|
+
"package_release": release,
|
|
188
|
+
"update_date": update_date.isoformat(),
|
|
189
|
+
"days_since_last_update": days_since_last_update,
|
|
190
|
+
}
|
|
155
191
|
try:
|
|
156
192
|
scan_output = _codeaudit_directory_scan(src_dir, nosec_flag=nosec)
|
|
157
193
|
output |= scan_output
|
|
@@ -166,11 +202,10 @@ def filescan(input_path, nosec=False):
|
|
|
166
202
|
# Cleaning up temp directory
|
|
167
203
|
tmp_handle.cleanup() # deletes everything from temp directory
|
|
168
204
|
return output
|
|
205
|
+
|
|
169
206
|
else:
|
|
170
207
|
# Its not a directory nor a valid Python file:
|
|
171
|
-
return {
|
|
172
|
-
"Error": "File is not a *.py file, does not exist or is not a valid directory path towards a Python package."
|
|
173
|
-
}
|
|
208
|
+
return {"Error": SCAN_ERROR}
|
|
174
209
|
|
|
175
210
|
|
|
176
211
|
def _codeaudit_scan(filename, nosec_flag):
|