codeaudit 1.9.6__tar.gz → 1.10.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.10.0/.github/workflows/release-notes.yml +44 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/CHANGELOG.md +21 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/PKG-INFO +4 -3
- {codeaudit-1.9.6 → codeaudit-1.10.0}/README.md +1 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/_toc.yml +1 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/architecture.md +8 -1
- codeaudit-1.10.0/docs/citing.md +23 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/codeauditcommands.md +1 -1
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/codeauditchecks.html +1 -1
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/demoscan.json +2 -2
- codeaudit-1.10.0/docs/images/CA_architecture.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/intro.md +1 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/pyproject.toml +2 -2
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/__about__.py +1 -1
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/altairplots.py +79 -61
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/api_helpers.py +4 -1
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/api_interfaces.py +76 -22
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/dashboard_reports.py +67 -7
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/filehelpfunctions.py +24 -26
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/pypi_package_scan.py +4 -2
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/reporting.py +42 -31
- codeaudit-1.10.0/src/dashboard/dashboardapp.py +401 -0
- codeaudit-1.9.6/src/dashboard/dashboardapp.py → codeaudit-1.10.0/src/dashboard/webdashboard.py +72 -113
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/README.md +4 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_filescan_api.py +13 -0
- codeaudit-1.10.0/tests/validationfiles/dissect-3.22.tar.gz +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/.github/workflows/publish-release.yml +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/.github/workflows/python-test.yml +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/.github/workflows/sast_validation.yml +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/.gitignore +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/LICENSE.txt +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/SECURITY.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/CLIcommands.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/CONTRIBUTE.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/_config.yml +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/_static/nocxstyle.css +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/about.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/apidocs/api_intro.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/apidocs/codeaudit.rst +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/apidocs/modules.rst +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/benchmarksuite.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/changelog.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/assert_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/base64_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/binding_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/builtinfunctions_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/chmod_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/ctypes_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/directorycreation_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/dynamicimport_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/exception_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/ftp_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/hash_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/httpserver_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/input_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/loggingconf_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/marshal_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/mktemp_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/multiprocessing_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/pickle_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/random_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/shelve_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/shutil_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/subprocess_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/syscalls_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/systemcalls_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/tarfile_extract_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/xml_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checks/zipfile_check.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/checksinformation.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/cimode.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/codeauditchecks.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/codeauditoverview.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/complexitycheck.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/data_egress_implementation.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/data_exfiltration_detection.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_api_example_basic.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_api_example_checks.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_api_example_json.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_api_example_overview.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_api_example_scanning.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/ca_checks.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/demofile.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/directoryscan.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/example_risk_heatmap.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/example_weakness_perfile_view.ipynb +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/filescan.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/modulescan.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/examples/overview.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/features.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/filescan.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/filescan.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/handling_errors.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/help.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/howtoscan.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/OO.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/ROI_logo.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/YourLogoHere.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/ai_use.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/architecture_overview.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/codeauditlogo.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/filescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/modulescan_screenshot_16012026.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/nocxbanner.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/overview_linkaudit.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/images/overview_screenshot_16012026.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/implementedvalidations.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/installation.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/issues.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/license.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/makeitbetter.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/markingissues.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/modulescan.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/overviewplot.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/pca_overview.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/project_philosophy.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/sponsors.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/userguide.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/warnings.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/whatissast.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/docs/whysast.md +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/filescan.png +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/__init__.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/api_reporting.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/benchmark_helpfunctions.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/checkmodules.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/ci_workflowscan.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/complexitycheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/corecli.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/data/sastchecks.csv +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/data/secretslist.txt +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/issuevalidations.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/privacy_lint.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/security_checks.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/simple.css +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/suppression.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/codeaudit/totals.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/dashboard/__init__.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/dashboard/module_load_validation.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/src/dashboard/module_load_validation2.html +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/__init__.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/invalidpython/ddos_blockingCPython_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/assert.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/assert_check.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/base64.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/binding.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/bz2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/compile.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/ctypes_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/ddos_blockingCPython_example2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/ddos_blockingCPython_example3.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/eval_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/exceptionhandling.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/exec_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/fileoperations.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/filepermissions.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/forkbomb_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/ftp.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/getattr_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/homoglyphs_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/httpserver.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/import_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/input_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/log4shell_pattern.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/logging.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/lzma_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/lzma_open.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/marshal.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/multiprocessing.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/obfuscation_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/obfuscation_example2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/obfuscation_example3.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/os_examples.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/os_execution.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/os_pseudo_fork.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/osforking.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/pickle_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/random.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/sha_examples.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/shelve.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/shutil_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/subprocess.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/syscalls.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/tarfile_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/tempfile_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/vulnerable_parse.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/xmlrpc.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/zipfile_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/zipfile_example2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/benchmarkfiles/validpython/zstd.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/count_lines_file1.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/clean.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/elastic.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/example1.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/klyne.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/mixed.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/telemetry.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/spytestdir/telemetryfile2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/suppression/sastsuppression_0.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/suppression/sastsuppression_1.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/suppression/sastsuppression_2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_apicalls.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_apicalls2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_base64.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_basicpatterns.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_benchmark.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_chmod.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_constructspart2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_correctexceptionuse.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_count_commentlines.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_ctypes_detection.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_directorycreation.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_directorycreation2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_dynamic_import.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_edgecases.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_ftp.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_hashstrenght.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_importlib_util.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_modulecheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_obfuscatingbuiltins.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_oschecks.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_pylintreport.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_pypiscan.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_random.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_secretfinding.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_standardlibconstructs.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_subprocess.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_suppression.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_suppressionlogic.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_totalscheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_valid_python.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_wasmsafe_funtions.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/test_zstd.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/__init__.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_clean_import_list.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_collectsourcefiles.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_count_weaknesses.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_filehelpfunctions.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_get_weakness_counts.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_readinsourcefile.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/unit_tests/test_weakness_count_per_file.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/allshit.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/apivalidations.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/assert.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/base64.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/chmod_things.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/codeaudit_scan.json +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/complexitycheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/correctcounts.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/ctypes_example.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/ctypes_example2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/danger_imports.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/directorycreation.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/directorycreation2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/dunderexec_with_parsing_error.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/eval.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/eval2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/exception.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/file3.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/file_with_warnings.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/ftp.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/gzip.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/hashcheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/httpserver.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/incorrect_python_file.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/inputstatement.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/linkaudit-0.9.9.tar.gz +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/malware.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/malwareAI.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/marshal.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/modulecheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/multiprocessing.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/obfuscating.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/oschecks.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/pickle.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/random.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/shelve.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/shutil.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/subprocess.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/syslibrary.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/tarfilevalidation.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/tempcheck.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/validation1.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/validation2.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/xml.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/zip_example.json +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/zipfile.py +0 -0
- {codeaudit-1.9.6 → codeaudit-1.10.0}/tests/validationfiles/zstd.py +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Release Notes
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '[0-9]*' # 1.0.0, 2.3.1, etc.
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Create GitHub Release
|
|
20
|
+
env:
|
|
21
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
run: |
|
|
23
|
+
# Get the previous tag (or empty if this is the first)
|
|
24
|
+
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || true)
|
|
25
|
+
|
|
26
|
+
if [ -n "$PREV_TAG" ]; then
|
|
27
|
+
NOTES=$(git log ${PREV_TAG}..HEAD --pretty=format:'* %s (%h)')
|
|
28
|
+
COMPARE="https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${GITHUB_REF_NAME}"
|
|
29
|
+
else
|
|
30
|
+
NOTES=$(git log --pretty=format:'* %s (%h)')
|
|
31
|
+
COMPARE="https://github.com/${{ github.repository }}/commits/${GITHUB_REF_NAME}"
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
{
|
|
35
|
+
echo "## What's Changed"
|
|
36
|
+
echo ""
|
|
37
|
+
echo "$NOTES"
|
|
38
|
+
echo ""
|
|
39
|
+
echo "**Full Changelog**: $COMPARE"
|
|
40
|
+
} > notes.md
|
|
41
|
+
|
|
42
|
+
gh release create "$GITHUB_REF_NAME" \
|
|
43
|
+
--title "Release $GITHUB_REF_NAME" \
|
|
44
|
+
--notes-file notes.md
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 1.10.0:
|
|
4
|
+
|
|
5
|
+
**Added**
|
|
6
|
+
|
|
7
|
+
* Added an extra keyword tag in `pyproject.toml` to support AI bots searching for tools.
|
|
8
|
+
* Added a GitHub Action to automate the creation of release notes.
|
|
9
|
+
|
|
10
|
+
**Changed**
|
|
11
|
+
|
|
12
|
+
* Updated and validated compatibility with `fileaudit` version `0.2.6`, and updated `pyproject.toml` accordingly.
|
|
13
|
+
|
|
14
|
+
**Fixed**
|
|
15
|
+
|
|
16
|
+
* Improved error handling in the `filescan` API when processing valid `.tar.gz` packages that contain no Python files.
|
|
17
|
+
* Improved `filescan` API support for valid PyPI packages that only provide `.whl` (wheel) distributions and no source distribution (`sdist`).
|
|
18
|
+
* Fixed an issue in the WASM version when handling PyPI packages that contain no Python files (such as metapackages that only list dependencies).
|
|
19
|
+
|
|
20
|
+
**Documentation**
|
|
21
|
+
|
|
22
|
+
* Added the [DOI](https://zenodo.org/records/24402976) badge/reference to the documentation.
|
|
23
|
+
|
|
3
24
|
## Version 1.9.6:
|
|
4
25
|
|
|
5
26
|
**Fixed**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codeaudit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.10.0
|
|
4
4
|
Summary: A modern Python security source code analyzer (SAST) based on distrust.
|
|
5
5
|
Project-URL: Homepage, https://codeaudit.nocomplexity.com
|
|
6
6
|
Project-URL: Documentation, https://github.com/nocomplexity/codeaudit#readme
|
|
@@ -9,7 +9,7 @@ Project-URL: Source, https://github.com/nocomplexity/codeaudit
|
|
|
9
9
|
Author-email: Maikel Mardjan <mike@bm-support.org>
|
|
10
10
|
License-Expression: GPL-3.0-or-later
|
|
11
11
|
License-File: LICENSE.txt
|
|
12
|
-
Keywords: Complexity Checker,Python SAST,SAST,SAST API
|
|
12
|
+
Keywords: Application Security,Complexity Checker,Python SAST,SAST,SAST API
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Environment :: Console
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Security
|
|
|
23
23
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
24
|
Requires-Python: >=3.12
|
|
25
25
|
Requires-Dist: altair==6.0.0
|
|
26
|
-
Requires-Dist: fileaudit==0.2.
|
|
26
|
+
Requires-Dist: fileaudit==0.2.6
|
|
27
27
|
Requires-Dist: fire==0.7.1
|
|
28
28
|
Requires-Dist: pandas>=2.3
|
|
29
29
|
Provides-Extra: test
|
|
@@ -43,6 +43,7 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
[](https://pypi.org/project/codeaudit)
|
|
44
44
|
[](https://www.bestpractices.dev/projects/10970)
|
|
45
45
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
46
|
+
[](https://doi.org/10.5281/zenodo.24402976)
|
|
46
47
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
47
48
|
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
48
49
|
[](https://pepy.tech/projects/codeaudit)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[](https://pypi.org/project/codeaudit)
|
|
8
8
|
[](https://www.bestpractices.dev/projects/10970)
|
|
9
9
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
10
|
+
[](https://doi.org/10.5281/zenodo.24402976)
|
|
10
11
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
11
12
|
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
12
13
|
[](https://pepy.tech/projects/codeaudit)
|
|
@@ -26,6 +26,9 @@ If you are interested in learning more about architecture—and especially open
|
|
|
26
26
|
|
|
27
27
|

|
|
28
28
|
|
|
29
|
+
More in-depth:
|
|
30
|
+

|
|
31
|
+
|
|
29
32
|
|
|
30
33
|
## Architecture Principles
|
|
31
34
|
|
|
@@ -86,4 +89,8 @@ For Python Code Audit we make use of AI/ML capabilities in a secure, safe and mo
|
|
|
86
89
|
In the view below is outlined how AI/ML technology is used for the development of Python Code Audit.
|
|
87
90
|
Truth is: Most AI tools turned out to be of limited value for real trustworthy cybersecurity aspects. Human knowledge work, especially on design and security aspects is currently still vital for developing and maintaining a trustworthy Python security code analyzer!
|
|
88
91
|
|
|
89
|
-

|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
## Further Reading
|
|
95
|
+
|
|
96
|
+
For the rationale and background behind **Python Code Audit (`codeaudit`)**, see the [Zenodo record](https://zenodo.org/records/24402976).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Citing
|
|
2
|
+
|
|
3
|
+
## Python Code Audit(codeaudit)
|
|
4
|
+
|
|
5
|
+
[](https://doi.org/10.5281/zenodo.24402976)
|
|
6
|
+
|
|
7
|
+
If you use Python Code Audit(codeaudit) in academic work, please consider citing
|
|
8
|
+
[Python Code Audit (codeaudit): A Modern, Distrust-Based Static Application Security Testing Tool](https://doi.org/10.5281/zenodo.24402975) as:
|
|
9
|
+
|
|
10
|
+
```bibtex
|
|
11
|
+
@misc{mardjan_2026_24402976,
|
|
12
|
+
author = {Mardjan, Maikel},
|
|
13
|
+
title = {Python Code Audit (codeaudit): A Modern, Distrust-
|
|
14
|
+
Based Static Application Security Testing Tool
|
|
15
|
+
},
|
|
16
|
+
month = nov,
|
|
17
|
+
year = 2026,
|
|
18
|
+
publisher = {Zenodo},
|
|
19
|
+
doi = {10.5281/zenodo.24402976},
|
|
20
|
+
url = {https://doi.org/10.5281/zenodo.24402976},
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
@@ -810,4 +810,4 @@ footer {
|
|
|
810
810
|
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
|
|
811
811
|
</tr>
|
|
812
812
|
</tbody>
|
|
813
|
-
</table><br><p>Number of implemented security validations:<b>95</b></p><p>Version of codeaudit: <b>1.
|
|
813
|
+
</table><br><p>Number of implemented security validations:<b>95</b></p><p>Version of codeaudit: <b>1.10.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-12-02 10:46</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.10.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>
|
|
Binary file
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[](https://pypi.org/project/codeaudit)
|
|
6
6
|
[](https://nocomplexity.com/documents/codeaudit/intro.html)
|
|
7
7
|
[](https://nocomplexity.com/documents/codeaudit/license.html)
|
|
8
|
+
[](https://doi.org/10.5281/zenodo.24402976)
|
|
8
9
|
[](https://nocomplexity.com/codeauditapp/dashboardapp.html)
|
|
9
10
|
|
|
10
11
|
|
|
@@ -7,10 +7,10 @@ name = "codeaudit"
|
|
|
7
7
|
dynamic = ["version"] # This tells Hatch that version is dynamically determined
|
|
8
8
|
description = 'A modern Python security source code analyzer (SAST) based on distrust.'
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
dependencies = ["fire==0.7.1","pandas>=2.3","altair==6.0.0","fileaudit==0.2.
|
|
10
|
+
dependencies = ["fire==0.7.1","pandas>=2.3","altair==6.0.0","fileaudit==0.2.6"]
|
|
11
11
|
requires-python = ">=3.12"
|
|
12
12
|
license = "GPL-3.0-or-later"
|
|
13
|
-
keywords = ["SAST", "Python SAST", "SAST API", "Complexity Checker"]
|
|
13
|
+
keywords = ["SAST", "Python SAST", "SAST API", "Complexity Checker","Application Security"]
|
|
14
14
|
authors = [
|
|
15
15
|
{ name = "Maikel Mardjan", email = "mike@bm-support.org" },
|
|
16
16
|
]
|
|
@@ -18,8 +18,11 @@ import pandas as pd
|
|
|
18
18
|
|
|
19
19
|
from collections import Counter
|
|
20
20
|
from pathlib import Path
|
|
21
|
-
from codeaudit.api_interfaces import
|
|
22
|
-
|
|
21
|
+
from codeaudit.api_interfaces import (
|
|
22
|
+
get_weakness_counts,
|
|
23
|
+
get_weakness_counts_per_file_detailed,
|
|
24
|
+
)
|
|
25
|
+
|
|
23
26
|
|
|
24
27
|
def module_count_barchart(scanresult):
|
|
25
28
|
"""Create a bar chart showing module counts by category.
|
|
@@ -691,7 +694,7 @@ def weaknesses_overview(scanresult):
|
|
|
691
694
|
.encode(text="msg:N")
|
|
692
695
|
)
|
|
693
696
|
# --- Count every validation across all files ---
|
|
694
|
-
counter = Counter(get_weakness_counts(scanresult))
|
|
697
|
+
counter = Counter(get_weakness_counts(scanresult))
|
|
695
698
|
|
|
696
699
|
if not counter:
|
|
697
700
|
return (
|
|
@@ -813,20 +816,16 @@ def weaknesses_overview(scanresult):
|
|
|
813
816
|
|
|
814
817
|
|
|
815
818
|
def sast_files_overview(scanresult):
|
|
816
|
-
"""Create a bar chart of security issues per file.
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
parent folder when duplicates exist.
|
|
821
|
-
|
|
822
|
-
Args:
|
|
823
|
-
scanresult (dict): Scan result containing "file_security_info"
|
|
824
|
-
with per-file SAST findings and metadata.
|
|
819
|
+
"""Create a bar chart of security issues per file, limited to the top 50 files.
|
|
820
|
+
Args:
|
|
821
|
+
scanresult (dict): Scan result containing ``file_security_info`` and optionally
|
|
822
|
+
``package_name``.
|
|
825
823
|
|
|
826
824
|
Returns:
|
|
827
|
-
|
|
828
|
-
|
|
825
|
+
alt.Chart: Bar chart of files with security issues, or a text chart when the
|
|
826
|
+
input is invalid or no findings are available.
|
|
829
827
|
"""
|
|
828
|
+
|
|
830
829
|
if not isinstance(scanresult, dict) or not scanresult:
|
|
831
830
|
return (
|
|
832
831
|
alt.Chart(pd.DataFrame({"msg": ["⚠️ No scan result"]}))
|
|
@@ -835,6 +834,7 @@ def sast_files_overview(scanresult):
|
|
|
835
834
|
)
|
|
836
835
|
|
|
837
836
|
file_security_info = scanresult.get("file_security_info")
|
|
837
|
+
|
|
838
838
|
if not isinstance(file_security_info, dict) or not file_security_info:
|
|
839
839
|
return (
|
|
840
840
|
alt.Chart(pd.DataFrame({"msg": ["⚠️ No file security info found"]}))
|
|
@@ -842,32 +842,7 @@ def sast_files_overview(scanresult):
|
|
|
842
842
|
.encode(text="msg:N")
|
|
843
843
|
)
|
|
844
844
|
|
|
845
|
-
records =
|
|
846
|
-
for file_info in file_security_info.values():
|
|
847
|
-
if not isinstance(file_info, dict):
|
|
848
|
-
continue
|
|
849
|
-
|
|
850
|
-
sast_result = file_info.get("sast_result")
|
|
851
|
-
if not isinstance(sast_result, dict) or not sast_result:
|
|
852
|
-
continue
|
|
853
|
-
|
|
854
|
-
filepath = file_info.get("FilePath") or file_info.get("file_name", "")
|
|
855
|
-
path_obj = Path(str(filepath))
|
|
856
|
-
|
|
857
|
-
base_name = file_info.get("FileName") or path_obj.name or "Unknown"
|
|
858
|
-
parent_folder = path_obj.parent.name if len(path_obj.parts) > 1 else None
|
|
859
|
-
if parent_folder in ("", ".", "/"):
|
|
860
|
-
parent_folder = None
|
|
861
|
-
|
|
862
|
-
records.append(
|
|
863
|
-
{
|
|
864
|
-
"base_name": base_name,
|
|
865
|
-
"parent_folder": parent_folder,
|
|
866
|
-
"full_path": str(filepath),
|
|
867
|
-
"issues": total_weaknesses(scanresult),
|
|
868
|
-
"complexity": file_info.get("Complexity_Score", 0),
|
|
869
|
-
}
|
|
870
|
-
)
|
|
845
|
+
records = get_weakness_counts_per_file_detailed(scanresult)
|
|
871
846
|
|
|
872
847
|
if not records:
|
|
873
848
|
return (
|
|
@@ -878,19 +853,45 @@ def sast_files_overview(scanresult):
|
|
|
878
853
|
|
|
879
854
|
df = pd.DataFrame(records)
|
|
880
855
|
|
|
881
|
-
# ---
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
856
|
+
# --- Validate and normalize data ---
|
|
857
|
+
required_columns = {"base_name", "file_path", "issues"}
|
|
858
|
+
|
|
859
|
+
if not required_columns.issubset(df.columns):
|
|
860
|
+
return (
|
|
861
|
+
alt.Chart(pd.DataFrame({"msg": ["⚠️ Invalid file security data"]}))
|
|
862
|
+
.mark_text(size=14)
|
|
863
|
+
.encode(text="msg:N")
|
|
888
864
|
)
|
|
889
|
-
for i, row in df.iterrows()
|
|
890
|
-
]
|
|
891
865
|
|
|
892
|
-
|
|
893
|
-
|
|
866
|
+
df["issues"] = pd.to_numeric(df["issues"], errors="coerce").fillna(0)
|
|
867
|
+
|
|
868
|
+
df["file_path"] = df["file_path"].fillna("").astype(str)
|
|
869
|
+
df["base_name"] = df["base_name"].fillna("").astype(str)
|
|
870
|
+
|
|
871
|
+
# --- Smart labeling for duplicates ---
|
|
872
|
+
name_counts = df.groupby("base_name")["file_path"].transform("count")
|
|
873
|
+
|
|
874
|
+
df["display_name"] = df["base_name"]
|
|
875
|
+
|
|
876
|
+
duplicate_names = name_counts > 1
|
|
877
|
+
|
|
878
|
+
df.loc[duplicate_names, "display_name"] = (
|
|
879
|
+
df.loc[duplicate_names, "file_path"].apply(lambda p: str(Path(p).parent))
|
|
880
|
+
+ "/"
|
|
881
|
+
+ df.loc[duplicate_names, "base_name"]
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
# Guarantee unique labels using the complete path if necessary.
|
|
885
|
+
duplicate_labels = df["display_name"].duplicated(keep=False)
|
|
886
|
+
|
|
887
|
+
df.loc[duplicate_labels, "display_name"] = df.loc[duplicate_labels, "file_path"]
|
|
888
|
+
# --- Sort by issue count, keep top 50 files with issues > 0 ---
|
|
889
|
+
df = (
|
|
890
|
+
df[df["issues"] > 0]
|
|
891
|
+
.sort_values("issues", ascending=False)
|
|
892
|
+
.head(50)
|
|
893
|
+
.reset_index(drop=True)
|
|
894
|
+
)
|
|
894
895
|
|
|
895
896
|
# --- Chart ---
|
|
896
897
|
base_chart = alt.Chart(df).encode(
|
|
@@ -898,10 +899,15 @@ def sast_files_overview(scanresult):
|
|
|
898
899
|
"display_name:N",
|
|
899
900
|
sort="-x",
|
|
900
901
|
title=None,
|
|
901
|
-
axis=alt.Axis(
|
|
902
|
+
axis=alt.Axis(
|
|
903
|
+
labelLimit=420,
|
|
904
|
+
labelFontSize=12,
|
|
905
|
+
),
|
|
902
906
|
),
|
|
903
907
|
x=alt.X(
|
|
904
|
-
"issues:Q",
|
|
908
|
+
"issues:Q",
|
|
909
|
+
title="Number of Security Issues",
|
|
910
|
+
axis=alt.Axis(tickMinStep=1),
|
|
905
911
|
),
|
|
906
912
|
color=alt.Color(
|
|
907
913
|
"issues:Q",
|
|
@@ -911,22 +917,31 @@ def sast_files_overview(scanresult):
|
|
|
911
917
|
tooltip=[
|
|
912
918
|
alt.Tooltip("display_name:N", title="File"),
|
|
913
919
|
alt.Tooltip("issues:Q", title="Security Issues"),
|
|
914
|
-
alt.Tooltip("
|
|
915
|
-
alt.Tooltip("full_path:N", title="Full Path"),
|
|
920
|
+
alt.Tooltip("file_path:N", title="Full Path"),
|
|
916
921
|
],
|
|
917
922
|
)
|
|
918
923
|
|
|
919
|
-
bars = base_chart.mark_bar(
|
|
924
|
+
bars = base_chart.mark_bar(
|
|
925
|
+
cornerRadiusEnd=6,
|
|
926
|
+
size=22,
|
|
927
|
+
)
|
|
920
928
|
|
|
921
929
|
labels = base_chart.mark_text(
|
|
922
|
-
align="left",
|
|
930
|
+
align="left",
|
|
931
|
+
baseline="middle",
|
|
932
|
+
dx=8,
|
|
933
|
+
fontSize=12,
|
|
934
|
+
fontWeight="bold",
|
|
923
935
|
).encode(text="issues:Q")
|
|
924
936
|
|
|
925
937
|
chart = (
|
|
926
938
|
(bars + labels)
|
|
927
939
|
.properties(
|
|
928
940
|
title=alt.TitleParams(
|
|
929
|
-
text=
|
|
941
|
+
text=(
|
|
942
|
+
"Files with Security Issues — "
|
|
943
|
+
f"{scanresult.get('package_name', 'Unknown Package')}"
|
|
944
|
+
),
|
|
930
945
|
subtitle=f"Total files with findings: {len(df)}",
|
|
931
946
|
anchor="start",
|
|
932
947
|
fontSize=16,
|
|
@@ -937,7 +952,10 @@ def sast_files_overview(scanresult):
|
|
|
937
952
|
)
|
|
938
953
|
.configure_view(stroke=None)
|
|
939
954
|
.configure_axis(
|
|
940
|
-
grid=True,
|
|
955
|
+
grid=True,
|
|
956
|
+
gridColor="#f0f0f0",
|
|
957
|
+
labelFontSize=12,
|
|
958
|
+
titleFontSize=13,
|
|
941
959
|
)
|
|
942
960
|
)
|
|
943
961
|
|
|
@@ -966,8 +984,8 @@ def weaknesses_radial_overview(scanresult):
|
|
|
966
984
|
)
|
|
967
985
|
|
|
968
986
|
# --- Count every 'validation' across all files ---
|
|
969
|
-
counter = Counter(get_weakness_counts(scanresult))
|
|
970
|
-
|
|
987
|
+
counter = Counter(get_weakness_counts(scanresult))
|
|
988
|
+
|
|
971
989
|
if not counter:
|
|
972
990
|
return (
|
|
973
991
|
alt.Chart(
|
|
@@ -12,6 +12,8 @@ You should have received a copy of the GNU General Public License along with thi
|
|
|
12
12
|
Function to create nice APIs. So API helper functions.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
15
17
|
from codeaudit.api_interfaces import (
|
|
16
18
|
get_modules,
|
|
17
19
|
get_overview,
|
|
@@ -59,9 +61,10 @@ def _codeaudit_directory_scan_wasm(input_path, nosec_flag):
|
|
|
59
61
|
|
|
60
62
|
output = {}
|
|
61
63
|
file_output = {}
|
|
64
|
+
abs_path = str(Path(input_path).resolve())
|
|
62
65
|
|
|
63
66
|
try:
|
|
64
|
-
files_to_check = collect_python_source_files(
|
|
67
|
+
files_to_check = collect_python_source_files(abs_path)
|
|
65
68
|
except Exception as e:
|
|
66
69
|
return {"Error": f"Failed to collect Python files: {str(e)}"}
|
|
67
70
|
|
|
@@ -138,8 +138,10 @@ def filescan(input_path, nosec=False):
|
|
|
138
138
|
output |= {"package_name": package_name}
|
|
139
139
|
scan_output = _codeaudit_directory_scan(input_path, nosec_flag=nosec)
|
|
140
140
|
output |= scan_output
|
|
141
|
-
return output
|
|
142
|
-
elif file_path.name.endswith(".py") and is_ast_parsable(
|
|
141
|
+
return output
|
|
142
|
+
elif file_path.name.endswith(".py") and is_ast_parsable(
|
|
143
|
+
input_path
|
|
144
|
+
): # check on parsable single Python file
|
|
143
145
|
# do a file check
|
|
144
146
|
file_information = overview_per_file(input_path)
|
|
145
147
|
module_information = get_modules(input_path) # modules per file
|
|
@@ -156,13 +158,14 @@ def filescan(input_path, nosec=False):
|
|
|
156
158
|
output |= {"package_name": package_name}
|
|
157
159
|
scan_output = _codeaudit_directory_scan(src_dir, nosec_flag=nosec)
|
|
158
160
|
output |= scan_output
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
if not "Error" in output:
|
|
162
|
+
# Replace the value of "imported_modules" in the nested dict
|
|
163
|
+
correct_imported_modules = package_imports(output)
|
|
164
|
+
output["module_overview"]["imported_modules"] = correct_imported_modules
|
|
165
|
+
# correct statistics for modules count in a package
|
|
166
|
+
output["statistics_overview"]["External Modules"] = len(
|
|
167
|
+
correct_imported_modules
|
|
168
|
+
)
|
|
166
169
|
finally:
|
|
167
170
|
# Cleaning up temp directory
|
|
168
171
|
tmp_handle.cleanup() # deletes everything from temp directory
|
|
@@ -187,18 +190,22 @@ def filescan(input_path, nosec=False):
|
|
|
187
190
|
try:
|
|
188
191
|
scan_output = _codeaudit_directory_scan(src_dir, nosec_flag=nosec)
|
|
189
192
|
output |= scan_output
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
correct_imported_modules
|
|
196
|
-
|
|
193
|
+
if not "Error" in output:
|
|
194
|
+
# Replace the value of "imported_modules" in the nested dict
|
|
195
|
+
correct_imported_modules = package_imports(output)
|
|
196
|
+
output["module_overview"][
|
|
197
|
+
"imported_modules"
|
|
198
|
+
] = correct_imported_modules
|
|
199
|
+
# correct statistics for modules count in a package
|
|
200
|
+
output["statistics_overview"]["External Modules"] = len(
|
|
201
|
+
correct_imported_modules
|
|
202
|
+
)
|
|
197
203
|
finally:
|
|
198
204
|
# Cleaning up temp directory
|
|
199
205
|
tmp_handle.cleanup() # deletes everything from temp directory
|
|
200
206
|
return output
|
|
201
|
-
|
|
207
|
+
else:
|
|
208
|
+
return {"Error": "No sdist on PyPI"}
|
|
202
209
|
else:
|
|
203
210
|
# Its not a directory nor a valid Python file:
|
|
204
211
|
return {"Error": SCAN_ERROR}
|
|
@@ -312,6 +319,7 @@ def read_input_file(filename, safe_directory="data_folder"):
|
|
|
312
319
|
except json.JSONDecodeError as e:
|
|
313
320
|
raise json.JSONDecodeError(f"Invalid JSON in file: {file_path}", e.doc, e.pos)
|
|
314
321
|
|
|
322
|
+
|
|
315
323
|
def get_weakness_counts(input_file, nosec=False):
|
|
316
324
|
"""Count SAST weaknesses from a scan result or by scanning a file/package.
|
|
317
325
|
|
|
@@ -330,7 +338,7 @@ def get_weakness_counts(input_file, nosec=False):
|
|
|
330
338
|
|
|
331
339
|
Raises:
|
|
332
340
|
ValueError: If the scan result is invalid or contains an error.
|
|
333
|
-
"""
|
|
341
|
+
"""
|
|
334
342
|
# Accept an existing scan result or scan a file/package
|
|
335
343
|
if isinstance(input_file, dict):
|
|
336
344
|
scan_result = input_file
|
|
@@ -541,7 +549,7 @@ def get_default_validations():
|
|
|
541
549
|
def get_weakness_counts_per_file(scanresult):
|
|
542
550
|
"""Creates an overview of the SAST scan: Number of weaknesses per file.
|
|
543
551
|
|
|
544
|
-
Aggregates SAST findings
|
|
552
|
+
Aggregates SAST findings
|
|
545
553
|
|
|
546
554
|
Args:
|
|
547
555
|
scanresult (dict): Scan result containing "file_security_info"
|
|
@@ -549,7 +557,52 @@ def get_weakness_counts_per_file(scanresult):
|
|
|
549
557
|
|
|
550
558
|
Returns:
|
|
551
559
|
result (dict): Just number of weaknesses per file scanned
|
|
552
|
-
"""
|
|
560
|
+
"""
|
|
561
|
+
file_security_info = scanresult.get("file_security_info")
|
|
562
|
+
if not isinstance(file_security_info, dict) or not file_security_info:
|
|
563
|
+
return None
|
|
564
|
+
|
|
565
|
+
records = []
|
|
566
|
+
for file_info in file_security_info.values():
|
|
567
|
+
if not isinstance(file_info, dict):
|
|
568
|
+
continue
|
|
569
|
+
|
|
570
|
+
sast_result = file_info.get("sast_result")
|
|
571
|
+
if not isinstance(sast_result, dict):
|
|
572
|
+
continue
|
|
573
|
+
|
|
574
|
+
filepath = file_info.get("FilePath") or file_info.get("file_name", "")
|
|
575
|
+
path_obj = Path(str(filepath))
|
|
576
|
+
|
|
577
|
+
base_name = file_info.get("FileName") or path_obj.name or "Unknown"
|
|
578
|
+
parent_folder = path_obj.parent.name if len(path_obj.parts) > 1 else None
|
|
579
|
+
if parent_folder in ("", ".", "/"):
|
|
580
|
+
parent_folder = None
|
|
581
|
+
|
|
582
|
+
records.append(
|
|
583
|
+
{
|
|
584
|
+
"base_name": base_name,
|
|
585
|
+
"issues": len(sast_result),
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
if not records:
|
|
589
|
+
return None
|
|
590
|
+
return records
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
def get_weakness_counts_per_file_detailed(scanresult):
|
|
594
|
+
"""Build per-file weakness records from a SAST scan result.
|
|
595
|
+
|
|
596
|
+
Args:
|
|
597
|
+
scanresult (dict): Scan result containing a ``file_security_info`` mapping.
|
|
598
|
+
Each value may include metadata such as ``FilePath``/``file_name`` and
|
|
599
|
+
``FileName``, plus a ``sast_result`` mapping of findings for that file.
|
|
600
|
+
|
|
601
|
+
Returns:
|
|
602
|
+
list[dict] | None: One record per scanned file, with keys ``base_name``,
|
|
603
|
+
``file_path`` (a ``pathlib.Path``), and ``issues`` (number of findings).
|
|
604
|
+
Returns ``None`` when no file security info or no records are available.
|
|
605
|
+
"""
|
|
553
606
|
file_security_info = scanresult.get("file_security_info")
|
|
554
607
|
if not isinstance(file_security_info, dict) or not file_security_info:
|
|
555
608
|
return None
|
|
@@ -573,8 +626,9 @@ def get_weakness_counts_per_file(scanresult):
|
|
|
573
626
|
|
|
574
627
|
records.append(
|
|
575
628
|
{
|
|
576
|
-
"base_name": base_name,
|
|
577
|
-
"
|
|
629
|
+
"base_name": base_name,
|
|
630
|
+
"file_path": path_obj,
|
|
631
|
+
"issues": len(sast_result),
|
|
578
632
|
}
|
|
579
633
|
)
|
|
580
634
|
if not records:
|