codeaudit 1.6.6__tar.gz → 1.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codeaudit-1.6.6 → codeaudit-1.7.1}/CHANGELOG.md +36 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/PKG-INFO +14 -5
- {codeaudit-1.6.6 → codeaudit-1.7.1}/README.md +13 -4
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/CONTRIBUTE.md +2 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/_toc.yml +9 -8
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/about.md +24 -14
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/architecture.md +7 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/assert_check.md +4 -0
- codeaudit-1.7.1/docs/cimode.md +276 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/codeauditcommands.md +1 -1
- codeaudit-1.7.1/docs/examples/ca_api_example_basic.ipynb +352 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/codeauditchecks.html +23 -5
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/demoscan.json +16 -16
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/features.md +5 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/filescan.md +2 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/help.md +2 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/intro.md +10 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/makeitbetter.md +73 -12
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/whysast.md +7 -3
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/altairplots.py +28 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/api_interfaces.py +17 -2
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/api_reporting.py +9 -17
- codeaudit-1.7.1/src/codeaudit/ci_workflowscan.py +384 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/corecli.py +3 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/dashboard_reports.py +79 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/pypi_package_scan.py +55 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/reporting.py +33 -27
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/totals.py +2 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/dashboardapp.py +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/module_load_validation.html +1 -1
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/module_load_validation2.html +1 -1
- codeaudit-1.7.1/src/dashboard/pyodide/dashboardapp_version166.html +295 -0
- codeaudit-1.7.1/src/dashboard/pyodide/dashboardapp_version166.js +91 -0
- codeaudit-1.7.1/src/dashboard/pyodide/deployed/dashboardapp_version166.html +295 -0
- codeaudit-1.7.1/src/dashboard/pyodide/deployed/dashboardapp_version166.js +91 -0
- codeaudit-1.7.1/tests/test_dynamic_import.py +27 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_modulecheck.py +16 -0
- codeaudit-1.7.1/tests/unit_tests/test_count_weaknesses.py +89 -0
- codeaudit-1.7.1/tests/validationfiles/codeaudit_scan.json +619 -0
- codeaudit-1.7.1/tests/validationfiles/danger_imports.py +9 -0
- codeaudit-1.7.1/tests/validationfiles/malware.py +13 -0
- codeaudit-1.6.6/docs/astlines.md +0 -111
- codeaudit-1.6.6/docs/astlines2.md +0 -26
- codeaudit-1.6.6/docs/examples/ca_api_example_basic.ipynb +0 -725
- 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.1}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/.gitignore +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/CONTRIBUTE.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/LICENSE.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/SECURITY.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/.gitignore +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/class_index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/coverage_html_cb_dd2e7eb5.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/favicon_32_cb_c827f16f.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/function_index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/index.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/keybd_closed_cb_900cfef5.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/status.json +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/style_cb_9ff733b0.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8___about___py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8___init___py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_altairplots_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_api_helpers_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_api_interfaces_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_api_reporting_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_checkmodules_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_codeaudit_dashboard_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_codeaudit_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_complexitycheck_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_dashboard_reports_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_filehelpfunctions_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_htmlhelpfunctions_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_issuevalidations_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_privacy_lint_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_pypi_package_scan_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_reporting_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_security_checks_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_suppression_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/cov_html/z_15dab3f49bf85fa8_totals_py.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/_config.yml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/changelog.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/input_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/random_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/checksinformation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/complexitycheck.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/demofile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/filescan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/examples/overview.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/filescan.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/handling_errors.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/howtoscan.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/OO.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/ai_use.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/installation.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/issues.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/license.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/markingissues.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/modulescan.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/overviewplot.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/pca_overview.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/project_philosophy.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/sponsors.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/userguide.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/warnings.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/docs/whatissast.md +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/filescan.png +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/pyproject.toml +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/api_helpers.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/filehelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/pyodide/deployed/dashboardapp.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/pyodide/deployed/dashboardapp_version162.html +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/pyodide/deployed/dashboardapp_version162.js +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/src/dashboard/requirements.txt +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_apicalls.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_base64.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_chmod.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_edgecases.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_ftp.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_oschecks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_random.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_subprocess.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_suppression.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/test_zstd.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/unit_tests/test_filehelpfunctions.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.6.6 → codeaudit-1.7.1}/tests/validationfiles/zstd.py +0 -0
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.7.1:
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
**Added**
|
|
7
|
+
|
|
8
|
+
* **PyPI Update Indicator:** Added an indicator for the last update of PyPI packages, implemented for both the CLI version and the Dashboard version.
|
|
9
|
+
* **Test Coverage:** Added extra tests to improve codebase stability.
|
|
10
|
+
* **Dashboard Overview (WASM version):** The total number of weaknesses is now displayed directly in the overview tab.
|
|
11
|
+
|
|
12
|
+
**Changed**
|
|
13
|
+
|
|
14
|
+
* **CLI Report Optimization (Modules):** The CLI report now only displays modules when they are actually found.
|
|
15
|
+
* **CLI Report Optimization (Tips):** The CLI report now only displays the tip to check external modules for vulnerabilities if vulnerabilities are actually present in a file.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
**Fixed**
|
|
19
|
+
|
|
20
|
+
* **Windows 11 Compatibility:** Fixed an issue to ensure `codeaudit overview` works properly on Windows 11, specifically resolving a bug in the `count_lines_iterate` function.
|
|
21
|
+
* **Altair Visuals:** Fixed stability issues with the Altair Visual overview in the `codeaudit overview` section, making it stable again.
|
|
22
|
+
|
|
23
|
+
**Documentation**
|
|
24
|
+
|
|
25
|
+
* General documentation updates and minor fixes.
|
|
26
|
+
|
|
27
|
+
## Version 1.7.0:
|
|
28
|
+
|
|
29
|
+
**Added**
|
|
30
|
+
|
|
31
|
+
* **CI Option:** Added a new Continuous Integration (CI) option. (See [issue #24](https://github.com/nocomplexity/codeaudit/issues/24))
|
|
32
|
+
|
|
33
|
+
**Documentation**
|
|
34
|
+
|
|
35
|
+
* **Fixes & Updates:** Minor documentation fixes and content updates.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
3
39
|
## Version 1.6.6:
|
|
4
40
|
|
|
5
41
|
**Added:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
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
|
|
@@ -44,10 +44,9 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
45
45
|
[](https://pepy.tech/projects/codeaudit)
|
|
46
46
|
|
|
47
|
-
Python Code Audit - A modern Python source code analyzer based on distrust.
|
|
48
|
-
|
|
49
|
-
Python Code Audit is a tool to find **security weaknesses** in Python code. This static application security testing (SAST) tool has **great** features to simplify the necessary security tasks and make it fun and easy.
|
|
47
|
+
Python Code Audit - A modern Python security source code analyzer based on distrust.
|
|
50
48
|
|
|
49
|
+
Python Code Audit is a static application security testing (SAST) tool designed to identify **security weaknesses** in Python source code. It combines **powerful analysis features** with an intuitive workflow, making essential security audits both simple and engaging.
|
|
51
50
|
|
|
52
51
|
This tool is designed for anyone who uses or creates Python programs and wants to understand and mitigate potential security risks.
|
|
53
52
|
|
|
@@ -73,6 +72,7 @@ Python Code Audit has the following features:
|
|
|
73
72
|
|
|
74
73
|
* **External Egress Detection**: Identifies embedded API keys and logic that enables communication with remote services, helping uncover hidden data exfiltration paths.
|
|
75
74
|
|
|
75
|
+
* **CI/CD Ready:** Integrates seamlessly into any CI/CD workflow.
|
|
76
76
|
|
|
77
77
|
* **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
|
|
78
78
|
|
|
@@ -84,11 +84,20 @@ Python Code Audit has the following features:
|
|
|
84
84
|
|
|
85
85
|
## Installation
|
|
86
86
|
|
|
87
|
+
> [!TIP]
|
|
88
|
+
> Try it instantly—no installs, no setup, no excuses.
|
|
89
|
+
>
|
|
90
|
+
> 👉 Launch the browser version [here](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
91
|
+
|
|
92
|
+
It runs 100% locally in your browser using WebAssembly (WASM). See the power of the tool in under 60 seconds.
|
|
93
|
+
No downloads. No dependencies. Just click and do a security audit on Python Code.
|
|
94
|
+
|
|
95
|
+
Loved the browser version? Unlock the full power. For advanced security code inspections, CI/CD integration, and all professional features, install the complete Python package:
|
|
96
|
+
|
|
87
97
|
```console
|
|
88
98
|
pip install -U codeaudit
|
|
89
99
|
```
|
|
90
100
|
|
|
91
|
-
If you would like to test this security tool without installing it, simply use the WASM version [available here](https://nocomplexity.com/codeauditapp/dashboardapp.html).
|
|
92
101
|
|
|
93
102
|
|
|
94
103
|
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
11
11
|
[](https://pepy.tech/projects/codeaudit)
|
|
12
12
|
|
|
13
|
-
Python Code Audit - A modern Python source code analyzer based on distrust.
|
|
14
|
-
|
|
15
|
-
Python Code Audit is a tool to find **security weaknesses** in Python code. This static application security testing (SAST) tool has **great** features to simplify the necessary security tasks and make it fun and easy.
|
|
13
|
+
Python Code Audit - A modern Python security source code analyzer based on distrust.
|
|
16
14
|
|
|
15
|
+
Python Code Audit is a static application security testing (SAST) tool designed to identify **security weaknesses** in Python source code. It combines **powerful analysis features** with an intuitive workflow, making essential security audits both simple and engaging.
|
|
17
16
|
|
|
18
17
|
This tool is designed for anyone who uses or creates Python programs and wants to understand and mitigate potential security risks.
|
|
19
18
|
|
|
@@ -39,6 +38,7 @@ Python Code Audit has the following features:
|
|
|
39
38
|
|
|
40
39
|
* **External Egress Detection**: Identifies embedded API keys and logic that enables communication with remote services, helping uncover hidden data exfiltration paths.
|
|
41
40
|
|
|
41
|
+
* **CI/CD Ready:** Integrates seamlessly into any CI/CD workflow.
|
|
42
42
|
|
|
43
43
|
* **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
|
|
44
44
|
|
|
@@ -50,11 +50,20 @@ Python Code Audit has the following features:
|
|
|
50
50
|
|
|
51
51
|
## Installation
|
|
52
52
|
|
|
53
|
+
> [!TIP]
|
|
54
|
+
> Try it instantly—no installs, no setup, no excuses.
|
|
55
|
+
>
|
|
56
|
+
> 👉 Launch the browser version [here](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
57
|
+
|
|
58
|
+
It runs 100% locally in your browser using WebAssembly (WASM). See the power of the tool in under 60 seconds.
|
|
59
|
+
No downloads. No dependencies. Just click and do a security audit on Python Code.
|
|
60
|
+
|
|
61
|
+
Loved the browser version? Unlock the full power. For advanced security code inspections, CI/CD integration, and all professional features, install the complete Python package:
|
|
62
|
+
|
|
53
63
|
```console
|
|
54
64
|
pip install -U codeaudit
|
|
55
65
|
```
|
|
56
66
|
|
|
57
|
-
If you would like to test this security tool without installing it, simply use the WASM version [available here](https://nocomplexity.com/codeauditapp/dashboardapp.html).
|
|
58
67
|
|
|
59
68
|
|
|
60
69
|
|
|
@@ -22,6 +22,8 @@ These are all activities we’d like to get help with :
|
|
|
22
22
|
- Website design and development
|
|
23
23
|
:::
|
|
24
24
|
|
|
25
|
+
Or just make a [donation](donate-label)!
|
|
26
|
+
|
|
25
27
|
The **Codeaudit** code repository is hosted at [Github](https://github.com/nocomplexity/codeaudit).
|
|
26
28
|
|
|
27
29
|
Simple Guidelines:
|
|
@@ -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
|
|
@@ -65,9 +68,7 @@ parts:
|
|
|
65
68
|
|
|
66
69
|
|
|
67
70
|
- caption: Architecture
|
|
68
|
-
chapters:
|
|
69
|
-
#- file: astlines
|
|
70
|
-
# - file: astlines2
|
|
71
|
+
chapters:
|
|
71
72
|
- file: architecture
|
|
72
73
|
- file: makeitbetter
|
|
73
74
|
- file: project_philosophy
|
|
@@ -19,14 +19,14 @@ Currently, I lead initiatives at NoComplexity.com, an innovative IT company focu
|
|
|
19
19
|
:gutter: 3
|
|
20
20
|
|
|
21
21
|
:::{grid-item-card}
|
|
22
|
-
:link: https://nocomplexity.com/
|
|
22
|
+
:link: https://securitytesting.nocomplexity.com/
|
|
23
23
|
:link-type: url
|
|
24
|
-
{octicon}`book;2em;caption-text` **
|
|
24
|
+
{octicon}`book;2em;caption-text` **Mastering Security Testing for Python**
|
|
25
25
|
^^^
|
|
26
|
-
|
|
27
|
-
Use this Playbook to create better and faster security solutions for your security use case.
|
|
26
|
+
Gain a deep understanding of the methodologies and specialised tools to conduct security validation for Python applications.
|
|
28
27
|
:::
|
|
29
28
|
|
|
29
|
+
|
|
30
30
|
:::{grid-item-card}
|
|
31
31
|
:link: http://securitybydesign.nocomplexity.com/
|
|
32
32
|
:link-type: url
|
|
@@ -37,31 +37,32 @@ Master the topic quickly with this eBook.
|
|
|
37
37
|
:::
|
|
38
38
|
|
|
39
39
|
:::{grid-item-card}
|
|
40
|
-
:link: https://nocomplexity.com/documents/
|
|
40
|
+
:link: https://nocomplexity.com/documents/reports/SimplifySecurity.pdf
|
|
41
41
|
:link-type: url
|
|
42
|
-
{octicon}`book;2em;caption-text` **
|
|
42
|
+
{octicon}`book;2em;caption-text` **Simplify Cyber Manifest**
|
|
43
43
|
^^^
|
|
44
|
-
|
|
44
|
+
A manifesto to revolutionize cybersecurity through simplification.
|
|
45
45
|
:::
|
|
46
46
|
|
|
47
|
+
|
|
47
48
|
:::{grid-item-card}
|
|
48
|
-
:link: https://nocomplexity.
|
|
49
|
+
:link: https://nocomplexity.github.io/pythonsecurity/
|
|
49
50
|
:link-type: url
|
|
50
|
-
{octicon}`book;2em;caption-text` **
|
|
51
|
+
{octicon}`book;2em;caption-text` **Python Security Handbook**
|
|
51
52
|
^^^
|
|
52
|
-
|
|
53
|
+
This book will give you a deep understanding of how to develop secure Python applications. It also equips you with the knowledge needed to assess the security of Python code written by others.
|
|
53
54
|
:::
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
:::{grid-item-card}
|
|
57
|
-
:link: https://nocomplexity.com/documents/
|
|
58
|
+
:link: https://nocomplexity.com/documents/securityarchitecture/introduction.html
|
|
58
59
|
:link-type: url
|
|
59
|
-
{octicon}`book;2em;caption-text` **
|
|
60
|
+
{octicon}`book;2em;caption-text` **Open Security Reference Architecture**
|
|
60
61
|
^^^
|
|
61
|
-
|
|
62
|
+
Cyber security can still be simple and effective.
|
|
63
|
+
Use this Playbook to create better and faster security solutions for your security use case.
|
|
62
64
|
:::
|
|
63
65
|
|
|
64
|
-
|
|
65
66
|
:::{grid-item-card}
|
|
66
67
|
:link: https://nocomplexity.com/documents/simplifyprivacy/intro.html
|
|
67
68
|
:link-type: url
|
|
@@ -71,6 +72,15 @@ This digital Playbook is all about protecting *your* digital privacy.
|
|
|
71
72
|
:::
|
|
72
73
|
|
|
73
74
|
|
|
75
|
+
:::{grid-item-card}
|
|
76
|
+
:link: https://nocomplexity.com/documents/securitysolutions/intro.html
|
|
77
|
+
:link-type: url
|
|
78
|
+
{octicon}`book;2em;caption-text` **Open Security Solutions**
|
|
79
|
+
^^^
|
|
80
|
+
Given the vast array of FOSS cybersecurity products available, this publication offers a handcrafted curated selection.
|
|
81
|
+
:::
|
|
82
|
+
|
|
83
|
+
|
|
74
84
|
::::
|
|
75
85
|
% End of Cards grid
|
|
76
86
|
|
|
@@ -56,13 +56,19 @@ We focus on delivering a simple, trustworthy security tool that performs its def
|
|
|
56
56
|
|
|
57
57
|
The following design choices have been made for Python Code Audit:
|
|
58
58
|
|
|
59
|
-
* **The Python AST library is used
|
|
59
|
+
* **The Python AST library is used to determine weaknesses and perform code validation.**
|
|
60
60
|
* **Rationale:** As we are creating a Python-specific security checker, using the `ast` module provides **significant** advantages:
|
|
61
61
|
1. Code is not executed during examination, which is a major benefit when validating potentially malicious code.
|
|
62
62
|
2. Implementing basic checks using complex regex patterns would make the code and its maintenance unnecessarily difficult.
|
|
63
63
|
3. Users can add extra validations in a simple, straightforward manner.
|
|
64
|
+
|
|
65
|
+
+++
|
|
66
|
+
|
|
64
67
|
* **Python Code Audit is not designed for identifying weaknesses in web applications.**
|
|
65
68
|
* **Rationale:** We check Python source code, but do not perform XSS or SQL injection checks. Every Python web application **should** use a battle-tested FOSS framework that prevents these vulnerabilities by design. Testing for these would require building a fuzzer rather than a static code scanner. There are other tools that **must** always be used for validating web applications.
|
|
69
|
+
|
|
70
|
+
+++
|
|
71
|
+
|
|
66
72
|
* **Postpone code performance optimisations until truly necessary.**
|
|
67
73
|
* **Rationale:** We aim for a loosely coupled architecture of key functions; performance optimisations can be introduced at a later stage if required. In practice, performance optimisations are rarely needed. Most time will be spent by humans analysing results before deciding whether to use a Python package, or making security improvements to their own code. The baseline performance for scanning a 10MB Python package should be the priority.
|
|
68
74
|
* **Implication:** Ensure that performance optimisations can be applied later to specific functional blocks if they are found to be causing bottlenecks for users.
|
|
@@ -129,3 +129,7 @@ For robust validation and error handling in production code, always use standard
|
|
|
129
129
|
* [The assert statement - Python Documentation](https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement)
|
|
130
130
|
* [The dangers of assert in Python](https://snyk.io/blog/the-dangers-of-assert-in-python/)
|
|
131
131
|
* [Feature: Python assert should be consider harmful](https://community.sonarsource.com/t/feature-python-assert-should-be-consider-harmful/38501) But note that Sonar did not implement this check.
|
|
132
|
+
* [CVE-2017-1000433](https://nvd.nist.gov/vuln/detail/CVE-2017-1000433) and see the related [issues/451](https://github.com/IdentityPython/pysaml2/issues/451)
|
|
133
|
+
* [Advisory: pysaml2 Improper Authentication vulnerability](https://github.com/advisories/GHSA-924m-4pmx-c67h)
|
|
134
|
+
|
|
135
|
+
* [Rethinking Python Asserts in SAST](https://nocomplexity.com/python-asserts/)
|
|
@@ -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
|
+
```yaml
|
|
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
|
+
```yaml
|
|
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
|
+
|