codeaudit 1.6.6__tar.gz → 1.7.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.6.6 → codeaudit-1.7.0}/CHANGELOG.md +12 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/PKG-INFO +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/_toc.yml +8 -5
- codeaudit-1.7.0/docs/cimode.md +276 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/codeauditcommands.md +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/codeauditchecks.html +22 -4
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/demoscan.json +16 -16
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/filescan.md +2 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/whysast.md +7 -3
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/api_reporting.py +3 -3
- codeaudit-1.7.0/src/codeaudit/ci_workflowscan.py +384 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/corecli.py +3 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/dashboardapp.py +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/module_load_validation.html +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/module_load_validation2.html +1 -1
- codeaudit-1.7.0/src/dashboard/pyodide/dashboardapp_version166.html +295 -0
- codeaudit-1.7.0/src/dashboard/pyodide/dashboardapp_version166.js +91 -0
- codeaudit-1.7.0/src/dashboard/pyodide/deployed/dashboardapp_version166.html +295 -0
- codeaudit-1.7.0/src/dashboard/pyodide/deployed/dashboardapp_version166.js +91 -0
- codeaudit-1.7.0/tests/test_dynamic_import.py +27 -0
- codeaudit-1.7.0/tests/validationfiles/danger_imports.py +9 -0
- codeaudit-1.6.6/docs/securecoding.md +0 -120
- codeaudit-1.6.6/docs/validatetips.md +0 -95
- codeaudit-1.6.6/src/dashboard/pyodide/tiny.html +0 -249
- codeaudit-1.6.6/src/dashboard/pyodide/tiny.js +0 -91
- {codeaudit-1.6.6 → codeaudit-1.7.0}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/.gitignore +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/CONTRIBUTE.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/LICENSE.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/README.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/SECURITY.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/.gitignore +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/class_index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/function_index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/status.json +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/_config.yml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/about.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/architecture.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/astlines.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/astlines2.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/changelog.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/input_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/random_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/checksinformation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/complexitycheck.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/demofile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/filescan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/examples/overview.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/features.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/filescan.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/handling_errors.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/help.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/howtoscan.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/OO.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/ai_use.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/installation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/intro.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/issues.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/license.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/makeitbetter.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/markingissues.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/modulescan.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/overviewplot.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/pca_overview.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/project_philosophy.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/sponsors.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/userguide.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/warnings.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/docs/whatissast.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/filescan.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/pyproject.toml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/altairplots.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/api_interfaces.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/dashboard_reports.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/filehelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/pypi_package_scan.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/reporting.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp_version162.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/pyodide/deployed/dashboardapp_version162.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_apicalls.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_base64.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_chmod.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_edgecases.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_ftp.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_oschecks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_random.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_subprocess.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_suppression.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/test_zstd.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/unit_tests/test_filehelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.0}/tests/validationfiles/zstd.py +0 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.7.0:
|
|
4
|
+
|
|
5
|
+
**Added**
|
|
6
|
+
|
|
7
|
+
* **CI Option:** Added a new Continuous Integration (CI) option. (See [issue #24](https://github.com/nocomplexity/codeaudit/issues/24))
|
|
8
|
+
|
|
9
|
+
**Documentation**
|
|
10
|
+
|
|
11
|
+
* **Fixes & Updates:** Minor documentation fixes and content updates.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
## Version 1.6.6:
|
|
4
16
|
|
|
5
17
|
**Added:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.0
|
|
4
4
|
Summary: A modern Python security source code analyzer (SAST) based on distrust.
|
|
5
5
|
Project-URL: Documentation, https://github.com/nocomplexity/codeaudit#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/nocomplexity/codeaudit/issues
|
|
@@ -10,7 +10,11 @@ parts:
|
|
|
10
10
|
- file: whatissast
|
|
11
11
|
- file: whysast
|
|
12
12
|
- url: https://securitytesting.nocomplexity.com/
|
|
13
|
-
title:
|
|
13
|
+
title: Security Testing for Python
|
|
14
|
+
- url: http://securitybydesign.nocomplexity.com/
|
|
15
|
+
title: Security By Design
|
|
16
|
+
- url: https://nocomplexity.github.io/pythonsecurity/
|
|
17
|
+
title: Python Security Handbook
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
|
|
@@ -27,13 +31,12 @@ parts:
|
|
|
27
31
|
sections:
|
|
28
32
|
- file: data_egress_implementation
|
|
29
33
|
- file: issues
|
|
30
|
-
- file: markingissues
|
|
31
|
-
- file: securecoding
|
|
34
|
+
- file: markingissues
|
|
32
35
|
- file: complexitycheck
|
|
33
36
|
- file: warnings
|
|
34
37
|
- file: handling_errors
|
|
35
|
-
- file:
|
|
36
|
-
- file:
|
|
38
|
+
- file: cimode
|
|
39
|
+
- file: implementedvalidations
|
|
37
40
|
- file: checksinformation
|
|
38
41
|
sections:
|
|
39
42
|
- file: checks/assert_check
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# CI Integration
|
|
2
|
+
|
|
3
|
+
Python Code Audit is a fast, local-first SAST tool for analysing Python code and detecting potential security weaknesses. While it is particularly useful for auditing third-party code, it should also be run regularly on your own projects to ensure continuous security validation.
|
|
4
|
+
|
|
5
|
+
Python Code Audit integrates easily into CI/CD pipelines and standard code quality workflows. A CI job can be configured in just a few steps, supporting our goal of simple, effective security tooling. This allows you to focus on reviewing findings and applying fixes based on [Security by Design principles](https://nocomplexity.github.io/securitybydesign/securityprinciples/).
|
|
6
|
+
|
|
7
|
+
If you have improvements or CI configuration tips, contributions via pull requests to this documentation are welcome.
|
|
8
|
+
|
|
9
|
+
:::{note}
|
|
10
|
+
[Data Exfiltration Detection functionality](data_exfiltration_detection) is not yet available in CI pipelines.
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
:::{admonition} By default, CI scan mode uses the same analysis engine as the CLI version
|
|
15
|
+
:class: important
|
|
16
|
+
|
|
17
|
+
So Keep in mind:
|
|
18
|
+
|
|
19
|
+
* [Some directories are excluded from SAST scanning](excluded_directories)
|
|
20
|
+
* Findings marked with [markissues-label](markissues-label) are ignored by default in CI mode
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## CI Mode Command
|
|
25
|
+
|
|
26
|
+
CI mode is enabled using the following CLI command:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
codeaudit cimode [file|directory] [--output text|html|json] [--nosec True|False]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Default behaviour
|
|
33
|
+
|
|
34
|
+
* Output format: `text`
|
|
35
|
+
* `nosec=True` (ignores lines marked with `# nosec`)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Quick Test Run
|
|
40
|
+
|
|
41
|
+
You can test CI mode locally before integrating it into your pipeline:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
codeaudit cimode .
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Here, `.` represents the current working directory.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Command Options
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
| Option | Description |
|
|
54
|
+
| -------------- | ---------------------------------------------------------- |
|
|
55
|
+
| `-o, --output` | Output format: `text`, `html`, or `json` (default: `text`) |
|
|
56
|
+
| `-n, --nosec` | Ignore findings marked with `# nosec` (default: `True`) |
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## GitLab CI Integration
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Integrating Python Code Audit with [GitLab.com](https://gitlab.com) is straightforward and can be completed in just a few minutes.
|
|
65
|
+
|
|
66
|
+
For GitLab CI jobs, it is recommended to always save **artifacts**, even when the job fails. This ensures that scan results are available for review in all cases. It is especially useful when using the HTML report format, as it allows you to quickly view findings directly in the browser via the CI artifacts interface.
|
|
67
|
+
|
|
68
|
+
If needed, you can also export the `json` output for further processing in a separate secure environment, for example to integrate results into dashboards, ticketing systems, or additional analysis pipelines.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### HTML report example
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
```yml
|
|
75
|
+
# SAST scan with Python Code Audit on GitLab.com
|
|
76
|
+
image: python:3.13-slim
|
|
77
|
+
|
|
78
|
+
stages:
|
|
79
|
+
- scan
|
|
80
|
+
|
|
81
|
+
codeaudit-scan:
|
|
82
|
+
stage: scan
|
|
83
|
+
|
|
84
|
+
before_script:
|
|
85
|
+
- python -m pip install --upgrade pip
|
|
86
|
+
|
|
87
|
+
script:
|
|
88
|
+
- pip install codeaudit
|
|
89
|
+
- codeaudit --version
|
|
90
|
+
- codeaudit cimode . --output html > codeaudit-output.html
|
|
91
|
+
|
|
92
|
+
allow_failure: true
|
|
93
|
+
|
|
94
|
+
artifacts:
|
|
95
|
+
when: always
|
|
96
|
+
name: "codeaudit-${CI_COMMIT_REF_NAME}"
|
|
97
|
+
paths:
|
|
98
|
+
- codeaudit-output.html
|
|
99
|
+
expire_in: 1 week
|
|
100
|
+
expose_as: "Python Code Audit Report"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If a scan detects security weaknesses, the job will fail by default. In many workflows, it is common to allow CI failures so that issues are visible without blocking all development activity.
|
|
104
|
+
|
|
105
|
+
After the job completes, results are available in the CI **artifacts**. Use *Browse artifacts* to open the HTML report directly in your browser.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Plain Text Output Example
|
|
109
|
+
|
|
110
|
+
For simple readable output in CI logs:
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
codeaudit-scan:
|
|
114
|
+
stage: scan
|
|
115
|
+
|
|
116
|
+
before_script:
|
|
117
|
+
- python -m pip install --upgrade pip
|
|
118
|
+
|
|
119
|
+
script:
|
|
120
|
+
- pip install codeaudit
|
|
121
|
+
- codeaudit --version
|
|
122
|
+
- codeaudit cimode . | tee codeaudit-output.txt
|
|
123
|
+
|
|
124
|
+
allow_failure: true
|
|
125
|
+
|
|
126
|
+
artifacts:
|
|
127
|
+
when: always
|
|
128
|
+
name: "codeaudit-${CI_COMMIT_REF_NAME}"
|
|
129
|
+
paths:
|
|
130
|
+
- codeaudit-output.txt
|
|
131
|
+
expire_in: 1 week
|
|
132
|
+
expose_as: "Python Code Audit Report"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### JSON Output Example
|
|
137
|
+
|
|
138
|
+
For structured processing or integration with other tools:
|
|
139
|
+
|
|
140
|
+
```yml
|
|
141
|
+
codeaudit-scan:
|
|
142
|
+
stage: scan
|
|
143
|
+
|
|
144
|
+
before_script:
|
|
145
|
+
- python -m pip install --upgrade pip
|
|
146
|
+
|
|
147
|
+
script:
|
|
148
|
+
- pip install codeaudit
|
|
149
|
+
- codeaudit --version
|
|
150
|
+
- codeaudit cimode . --output json | tee codeaudit-output.json
|
|
151
|
+
|
|
152
|
+
allow_failure: true
|
|
153
|
+
|
|
154
|
+
artifacts:
|
|
155
|
+
when: always
|
|
156
|
+
name: "codeaudit-${CI_COMMIT_REF_NAME}"
|
|
157
|
+
paths:
|
|
158
|
+
- codeaudit-output.json
|
|
159
|
+
expire_in: 1 week
|
|
160
|
+
expose_as: "Python Code Audit Report"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## GitHub.com CI Integration
|
|
165
|
+
|
|
166
|
+
### For readable output in CI logs
|
|
167
|
+
|
|
168
|
+
You can use the following example CI configuration:
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
# SAST scan with Python Code Audit on GitHub Actions
|
|
172
|
+
|
|
173
|
+
name: Python Code Audit SAST Scan
|
|
174
|
+
|
|
175
|
+
on:
|
|
176
|
+
push:
|
|
177
|
+
pull_request:
|
|
178
|
+
|
|
179
|
+
jobs:
|
|
180
|
+
codeaudit-scan:
|
|
181
|
+
runs-on: ubuntu-latest
|
|
182
|
+
|
|
183
|
+
steps:
|
|
184
|
+
- name: Checkout repository
|
|
185
|
+
uses: actions/checkout@v4
|
|
186
|
+
|
|
187
|
+
- name: Set up Python
|
|
188
|
+
uses: actions/setup-python@v5
|
|
189
|
+
with:
|
|
190
|
+
python-version: "3.13"
|
|
191
|
+
|
|
192
|
+
- name: Upgrade pip
|
|
193
|
+
run: python -m pip install --upgrade pip
|
|
194
|
+
|
|
195
|
+
- name: Install Python Code Audit
|
|
196
|
+
run: pip install codeaudit
|
|
197
|
+
|
|
198
|
+
- name: Show version
|
|
199
|
+
run: codeaudit --version
|
|
200
|
+
|
|
201
|
+
- name: Run SAST scan
|
|
202
|
+
run: |
|
|
203
|
+
codeaudit cimode . --output text | tee codeaudit-output.text
|
|
204
|
+
exit ${PIPESTATUS[0]}
|
|
205
|
+
|
|
206
|
+
- name: Upload scan artifact
|
|
207
|
+
uses: actions/upload-artifact@v4
|
|
208
|
+
with:
|
|
209
|
+
name: codeaudit-${{ github.ref_name }}
|
|
210
|
+
path: codeaudit-output.text
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
### HTML output
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
# SAST scan with Python Code Audit on GitHub Actions
|
|
220
|
+
|
|
221
|
+
name: Python Code Audit SAST Scan
|
|
222
|
+
|
|
223
|
+
on:
|
|
224
|
+
push:
|
|
225
|
+
pull_request:
|
|
226
|
+
|
|
227
|
+
jobs:
|
|
228
|
+
codeaudit-scan:
|
|
229
|
+
runs-on: ubuntu-latest
|
|
230
|
+
|
|
231
|
+
steps:
|
|
232
|
+
- name: Checkout repository
|
|
233
|
+
uses: actions/checkout@v4
|
|
234
|
+
|
|
235
|
+
- name: Set up Python
|
|
236
|
+
uses: actions/setup-python@v5
|
|
237
|
+
with:
|
|
238
|
+
python-version: "3.13"
|
|
239
|
+
|
|
240
|
+
- name: Upgrade pip
|
|
241
|
+
run: python -m pip install --upgrade pip
|
|
242
|
+
|
|
243
|
+
- name: Install Python Code Audit
|
|
244
|
+
run: pip install codeaudit
|
|
245
|
+
|
|
246
|
+
- name: Show version
|
|
247
|
+
run: codeaudit --version
|
|
248
|
+
|
|
249
|
+
- name: Run SAST scan (HTML output)
|
|
250
|
+
run: codeaudit cimode . --output html > codeaudit-output.html
|
|
251
|
+
|
|
252
|
+
- name: Upload scan artifact
|
|
253
|
+
uses: actions/upload-artifact@v4
|
|
254
|
+
with:
|
|
255
|
+
name: codeaudit-${{ github.ref_name }}
|
|
256
|
+
path: codeaudit-output.html
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
On GitHub Actions, HTML reports are **not rendered directly in the browser** like a live page. They are stored as **workflow artifacts**.
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
To download SAST result artifacts from the workflow run:
|
|
264
|
+
|
|
265
|
+
After the job finishes:
|
|
266
|
+
|
|
267
|
+
1. Go to your repository on GitHub
|
|
268
|
+
2. Open the **Actions** tab
|
|
269
|
+
3. Select the workflow run
|
|
270
|
+
4. Scroll to the **Artifacts** section
|
|
271
|
+
5. Download the artifact (usually a `.zip` file)
|
|
272
|
+
6. Extract it locally
|
|
273
|
+
7. Open `codeaudit-output.html` in your browser
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
@@ -252,10 +252,28 @@ footer {
|
|
|
252
252
|
<td>Assertions are for debugging and development. Assertions can be disabled during runtime. Use in production can introduce vulnerabilities.</td>
|
|
253
253
|
</tr>
|
|
254
254
|
<tr>
|
|
255
|
-
<td>Base64
|
|
256
|
-
<td>base64</td>
|
|
255
|
+
<td>Base64 Decoding</td>
|
|
256
|
+
<td>base64.b64decode</td>
|
|
257
|
+
<td>Medium</td>
|
|
258
|
+
<td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
|
|
259
|
+
</tr>
|
|
260
|
+
<tr>
|
|
261
|
+
<td>Base64 Decoding</td>
|
|
262
|
+
<td>base64.b64encode</td>
|
|
257
263
|
<td>Low</td>
|
|
258
|
-
<td>Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
|
|
264
|
+
<td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
|
|
265
|
+
</tr>
|
|
266
|
+
<tr>
|
|
267
|
+
<td>Base64 Decoding</td>
|
|
268
|
+
<td>base64.b85encode</td>
|
|
269
|
+
<td>Low</td>
|
|
270
|
+
<td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
|
|
271
|
+
</tr>
|
|
272
|
+
<tr>
|
|
273
|
+
<td>Base64 Decoding</td>
|
|
274
|
+
<td>base64.z85decode</td>
|
|
275
|
+
<td>Medium</td>
|
|
276
|
+
<td>Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.</td>
|
|
259
277
|
</tr>
|
|
260
278
|
<tr>
|
|
261
279
|
<td>BZ2 File Handling</td>
|
|
@@ -744,4 +762,4 @@ footer {
|
|
|
744
762
|
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
|
|
745
763
|
</tr>
|
|
746
764
|
</tbody>
|
|
747
|
-
</table><br><p>Number of implemented security validations:<b>
|
|
765
|
+
</table><br><p>Number of implemented security validations:<b>87</b></p><p>Version of codeaudit: <b>1.7.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-06-10 15:54</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.7.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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Python_Code_Audit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"generated_on": "2026-
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"generated_on": "2026-06-10 15:54",
|
|
5
5
|
"file_security_info": {
|
|
6
6
|
"0": {
|
|
7
7
|
"FileName": "demofile.py",
|
|
@@ -212,6 +212,20 @@
|
|
|
212
212
|
"info": "This function can be used to execute arbitrary code or crash the Python interpreter.",
|
|
213
213
|
"code": "<pre><code class='language-python'>compile('nasty-string' ,'malware.bin',mode=single, flags=0, dont_inherit=False, optimize=-1)</code></pre>"
|
|
214
214
|
},
|
|
215
|
+
"238": {
|
|
216
|
+
"line": 238,
|
|
217
|
+
"validation": "base64.b64encode",
|
|
218
|
+
"severity": "Low",
|
|
219
|
+
"info": "Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
|
|
220
|
+
"code": "<pre><code class='language-python'>import base64\nencoded = base64.b64encode(b'data to be encoded')\ndata = base64.b64decode(encoded)</code></pre>"
|
|
221
|
+
},
|
|
222
|
+
"239": {
|
|
223
|
+
"line": 239,
|
|
224
|
+
"validation": "base64.b64decode",
|
|
225
|
+
"severity": "Medium",
|
|
226
|
+
"info": "Base64 encoding/decoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
|
|
227
|
+
"code": "<pre><code class='language-python'>encoded = base64.b64encode(b'data to be encoded')\ndata = base64.b64decode(encoded)</code></pre>"
|
|
228
|
+
},
|
|
215
229
|
"244": {
|
|
216
230
|
"line": 244,
|
|
217
231
|
"validation": "http.server.BaseHTTPRequestHandler",
|
|
@@ -459,20 +473,6 @@
|
|
|
459
473
|
"info": "Parsing untrusted logging configurations can lead to vulnerabilities if not handled correctly.",
|
|
460
474
|
"code": "<pre><code class='language-python'>logging.config.fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None)\n#<END LOGGING checks></code></pre>"
|
|
461
475
|
},
|
|
462
|
-
"238": {
|
|
463
|
-
"line": 238,
|
|
464
|
-
"validation": "base64",
|
|
465
|
-
"severity": "Low",
|
|
466
|
-
"info": "Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
|
|
467
|
-
"code": "<pre><code class='language-python'>import base64\nencoded = base64.b64encode(b'data to be encoded')\ndata = base64.b64decode(encoded)</code></pre>"
|
|
468
|
-
},
|
|
469
|
-
"239": {
|
|
470
|
-
"line": 239,
|
|
471
|
-
"validation": "base64",
|
|
472
|
-
"severity": "Low",
|
|
473
|
-
"info": "Base64 encoding is not for security. It only visually hides data and provides no confidentiality. Often used to obfuscate malware in code.",
|
|
474
|
-
"code": "<pre><code class='language-python'>encoded = base64.b64encode(b'data to be encoded')\ndata = base64.b64decode(encoded)</code></pre>"
|
|
475
|
-
},
|
|
476
476
|
"316": {
|
|
477
477
|
"line": 316,
|
|
478
478
|
"validation": "pickle.load",
|
|
@@ -33,6 +33,8 @@ Per line a the in construct that can cause a security risks is shown, along with
|
|
|
33
33
|
|
|
34
34
|

|
|
35
35
|
|
|
36
|
+
(excluded_directories)=
|
|
37
|
+
## Excluded directories
|
|
36
38
|
|
|
37
39
|
:::{note}
|
|
38
40
|
The `codeaudit filescan` command does **NOT** include all directories. This is done on purpose!
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# Why Security Testing
|
|
2
2
|
|
|
3
|
-
Static Application Security Testing (SAST) is crucial
|
|
4
|
-
SAST testing helps proactively identify vulnerabilities directly in the source code.
|
|
3
|
+
Static Application Security Testing (SAST) is a crucial part of securing Python applications.
|
|
5
4
|
|
|
6
|
-
Python
|
|
5
|
+
Cybercriminals continuously develop new techniques to exploit weaknesses in Python code and known vulnerabilities to steal data, cause disruption, or gain unauthorised access. Thoroughly analysing source code for security issues is challenging, time-consuming, and expensive.
|
|
7
6
|
|
|
7
|
+
This is where SAST proves invaluable. By examining your source code directly, SAST enables you to proactively identify vulnerabilities before they reach production.
|
|
8
|
+
|
|
9
|
+
Python presents unique security challenges due to its dynamic nature, syntax, and common idioms. Generic multi-language SAST tools often miss Python-specific issues. That’s why specialised Python SAST tools deliver far better results.
|
|
10
|
+
|
|
11
|
+
**Python Code Audit** makes static security testing fast, reliable, and highly effective. Whether reviewing your own code or assessing third-party Python applications.
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
:::{admonition} Advantages of Security Testing(SAST) on Python code
|
|
@@ -32,11 +32,11 @@ def total_weaknesses(input_file):
|
|
|
32
32
|
sast_result = file_info.get("sast_result", {})
|
|
33
33
|
for (
|
|
34
34
|
construct,
|
|
35
|
-
|
|
35
|
+
occurrence,
|
|
36
36
|
) in (
|
|
37
37
|
sast_result.items()
|
|
38
|
-
): #
|
|
39
|
-
counter[construct] += len(
|
|
38
|
+
): # occurrence is times the construct appears in a single file
|
|
39
|
+
counter[construct] += len(occurrence)
|
|
40
40
|
|
|
41
41
|
result = dict(counter)
|
|
42
42
|
df = pd.DataFrame(list(result.items()), columns=["call", "count"])
|