codeaudit 1.9.4__tar.gz → 1.9.6__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.6/.github/workflows/publish-release.yml +57 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/CHANGELOG.md +22 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/PKG-INFO +2 -2
- {codeaudit-1.9.4 → codeaudit-1.9.6}/README.md +1 -1
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/_toc.yml +1 -0
- codeaudit-1.9.6/docs/checks/ctypes_check.md +33 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/codeauditcommands.md +1 -1
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/codeauditchecks.html +84 -48
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/demoscan.json +2 -2
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/intro.md +1 -1
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/data/sastchecks.csv +6 -0
- codeaudit-1.9.6/tests/benchmarkfiles/validpython/ctypes_example.py +119 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_benchmark.py +47 -46
- codeaudit-1.9.6/tests/test_ctypes_detection.py +54 -0
- codeaudit-1.9.6/tests/validationfiles/ctypes_example.py +119 -0
- codeaudit-1.9.6/tests/validationfiles/ctypes_example2.py +12 -0
- codeaudit-1.9.4/cov_html/.gitignore +0 -2
- codeaudit-1.9.4/cov_html/class_index.html +0 -321
- codeaudit-1.9.4/cov_html/coverage_html_cb_dd2e7eb5.js +0 -735
- codeaudit-1.9.4/cov_html/favicon_32_cb_c827f16f.png +0 -0
- codeaudit-1.9.4/cov_html/function_index.html +0 -1571
- codeaudit-1.9.4/cov_html/index.html +0 -288
- codeaudit-1.9.4/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- codeaudit-1.9.4/cov_html/status.json +0 -1
- codeaudit-1.9.4/cov_html/style_cb_9ff733b0.css +0 -389
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -101
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -101
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -1098
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -382
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -704
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -141
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -250
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -436
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -200
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -217
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -510
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -233
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -195
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -239
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -454
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -211
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -1103
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -155
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -335
- codeaudit-1.9.4/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -278
- {codeaudit-1.9.4 → codeaudit-1.9.6}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/.github/workflows/sast_validation.yml +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/.gitignore +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/LICENSE.txt +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/SECURITY.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/_config.yml +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/about.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/architecture.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/benchmarksuite.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/changelog.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/input_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/random_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/checksinformation.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/cimode.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/complexitycheck.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/demofile.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/filescan.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/examples/overview.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/features.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/filescan.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/filescan.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/handling_errors.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/help.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/howtoscan.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/OO.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/ai_use.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/installation.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/issues.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/license.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/makeitbetter.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/markingissues.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/modulescan.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/overviewplot.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/pca_overview.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/project_philosophy.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/sponsors.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/userguide.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/warnings.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/whatissast.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/docs/whysast.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/filescan.png +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/pyproject.toml +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/altairplots.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/api_interfaces.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/api_reporting.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/benchmark_helpfunctions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/corecli.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/dashboard_reports.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/filehelpfunctions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/pypi_package_scan.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/reporting.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/dashboard/dashboardapp.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/__init__.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/README.md +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/invalidpython/ddos_blockingCPython_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/assert.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/assert_check.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/base64.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/binding.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/bz2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/compile.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/ddos_blockingCPython_example2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/ddos_blockingCPython_example3.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/eval_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/exceptionhandling.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/exec_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/fileoperations.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/filepermissions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/forkbomb_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/ftp.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/getattr_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/homoglyphs_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/httpserver.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/import_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/input_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/log4shell_pattern.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/logging.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/lzma_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/lzma_open.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/marshal.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/multiprocessing.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/obfuscation_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/obfuscation_example2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/obfuscation_example3.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/os_examples.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/os_execution.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/os_pseudo_fork.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/osforking.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/pickle_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/random.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/sha_examples.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/shelve.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/shutil_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/subprocess.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/syscalls.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/tarfile_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/tempfile_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/vulnerable_parse.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/xmlrpc.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/zipfile_example.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/zipfile_example2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/benchmarkfiles/validpython/zstd.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_apicalls.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_base64.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_chmod.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_edgecases.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_filescan_api.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_ftp.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_oschecks.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_random.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_subprocess.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_suppression.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_valid_python.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/test_zstd.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_clean_import_list.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_count_weaknesses.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_filehelpfunctions.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_get_weakness_counts.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/unit_tests/test_weakness_count_per_file.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/incorrect_python_file.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/linkaudit-0.9.9.tar.gz +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/zip_example.json +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.9.4 → codeaudit-1.9.6}/tests/validationfiles/zstd.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to PyPI
|
|
2
|
+
|
|
3
|
+
# only publish to PyPI on tag pushes
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- '*' # or 'v*' if you use version tags
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build distribution 📦
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.x"
|
|
23
|
+
- name: Install pypa/build
|
|
24
|
+
run: >-
|
|
25
|
+
python3 -m
|
|
26
|
+
pip install
|
|
27
|
+
build
|
|
28
|
+
--user
|
|
29
|
+
- name: Build a wheel and a source distribution
|
|
30
|
+
run: python3 -m build
|
|
31
|
+
- name: Store the distribution packages
|
|
32
|
+
uses: actions/upload-artifact@v5
|
|
33
|
+
with:
|
|
34
|
+
name: python-package-distributions
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
publish-to-pypi:
|
|
38
|
+
name: >-
|
|
39
|
+
Publish Python 🐍 distribution 📦 to PyPI
|
|
40
|
+
|
|
41
|
+
needs:
|
|
42
|
+
- build
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
environment:
|
|
45
|
+
name: pypi
|
|
46
|
+
url: https://pypi.org/p/codeaudit
|
|
47
|
+
permissions:
|
|
48
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
- name: Download all the dists
|
|
52
|
+
uses: actions/download-artifact@v6
|
|
53
|
+
with:
|
|
54
|
+
name: python-package-distributions
|
|
55
|
+
path: dist/
|
|
56
|
+
- name: Publish distribution 📦 to PyPI
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.9.6:
|
|
4
|
+
|
|
5
|
+
**Fixed**
|
|
6
|
+
- Corrected Github publsih action for attestation
|
|
7
|
+
|
|
8
|
+
## Version 1.9.5:
|
|
9
|
+
|
|
10
|
+
**Added**
|
|
11
|
+
|
|
12
|
+
* Added check and associated test for discovering Python `ctypes` library loading.
|
|
13
|
+
* Configured GitHub Action for [PyPI.org](https://pypi.org/project/codeaudit/#security) attestation.
|
|
14
|
+
|
|
15
|
+
**Changed**
|
|
16
|
+
|
|
17
|
+
* Updated the benchmark suite with a `ctypes` example.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
**Documentation**
|
|
21
|
+
|
|
22
|
+
* Updated documentation with information regarding the Python `ctypes` library loading check.
|
|
23
|
+
|
|
24
|
+
|
|
3
25
|
## Version 1.9.4:
|
|
4
26
|
|
|
5
27
|
**Added**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.6
|
|
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
|
|
@@ -139,7 +139,7 @@ Use the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to
|
|
|
139
139
|
|
|
140
140
|
## Example
|
|
141
141
|
|
|
142
|
-
By running the `codeaudit filescan` command, detailed security information is determined for a Python file based on more than **
|
|
142
|
+
By running the `codeaudit filescan` command, detailed security information is determined for a Python file based on more than **95 validations** implemented.
|
|
143
143
|
|
|
144
144
|
The `codeaudit filescan` command shows all **potential** security issues that are detected in the source file in a HTML-report.
|
|
145
145
|
|
|
@@ -103,7 +103,7 @@ Use the Python Code Audit documentation (https://codeaudit.nocomplexity.com) to
|
|
|
103
103
|
|
|
104
104
|
## Example
|
|
105
105
|
|
|
106
|
-
By running the `codeaudit filescan` command, detailed security information is determined for a Python file based on more than **
|
|
106
|
+
By running the `codeaudit filescan` command, detailed security information is determined for a Python file based on more than **95 validations** implemented.
|
|
107
107
|
|
|
108
108
|
The `codeaudit filescan` command shows all **potential** security issues that are detected in the source file in a HTML-report.
|
|
109
109
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Ctypes Statement
|
|
2
|
+
|
|
3
|
+
`ctypes` is a foreign function library for Python. It provides C compatible data types, and allows calling functions in DLLs or shared libraries.
|
|
4
|
+
|
|
5
|
+
Python Code Audit checks on the use of:
|
|
6
|
+
- `ctypes.CDLL`
|
|
7
|
+
- `ctypes.WinDLL`
|
|
8
|
+
- `ctypes.OleDLL`
|
|
9
|
+
- `ctypes.windll.LoadLibrary`
|
|
10
|
+
- `ctypes.cdll.LoadLibrary`
|
|
11
|
+
- `ctypes.oledll.LoadLibrary`
|
|
12
|
+
|
|
13
|
+
:::{warning}
|
|
14
|
+
ctypes provides low-level access to native libraries and the process’s memory,**bypassing Python’s safety mechanisms and allowing execution of arbitrary native code.** Incorrect use can corrupt data and objects, reveal sensitive information, cause crashes, or otherwise compromise the running process.
|
|
15
|
+
:::
|
|
16
|
+
|
|
17
|
+
## Preventive measures
|
|
18
|
+
|
|
19
|
+
1. Never load libraries from untrusted or user-controlled input
|
|
20
|
+
2. Use `ctypes.util.find_library()` + explicit validation
|
|
21
|
+
3. Use absolute paths from a trusted location only
|
|
22
|
+
4. Apply the principle of least privilege / sandboxing
|
|
23
|
+
5. Validate and lock library integrity. From a secure supply chain perspective the loaded library must be checked using a good reproducible build approach.
|
|
24
|
+
6. Prefer safer alternatives when possible. So avoid using Python code that loads libraries that are hard to inspect upfront!
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### More information
|
|
28
|
+
|
|
29
|
+
* [ctypes — A foreign function library for Python](https://docs.python.org/3/library/ctypes.html#module-ctypes)
|
|
30
|
+
* [Technical Malware Analysis Report: Python-based RAT Malware](https://www.cyfirma.com/research/technical-malware-analysis-report-python-based-rat-malware/)
|
|
31
|
+
* [Analysis of APT37 NarwhalRAT Leveraging MS-Themed Phishing and Dead-drop C2](https://www.genians.co.kr/en/blog/threat_intelligence/narwhalrat)
|
|
32
|
+
* [CVE-2026-102734](https://nvd.nist.gov/vuln/detail/cve-2026-102734)
|
|
33
|
+
* [CVE-2026-37008: CrewAI Python Sandbox Bypass RCE Vulnerability](https://www.sentinelone.com/vulnerability-database/cve-2026-37008/?utm_source=https%3A%2F%2Fwww.google.com%2F&utm_medium=organic-search)
|
|
@@ -289,46 +289,82 @@ footer {
|
|
|
289
289
|
</tr>
|
|
290
290
|
<tr>
|
|
291
291
|
<td>Cryptographically Unsafe Randomness</td>
|
|
292
|
-
<td>random.
|
|
292
|
+
<td>random.random</td>
|
|
293
293
|
<td>Low</td>
|
|
294
294
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
295
295
|
</tr>
|
|
296
296
|
<tr>
|
|
297
297
|
<td>Cryptographically Unsafe Randomness</td>
|
|
298
|
-
<td>random.
|
|
298
|
+
<td>random.Random</td>
|
|
299
299
|
<td>Low</td>
|
|
300
300
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
301
301
|
</tr>
|
|
302
302
|
<tr>
|
|
303
303
|
<td>Cryptographically Unsafe Randomness</td>
|
|
304
|
-
<td>random.
|
|
304
|
+
<td>random.randrange</td>
|
|
305
305
|
<td>Low</td>
|
|
306
306
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
307
307
|
</tr>
|
|
308
308
|
<tr>
|
|
309
309
|
<td>Cryptographically Unsafe Randomness</td>
|
|
310
|
-
<td>random.
|
|
310
|
+
<td>random.randint</td>
|
|
311
311
|
<td>Low</td>
|
|
312
312
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
313
313
|
</tr>
|
|
314
314
|
<tr>
|
|
315
315
|
<td>Cryptographically Unsafe Randomness</td>
|
|
316
|
-
<td>random.
|
|
316
|
+
<td>random.uniform</td>
|
|
317
317
|
<td>Low</td>
|
|
318
318
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
319
319
|
</tr>
|
|
320
320
|
<tr>
|
|
321
321
|
<td>Cryptographically Unsafe Randomness</td>
|
|
322
|
-
<td>random.
|
|
322
|
+
<td>random.triangular</td>
|
|
323
323
|
<td>Low</td>
|
|
324
324
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
325
325
|
</tr>
|
|
326
326
|
<tr>
|
|
327
327
|
<td>Cryptographically Unsafe Randomness</td>
|
|
328
|
-
<td>random.
|
|
328
|
+
<td>random.seed</td>
|
|
329
329
|
<td>Low</td>
|
|
330
330
|
<td>The pseudo-random generators in this module are not suitable for security purposes.</td>
|
|
331
331
|
</tr>
|
|
332
|
+
<tr>
|
|
333
|
+
<td>Ctypes library loading</td>
|
|
334
|
+
<td>ctypes.CDLL</td>
|
|
335
|
+
<td>High</td>
|
|
336
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
337
|
+
</tr>
|
|
338
|
+
<tr>
|
|
339
|
+
<td>Ctypes library loading</td>
|
|
340
|
+
<td>ctypes.WinDLL</td>
|
|
341
|
+
<td>High</td>
|
|
342
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
343
|
+
</tr>
|
|
344
|
+
<tr>
|
|
345
|
+
<td>Ctypes library loading</td>
|
|
346
|
+
<td>ctypes.windll<br>LoadLibrary</td>
|
|
347
|
+
<td>High</td>
|
|
348
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
349
|
+
</tr>
|
|
350
|
+
<tr>
|
|
351
|
+
<td>Ctypes library loading</td>
|
|
352
|
+
<td>ctypes.cdll<br>LoadLibrary</td>
|
|
353
|
+
<td>High</td>
|
|
354
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
355
|
+
</tr>
|
|
356
|
+
<tr>
|
|
357
|
+
<td>Ctypes library loading</td>
|
|
358
|
+
<td>ctypes.oledll<br>LoadLibrary</td>
|
|
359
|
+
<td>High</td>
|
|
360
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
361
|
+
</tr>
|
|
362
|
+
<tr>
|
|
363
|
+
<td>Ctypes library loading</td>
|
|
364
|
+
<td>ctypes.OleDLL</td>
|
|
365
|
+
<td>High</td>
|
|
366
|
+
<td>Enables arbitrary native code execution, direct memory access and can bypass sandboxing.</td>
|
|
367
|
+
</tr>
|
|
332
368
|
<tr>
|
|
333
369
|
<td>Dangerous Built-in: compile</td>
|
|
334
370
|
<td>compile</td>
|
|
@@ -349,55 +385,55 @@ footer {
|
|
|
349
385
|
</tr>
|
|
350
386
|
<tr>
|
|
351
387
|
<td>Directory Creation</td>
|
|
352
|
-
<td>os.
|
|
388
|
+
<td>os.makedev</td>
|
|
353
389
|
<td>Low</td>
|
|
354
390
|
<td>Direct file system calls require careful input validation to prevent vulnerabilities.</td>
|
|
355
391
|
</tr>
|
|
356
392
|
<tr>
|
|
357
393
|
<td>Directory Creation</td>
|
|
358
|
-
<td>os.
|
|
394
|
+
<td>os.mknod</td>
|
|
359
395
|
<td>Low</td>
|
|
360
396
|
<td>Direct file system calls require careful input validation to prevent vulnerabilities.</td>
|
|
361
397
|
</tr>
|
|
362
398
|
<tr>
|
|
363
399
|
<td>Directory Creation</td>
|
|
364
|
-
<td>os.
|
|
400
|
+
<td>os.mkfifo</td>
|
|
365
401
|
<td>Low</td>
|
|
366
402
|
<td>Direct file system calls require careful input validation to prevent vulnerabilities.</td>
|
|
367
403
|
</tr>
|
|
368
404
|
<tr>
|
|
369
405
|
<td>Directory Creation</td>
|
|
370
|
-
<td>os.
|
|
406
|
+
<td>os.mkdir</td>
|
|
371
407
|
<td>Low</td>
|
|
372
408
|
<td>Direct file system calls require careful input validation to prevent vulnerabilities.</td>
|
|
373
409
|
</tr>
|
|
374
410
|
<tr>
|
|
375
411
|
<td>Directory Creation</td>
|
|
376
|
-
<td>os.
|
|
412
|
+
<td>os.makedirs</td>
|
|
377
413
|
<td>Low</td>
|
|
378
414
|
<td>Direct file system calls require careful input validation to prevent vulnerabilities.</td>
|
|
379
415
|
</tr>
|
|
380
416
|
<tr>
|
|
381
417
|
<td>Dynamic Imports</td>
|
|
382
|
-
<td>
|
|
418
|
+
<td>__import__</td>
|
|
383
419
|
<td>Medium</td>
|
|
384
420
|
<td>Importing modules dynamically can load untrusted code.</td>
|
|
385
421
|
</tr>
|
|
386
422
|
<tr>
|
|
387
423
|
<td>Dynamic Imports</td>
|
|
388
|
-
<td>
|
|
424
|
+
<td>importlib.import_module</td>
|
|
389
425
|
<td>Medium</td>
|
|
390
426
|
<td>Importing modules dynamically can load untrusted code.</td>
|
|
391
427
|
</tr>
|
|
392
428
|
<tr>
|
|
393
429
|
<td>Dynamic Imports</td>
|
|
394
|
-
<td>importlib.util<br>
|
|
430
|
+
<td>importlib.util<br>spec_from_file_location</td>
|
|
395
431
|
<td>Low</td>
|
|
396
432
|
<td>Can bypass the normal import mechanism and can execute arbitrary Python files.</td>
|
|
397
433
|
</tr>
|
|
398
434
|
<tr>
|
|
399
435
|
<td>Dynamic Imports</td>
|
|
400
|
-
<td>importlib.util<br>
|
|
436
|
+
<td>importlib.util<br>module_from_spec</td>
|
|
401
437
|
<td>Low</td>
|
|
402
438
|
<td>Can bypass the normal import mechanism and can execute arbitrary Python files.</td>
|
|
403
439
|
</tr>
|
|
@@ -487,61 +523,61 @@ footer {
|
|
|
487
523
|
</tr>
|
|
488
524
|
<tr>
|
|
489
525
|
<td>OS Execution</td>
|
|
490
|
-
<td>os.
|
|
526
|
+
<td>os.execle</td>
|
|
491
527
|
<td>High</td>
|
|
492
528
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
493
529
|
</tr>
|
|
494
530
|
<tr>
|
|
495
531
|
<td>OS Execution</td>
|
|
496
|
-
<td>os.
|
|
532
|
+
<td>os.execlp</td>
|
|
497
533
|
<td>High</td>
|
|
498
534
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
499
535
|
</tr>
|
|
500
536
|
<tr>
|
|
501
537
|
<td>OS Execution</td>
|
|
502
|
-
<td>os.
|
|
538
|
+
<td>os.popen</td>
|
|
503
539
|
<td>High</td>
|
|
504
540
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
505
541
|
</tr>
|
|
506
542
|
<tr>
|
|
507
543
|
<td>OS Execution</td>
|
|
508
|
-
<td>os.
|
|
544
|
+
<td>os.execvpe</td>
|
|
509
545
|
<td>High</td>
|
|
510
546
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
511
547
|
</tr>
|
|
512
548
|
<tr>
|
|
513
549
|
<td>OS Execution</td>
|
|
514
|
-
<td>os.
|
|
550
|
+
<td>os.execvp</td>
|
|
515
551
|
<td>High</td>
|
|
516
552
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
517
553
|
</tr>
|
|
518
554
|
<tr>
|
|
519
555
|
<td>OS Execution</td>
|
|
520
|
-
<td>os.
|
|
556
|
+
<td>os.execve</td>
|
|
521
557
|
<td>High</td>
|
|
522
558
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
523
559
|
</tr>
|
|
524
560
|
<tr>
|
|
525
561
|
<td>OS Execution</td>
|
|
526
|
-
<td>os.
|
|
562
|
+
<td>os.execv</td>
|
|
527
563
|
<td>High</td>
|
|
528
564
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
529
565
|
</tr>
|
|
530
566
|
<tr>
|
|
531
567
|
<td>OS Execution</td>
|
|
532
|
-
<td>os.
|
|
568
|
+
<td>os.execlpe</td>
|
|
533
569
|
<td>High</td>
|
|
534
570
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
535
571
|
</tr>
|
|
536
572
|
<tr>
|
|
537
573
|
<td>OS Execution</td>
|
|
538
|
-
<td>os.
|
|
574
|
+
<td>os.system</td>
|
|
539
575
|
<td>High</td>
|
|
540
576
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
541
577
|
</tr>
|
|
542
578
|
<tr>
|
|
543
579
|
<td>OS Execution</td>
|
|
544
|
-
<td>os.
|
|
580
|
+
<td>os.execl</td>
|
|
545
581
|
<td>High</td>
|
|
546
582
|
<td>Direct OS function calls can have significant security implications and require careful review.</td>
|
|
547
583
|
</tr>
|
|
@@ -595,31 +631,31 @@ footer {
|
|
|
595
631
|
</tr>
|
|
596
632
|
<tr>
|
|
597
633
|
<td>Pickle Usage</td>
|
|
598
|
-
<td>pickle.
|
|
634
|
+
<td>pickle.load</td>
|
|
599
635
|
<td>High</td>
|
|
600
636
|
<td>Deserializing untrusted data with `pickle` can lead to arbitrary code execution.</td>
|
|
601
637
|
</tr>
|
|
602
638
|
<tr>
|
|
603
639
|
<td>Pickle Usage</td>
|
|
604
|
-
<td>pickle.
|
|
640
|
+
<td>pickle.Unpickler</td>
|
|
605
641
|
<td>High</td>
|
|
606
642
|
<td>Deserializing untrusted data with `pickle` can lead to arbitrary code execution.</td>
|
|
607
643
|
</tr>
|
|
608
644
|
<tr>
|
|
609
645
|
<td>Pickle Usage</td>
|
|
610
|
-
<td>pickle.
|
|
646
|
+
<td>pickle.loads</td>
|
|
611
647
|
<td>High</td>
|
|
612
648
|
<td>Deserializing untrusted data with `pickle` can lead to arbitrary code execution.</td>
|
|
613
649
|
</tr>
|
|
614
650
|
<tr>
|
|
615
651
|
<td>Shelve Usage</td>
|
|
616
|
-
<td>shelve.
|
|
652
|
+
<td>shelve.open</td>
|
|
617
653
|
<td>High</td>
|
|
618
654
|
<td>The `shelve` module uses `pickle` internally, making it unsafe for untrusted data.</td>
|
|
619
655
|
</tr>
|
|
620
656
|
<tr>
|
|
621
657
|
<td>Shelve Usage</td>
|
|
622
|
-
<td>shelve.
|
|
658
|
+
<td>shelve.DbfilenameShelf</td>
|
|
623
659
|
<td>High</td>
|
|
624
660
|
<td>The `shelve` module uses `pickle` internally, making it unsafe for untrusted data.</td>
|
|
625
661
|
</tr>
|
|
@@ -631,13 +667,13 @@ footer {
|
|
|
631
667
|
</tr>
|
|
632
668
|
<tr>
|
|
633
669
|
<td>Shutil Copying</td>
|
|
634
|
-
<td>shutil.
|
|
670
|
+
<td>shutil.copy2</td>
|
|
635
671
|
<td>Medium</td>
|
|
636
672
|
<td>Files may be copied without authorization if paths are not validated.</td>
|
|
637
673
|
</tr>
|
|
638
674
|
<tr>
|
|
639
675
|
<td>Shutil Copying</td>
|
|
640
|
-
<td>shutil.
|
|
676
|
+
<td>shutil.copy</td>
|
|
641
677
|
<td>Medium</td>
|
|
642
678
|
<td>Files may be copied without authorization if paths are not validated.</td>
|
|
643
679
|
</tr>
|
|
@@ -661,13 +697,13 @@ footer {
|
|
|
661
697
|
</tr>
|
|
662
698
|
<tr>
|
|
663
699
|
<td>Subprocess Usage</td>
|
|
664
|
-
<td>subprocess.
|
|
665
|
-
<td>
|
|
700
|
+
<td>subprocess.call</td>
|
|
701
|
+
<td>High</td>
|
|
666
702
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
667
703
|
</tr>
|
|
668
704
|
<tr>
|
|
669
705
|
<td>Subprocess Usage</td>
|
|
670
|
-
<td>subprocess.
|
|
706
|
+
<td>subprocess.getoutput</td>
|
|
671
707
|
<td>Medium</td>
|
|
672
708
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
673
709
|
</tr>
|
|
@@ -679,37 +715,37 @@ footer {
|
|
|
679
715
|
</tr>
|
|
680
716
|
<tr>
|
|
681
717
|
<td>Subprocess Usage</td>
|
|
682
|
-
<td>subprocess.
|
|
718
|
+
<td>subprocess.check_output</td>
|
|
683
719
|
<td>Medium</td>
|
|
684
720
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
685
721
|
</tr>
|
|
686
722
|
<tr>
|
|
687
723
|
<td>Subprocess Usage</td>
|
|
688
|
-
<td>subprocess.
|
|
689
|
-
<td>
|
|
724
|
+
<td>subprocess.run</td>
|
|
725
|
+
<td>Medium</td>
|
|
690
726
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
691
727
|
</tr>
|
|
692
728
|
<tr>
|
|
693
729
|
<td>Subprocess Usage</td>
|
|
694
|
-
<td>subprocess.
|
|
695
|
-
<td>
|
|
730
|
+
<td>subprocess.Popen</td>
|
|
731
|
+
<td>Medium</td>
|
|
696
732
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
697
733
|
</tr>
|
|
698
734
|
<tr>
|
|
699
735
|
<td>Subprocess Usage</td>
|
|
700
|
-
<td>subprocess.
|
|
701
|
-
<td>
|
|
736
|
+
<td>subprocess.check_call</td>
|
|
737
|
+
<td>High</td>
|
|
702
738
|
<td>Requires careful input validation to prevent command injection vulnerabilities.</td>
|
|
703
739
|
</tr>
|
|
704
740
|
<tr>
|
|
705
741
|
<td>Sys Calls</td>
|
|
706
|
-
<td>sys.
|
|
742
|
+
<td>sys.settrace</td>
|
|
707
743
|
<td>Medium</td>
|
|
708
744
|
<td>Provides low-level access to interpreter execution; dangerous if exposed.</td>
|
|
709
745
|
</tr>
|
|
710
746
|
<tr>
|
|
711
747
|
<td>Sys Calls</td>
|
|
712
|
-
<td>sys.
|
|
748
|
+
<td>sys.setprofile</td>
|
|
713
749
|
<td>Medium</td>
|
|
714
750
|
<td>Provides low-level access to interpreter execution; dangerous if exposed.</td>
|
|
715
751
|
</tr>
|
|
@@ -763,15 +799,15 @@ footer {
|
|
|
763
799
|
</tr>
|
|
764
800
|
<tr>
|
|
765
801
|
<td>Zstandard (zstd) decompression</td>
|
|
766
|
-
<td>compression.zstd<br>
|
|
802
|
+
<td>compression.zstd<br>open</td>
|
|
767
803
|
<td>High</td>
|
|
768
804
|
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
|
|
769
805
|
</tr>
|
|
770
806
|
<tr>
|
|
771
807
|
<td>Zstandard (zstd) decompression</td>
|
|
772
|
-
<td>compression.zstd<br>
|
|
808
|
+
<td>compression.zstd<br>decompress</td>
|
|
773
809
|
<td>High</td>
|
|
774
810
|
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
|
|
775
811
|
</tr>
|
|
776
812
|
</tbody>
|
|
777
|
-
</table><br><p>Number of implemented security validations:<b>
|
|
813
|
+
</table><br><p>Number of implemented security validations:<b>95</b></p><p>Version of codeaudit: <b>1.9.6</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-11-15 16:45</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.9.6</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>
|
|
@@ -155,7 +155,7 @@ To keep up with current threats, you need a Python Application Security Testing
|
|
|
155
155
|
:::{note}
|
|
156
156
|
This `Python Code Audit` tool is built to be fast, lightweight, and easy to use.
|
|
157
157
|
|
|
158
|
-
By default, the tool scans Python code against more than **
|
|
158
|
+
By default, the tool scans Python code against more than **95 rules** to detect potential security vulnerabilities. These rules target unsafe constructs of the standard Python libraries that could pose a security risk.
|
|
159
159
|
|
|
160
160
|
:::
|
|
161
161
|
|
|
@@ -2,6 +2,12 @@ name,construct,severity,info
|
|
|
2
2
|
Assertions,assert,Low,Assertions are for debugging and development. Assertions can be disabled during runtime. Use in production can introduce vulnerabilities.
|
|
3
3
|
Insecure Network Binding,s.bind,Medium,Binding to all interfaces can expose the service to a wider network attack surface.
|
|
4
4
|
OS File Permissions,os.chmod,High,Changing permissions carelessly can expose sensitive files.
|
|
5
|
+
Ctypes library loading,ctypes.CDLL,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
6
|
+
Ctypes library loading,ctypes.WinDLL,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
7
|
+
Ctypes library loading,ctypes.OleDLL,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
8
|
+
Ctypes library loading,ctypes.windll.LoadLibrary,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
9
|
+
Ctypes library loading,ctypes.cdll.LoadLibrary,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
10
|
+
Ctypes library loading,ctypes.oledll.LoadLibrary,High,"Enables arbitrary native code execution, direct memory access and can bypass sandboxing."
|
|
5
11
|
Directory Creation,os.makedirs,Low,Direct file system calls require careful input validation to prevent vulnerabilities.
|
|
6
12
|
Directory Creation,os.mkdir,Low,Direct file system calls require careful input validation to prevent vulnerabilities.
|
|
7
13
|
Directory Creation,os.mkfifo,Low,Direct file system calls require careful input validation to prevent vulnerabilities.
|