codeaudit 0.5.5__tar.gz → 0.6.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.
Files changed (122) hide show
  1. {codeaudit-0.5.5 → codeaudit-0.6.0}/PKG-INFO +18 -13
  2. {codeaudit-0.5.5 → codeaudit-0.6.0}/README.md +17 -12
  3. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/codeauditcommands.md +1 -1
  4. codeaudit-0.6.0/docs/features.md +54 -0
  5. codeaudit-0.6.0/docs/intro.md +51 -0
  6. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/userguide.md +4 -1
  7. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/whysast.md +16 -8
  8. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/__about__.py +1 -1
  9. codeaudit-0.5.5/docs/features.md +0 -27
  10. codeaudit-0.5.5/docs/intro.md +0 -43
  11. {codeaudit-0.5.5 → codeaudit-0.6.0}/.gitignore +0 -0
  12. {codeaudit-0.5.5 → codeaudit-0.6.0}/CONTRIBUTE.md +0 -0
  13. {codeaudit-0.5.5 → codeaudit-0.6.0}/LICENSE.txt +0 -0
  14. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/CLIcommands.ipynb +0 -0
  15. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/CONTRIBUTE.md +0 -0
  16. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/_config.yml +0 -0
  17. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/_static/nocxstyle.css +0 -0
  18. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/_toc.yml +0 -0
  19. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/about.md +0 -0
  20. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/astlines.md +0 -0
  21. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/astlines2.md +0 -0
  22. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/assert_check.md +0 -0
  23. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/base64_check.md +0 -0
  24. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/binding_check.md +0 -0
  25. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/builtinfunctions_check.md +0 -0
  26. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/chmod_check.md +0 -0
  27. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/directorycreation_check.md +0 -0
  28. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/exception_check.md +0 -0
  29. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/hash_check.md +0 -0
  30. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/httpserver_check.md +0 -0
  31. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/input_check.md +0 -0
  32. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/loggingconf_check.md +0 -0
  33. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/marshal_check.md +0 -0
  34. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/multiprocessing_check.md +0 -0
  35. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/pickle_check.md +0 -0
  36. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/random_check.md +0 -0
  37. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/shelve_check.md +0 -0
  38. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/shutil_check.md +0 -0
  39. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/subprocess_check.md +0 -0
  40. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/systemcalls_check.md +0 -0
  41. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/tarfile_extract_check.md +0 -0
  42. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/xml_check.md +0 -0
  43. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checks/zipfile_check.md +0 -0
  44. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/checksinformation.md +0 -0
  45. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/codeauditchecks.md +0 -0
  46. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/codeauditoverview.md +0 -0
  47. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/complexitycheck.md +0 -0
  48. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/directoryscan.md +0 -0
  49. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/examples/checks_example.html +0 -0
  50. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/examples/directoryscan.html +0 -0
  51. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/examples/filescan.html +0 -0
  52. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/examples/modulescan.html +0 -0
  53. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/examples/overview.html +0 -0
  54. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/filescan.md +0 -0
  55. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/filescan.png +0 -0
  56. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/help.md +0 -0
  57. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/OO.png +0 -0
  58. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/ROI_logo.png +0 -0
  59. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/YourLogoHere.png +0 -0
  60. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/codeauditlogo.png +0 -0
  61. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/nocxbanner.png +0 -0
  62. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/images/overview_linkaudit.png +0 -0
  63. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/license.md +0 -0
  64. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/modulescan.md +0 -0
  65. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/overviewplot.png +0 -0
  66. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/sponsors.md +0 -0
  67. {codeaudit-0.5.5 → codeaudit-0.6.0}/docs/warnings.md +0 -0
  68. {codeaudit-0.5.5 → codeaudit-0.6.0}/filescan.png +0 -0
  69. {codeaudit-0.5.5 → codeaudit-0.6.0}/pyproject.toml +0 -0
  70. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/__init__.py +0 -0
  71. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/altairplots.py +0 -0
  72. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/checkmodules.py +0 -0
  73. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/codeaudit.py +0 -0
  74. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/complexitycheck.py +0 -0
  75. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/data/sastchecks.csv +0 -0
  76. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/filehelpfunctions.py +0 -0
  77. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/htmlhelpfunctions.py +0 -0
  78. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/issuevalidations.py +0 -0
  79. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/reporting.py +0 -0
  80. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/security_checks.py +0 -0
  81. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/simple.css +0 -0
  82. {codeaudit-0.5.5 → codeaudit-0.6.0}/src/codeaudit/totals.py +0 -0
  83. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/__init__.py +0 -0
  84. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/count_lines_file1.py +0 -0
  85. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_basicpatterns.py +0 -0
  86. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_chmod.py +0 -0
  87. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_constructspart2.py +0 -0
  88. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_correctexceptionuse.py +0 -0
  89. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_count_commentlines.py +0 -0
  90. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_directorycreation.py +0 -0
  91. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_directorycreation2.py +0 -0
  92. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_hashstrenght.py +0 -0
  93. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_oschecks.py +0 -0
  94. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_random.py +0 -0
  95. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/test_standardlibconstructs.py +0 -0
  96. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/allshit.py +0 -0
  97. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/assert.py +0 -0
  98. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/base64.py +0 -0
  99. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/chmod_things.py +0 -0
  100. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/directorycreation.py +0 -0
  101. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/directorycreation2.py +0 -0
  102. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/exception.py +0 -0
  103. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/file3.py +0 -0
  104. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/file_with_warnings.py +0 -0
  105. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/hashcheck.py +0 -0
  106. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/httpserver.py +0 -0
  107. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/inputstatement.py +0 -0
  108. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/marshal.py +0 -0
  109. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/modulecheck.py +0 -0
  110. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/multiprocessing.py +0 -0
  111. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/oschecks.py +0 -0
  112. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/pickle.py +0 -0
  113. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/python2_file_willnotwork.py +0 -0
  114. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/random.py +0 -0
  115. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/shelve.py +0 -0
  116. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/shutil.py +0 -0
  117. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/subprocess.py +0 -0
  118. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/tarfilevalidation.py +0 -0
  119. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/validation1.py +0 -0
  120. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/validation2.py +0 -0
  121. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/xml.py +0 -0
  122. {codeaudit-0.5.5 → codeaudit-0.6.0}/tests/validationfiles/zipfile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeaudit
3
- Version: 0.5.5
3
+ Version: 0.6.0
4
4
  Summary: Simplified static security checks for Python
5
5
  Project-URL: Documentation, https://github.com/nocomplexity/codeaudit#readme
6
6
  Project-URL: Issues, https://github.com/nocomplexity/codeaudit/issues
@@ -26,10 +26,11 @@ Description-Content-Type: text/markdown
26
26
 
27
27
  # Codeaudit
28
28
 
29
- ![CodeauditLogo](docs/images/codeauditlogo.png)
29
+ ![CodeauditLogo](https://github.com/nocomplexity/codeaudit/raw/main/docs/images/codeauditlogo.png)
30
30
 
31
31
  [![PyPI - Version](https://img.shields.io/pypi/v/codeaudit.svg)](https://pypi.org/project/codeaudit)
32
32
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/codeaudit.svg)](https://pypi.org/project/codeaudit)
33
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10970/badge)](https://www.bestpractices.dev/projects/10970)
33
34
 
34
35
  Python Codeaudit - A modern Python source code analyzer based on distrust.
35
36
 
@@ -42,24 +43,22 @@ This tool is created for:
42
43
 
43
44
 
44
45
  > [!WARNING]
45
- > Python Codeaudit is currently in *beta status*. Consider [contributing](CONTRIBUTING.md) to make Codeaudit the coolest open source Python SAST tool. Codeaudit is currently in a thorough testing phase. So use the Codeaudit now to and contribute to make it better!
46
+ > Python Codeaudit is currently in *beta status*. Consider [contributing](CONTRIBUTING.md) to make Codeaudit the coolest open source Python SAST tool. Codeaudit is currently in a thorough testing phase. Use Python Codeaudit now and contribute to make it better!
46
47
 
47
48
  ## Features
48
49
 
49
50
  Python Codeaudit has the following features:
50
51
 
51
- * Detecting and reporting potential vulnerabilities of from all Python files collected in a directory. This is a must **do** check when researching python packages on possible security issues.
52
+ * **Vulnerability Detection**: Identifies security vulnerabilities in Python files, essential for package security research.
52
53
 
53
- * Detect and reports complexity and statistics relevant for security per Python file or from Python files found in a directory.
54
+ * **Complexity & Statistics**: Reports security-relevant complexity using a fast, lightweight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count via Python's AST.
54
55
 
55
- * Python Codeaudit implements a light weight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count, using Python’s Abstract Syntax Tree module. The codeaudit complexity check is designed to determine security risks in Python files very quick!
56
+ * **Module Usage & External Vulnerabilities**: Detects used modules and reports vulnerabilities in external ones.
56
57
 
58
+ * **Inline Issue Reporting**: Shows potential security issues with line numbers and code snippets.
57
59
 
58
- * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is reported.
60
+ * **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
59
61
 
60
- * Detecting and reporting potential vulnerability issues within a Python file. Per detected issue the line number shown, with the lines that *could* cause a security issue.
61
-
62
- * All output is saved in simple static HTML-reports. These reports can be examined in every browser.
63
62
 
64
63
 
65
64
  > [!IMPORTANT]
@@ -129,10 +128,16 @@ Per line a the in construct that can cause a security risks is shown, along with
129
128
 
130
129
  To scan a Python file on possible security issues, do:
131
130
 
132
- ```
133
- codeaudit filescan ./codeaudit/tests/validationfiles/allshit.py
131
+ ```bash
132
+ codeaudit filescan ../codeaudit/tests/validationfiles/allshit.py
133
+
134
+ =====================================================================
134
135
  Codeaudit report file created!
135
- Check the report file: file:///home/jamesbrown/tmp/codeaudit-report.html
136
+ Paste the line below directly into your browser bar:
137
+ file:///home/usainbolt/tmp/codeaudit-report.html
138
+
139
+ =====================================================================
140
+
136
141
  ```
137
142
 
138
143
  ![Example view of filescan report](filescan.png)
@@ -1,9 +1,10 @@
1
1
  # Codeaudit
2
2
 
3
- ![CodeauditLogo](docs/images/codeauditlogo.png)
3
+ ![CodeauditLogo](https://github.com/nocomplexity/codeaudit/raw/main/docs/images/codeauditlogo.png)
4
4
 
5
5
  [![PyPI - Version](https://img.shields.io/pypi/v/codeaudit.svg)](https://pypi.org/project/codeaudit)
6
6
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/codeaudit.svg)](https://pypi.org/project/codeaudit)
7
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10970/badge)](https://www.bestpractices.dev/projects/10970)
7
8
 
8
9
  Python Codeaudit - A modern Python source code analyzer based on distrust.
9
10
 
@@ -16,24 +17,22 @@ This tool is created for:
16
17
 
17
18
 
18
19
  > [!WARNING]
19
- > Python Codeaudit is currently in *beta status*. Consider [contributing](CONTRIBUTING.md) to make Codeaudit the coolest open source Python SAST tool. Codeaudit is currently in a thorough testing phase. So use the Codeaudit now to and contribute to make it better!
20
+ > Python Codeaudit is currently in *beta status*. Consider [contributing](CONTRIBUTING.md) to make Codeaudit the coolest open source Python SAST tool. Codeaudit is currently in a thorough testing phase. Use Python Codeaudit now and contribute to make it better!
20
21
 
21
22
  ## Features
22
23
 
23
24
  Python Codeaudit has the following features:
24
25
 
25
- * Detecting and reporting potential vulnerabilities of from all Python files collected in a directory. This is a must **do** check when researching python packages on possible security issues.
26
+ * **Vulnerability Detection**: Identifies security vulnerabilities in Python files, essential for package security research.
26
27
 
27
- * Detect and reports complexity and statistics relevant for security per Python file or from Python files found in a directory.
28
+ * **Complexity & Statistics**: Reports security-relevant complexity using a fast, lightweight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count via Python's AST.
28
29
 
29
- * Python Codeaudit implements a light weight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count, using Python’s Abstract Syntax Tree module. The codeaudit complexity check is designed to determine security risks in Python files very quick!
30
+ * **Module Usage & External Vulnerabilities**: Detects used modules and reports vulnerabilities in external ones.
30
31
 
32
+ * **Inline Issue Reporting**: Shows potential security issues with line numbers and code snippets.
31
33
 
32
- * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is reported.
34
+ * **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
33
35
 
34
- * Detecting and reporting potential vulnerability issues within a Python file. Per detected issue the line number shown, with the lines that *could* cause a security issue.
35
-
36
- * All output is saved in simple static HTML-reports. These reports can be examined in every browser.
37
36
 
38
37
 
39
38
  > [!IMPORTANT]
@@ -103,10 +102,16 @@ Per line a the in construct that can cause a security risks is shown, along with
103
102
 
104
103
  To scan a Python file on possible security issues, do:
105
104
 
106
- ```
107
- codeaudit filescan ./codeaudit/tests/validationfiles/allshit.py
105
+ ```bash
106
+ codeaudit filescan ../codeaudit/tests/validationfiles/allshit.py
107
+
108
+ =====================================================================
108
109
  Codeaudit report file created!
109
- Check the report file: file:///home/jamesbrown/tmp/codeaudit-report.html
110
+ Paste the line below directly into your browser bar:
111
+ file:///home/usainbolt/tmp/codeaudit-report.html
112
+
113
+ =====================================================================
114
+
110
115
  ```
111
116
 
112
117
  ![Example view of filescan report](filescan.png)
@@ -1,6 +1,6 @@
1
1
  % THIS FILE IS GENERATED! - Use CLIcommands.ipynb to make it better!
2
2
  # Overview of Codeaudit commands
3
- Codeaudit commands for: version: 0.5.4
3
+ Codeaudit commands for: version: 0.5.5
4
4
  ```
5
5
  --------------------------------------------------
6
6
  _____ _ _ _ _
@@ -0,0 +1,54 @@
1
+ # Features
2
+
3
+ Codeaudit is a modern Python source code analyzer based on distrust.
4
+
5
+ :::{admonition} This Python Code Audit tool has the following features:
6
+ :class: tip
7
+
8
+
9
+ * **Vulnerability Detection**: Identifies security vulnerabilities in Python files, essential for package security research.
10
+
11
+ +++
12
+
13
+ * **Complexity & Statistics**: Reports security-relevant complexity using a fast, lightweight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count via Python's AST.
14
+
15
+ +++
16
+
17
+ * **Module Usage & External Vulnerabilities**: Detects used modules and reports vulnerabilities in external ones.
18
+
19
+
20
+ +++
21
+ * **Inline Issue Reporting**: Shows potential security issues with line numbers and code snippets.
22
+
23
+
24
+ +++
25
+ * **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
26
+
27
+
28
+ :::
29
+
30
+
31
+ More in detph outlined:
32
+
33
+ Codeaudit has the following features:
34
+ * Detect and reports complexity and statistics per Python file or from a directory. Collected statistics are:
35
+ * Number_Of_Files
36
+ * Number_Of_Lines
37
+ * AST_Nodes
38
+ * Number of used modules
39
+ * Functions
40
+ * Classes
41
+ * Comment_Lines
42
+
43
+ * All statistics are gathered per Python file. A summary is given for the inspected directory.
44
+
45
+ * Detect and reports which module are used within a Python file.
46
+
47
+ * Reports valuable known security information on used modules.
48
+
49
+ * Detecting and reporting **potential vulnerability issues** within a Python file.
50
+ Per detected issue the line number is given, along with the lines that *could* cause a security issue.
51
+
52
+
53
+ * Detecting and reporting potential vulnerabilities from all Python files collected in a directory.
54
+ This is typically a must check when researching python packages on possible security issues.
@@ -0,0 +1,51 @@
1
+ # Introduction
2
+
3
+ ![CodeauditLogo](images/codeauditlogo.png)
4
+
5
+ Codeaudit is a Python Static Application Security Testing (SAST) tool to find **potential security issues** in Python source files.
6
+
7
+ Codeaudit is designed to be:
8
+ * Simple to use.
9
+ * Simple to extend for various use cases.
10
+ * Powerful to determine *potential* security issues within Python code.
11
+
12
+ ## Features
13
+ :::{admonition} This Python Code Audit tool has the following features:
14
+ :class: tip
15
+
16
+
17
+ * **Vulnerability Detection**: Identifies security vulnerabilities in Python files, essential for package security research.
18
+
19
+ +++
20
+
21
+ * **Complexity & Statistics**: Reports security-relevant complexity using a fast, lightweight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) count via Python's AST.
22
+
23
+ +++
24
+
25
+ * **Module Usage & External Vulnerabilities**: Detects used modules and reports vulnerabilities in external ones.
26
+
27
+
28
+ +++
29
+ * **Inline Issue Reporting**: Shows potential security issues with line numbers and code snippets.
30
+
31
+
32
+ +++
33
+ * **HTML Reports**: All output is saved in simple, static HTML reports viewable in any browser.
34
+
35
+
36
+ :::
37
+
38
+
39
+
40
+ ## Background
41
+
42
+ There are not many good FOSS SAST tools for Python available. A good one is `Bandit`. However this `Bandit` has some constrains that makes the use not simple and lacks crucial but needed validations from a security perspective!
43
+
44
+
45
+ :::{note}
46
+ This `codeaudit` tool is designed to be fast and simple and easy to maintain library that can be extended for future needs.
47
+ :::
48
+
49
+
50
+ ```{tableofcontents}
51
+ ```
@@ -14,8 +14,11 @@ or use:
14
14
  pip install -U codeaudit
15
15
  ```
16
16
 
17
- If you have installed Codeaudit in the past and want to make sure you use the latest checks and features.
17
+ If you have installed Python Codeaudit in the past and want to make sure you use the latest checks and features.
18
18
 
19
+ :::{hint}
20
+ It is recommended to use `pip` for installation. `Hatch` is used for packaging. By default [`Hatch`](https://hatch.pypa.io/latest/config/build/#reproducible-builds) supports [reproducible builds](https://nocomplexity.com/documents/securityarchitecture/prevention/reproduciblebuilds.html#reproducible-builds).
21
+ :::
19
22
 
20
23
  ## CodeAudit commands
21
24
 
@@ -1,24 +1,32 @@
1
1
  # Why Security testing on code
2
2
 
3
- Static Application Security Testing (SAST) for Python is a **MUST**.
4
-
5
3
  :::{note}
6
- Static application security testing(SAST) for python source code is a MUST:
7
- 1. Prevent security issues when creating Python software.
8
- 2. Inspect Python code (packages, modules, etc) from other before running.
4
+ Static application security testing(SAST) for python source code is a MUST!
5
+
6
+ 1. To prevent security issues when creating Python software and
7
+ 2. To inspect downloaded Python software (packages, modules, etc) before running.
9
8
  :::
10
9
 
11
10
 
12
- Python is for one of the most used programming language to date. Especially in the AI/ML world and the cyber security world, most tools are based on Python programs. This is a consequence of the fact that the Python programming language is simple use for problem solving. And programming is fundamentally about problem-solving.
11
+ Python is for one of the most used programming language to date. Especially in the AI/ML world and the cyber security world, most tools are based on Python programs.
13
12
 
14
13
  Large and small businesses use and trust Python to run their business. Python is from security perspective a **good** choice. However even when using Python the risk on security issues is never zero.
15
14
 
16
- When creating solutions for problems creating new cyber security problems is never on the list. But creating secure software is not simple.
15
+ When creating solutions practicing [Security-By-Design](https://nocomplexity.com/documents/securitybydesign/intro.html) to prevent security issues is too often not the standard way-of-working.
16
+
17
+ :::{warning}
18
+ Creating secure software by design is not simple.
19
+ :::
20
+
17
21
 
18
- So when you create software that in potential will be used by others and will be run on different systems than yours **MUST** take security into account.
22
+ When you create software that in potential will be used by others you **MUST** take security into account.
19
23
 
24
+ :::{tip}
20
25
  Static application security testing (SAST) tools , like this `codeaudit` program **SHOULD BE** used to prevent security risks or be aware of potential risks that comes with running the software.
21
26
 
27
+ :::
28
+
29
+
22
30
  This `codeaudit` SAST tool is an advanced tool to automate reviewing source code of Python software to identify sources of potential security issues.
23
31
 
24
32
  At a function level, `codeaudit` makes use of a common technique to scan the `python` source files by making use of 'Abstract Syntax Tree' to do indepth checks of in potential vulnerable constructs.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Maikel Mardjan <mike@bm-support.org>
2
2
  #
3
3
  # SPDX-License-Identifier: GPL-3.0-or-later
4
- __version__ = "0.5.5"
4
+ __version__ = "0.6.0"
@@ -1,27 +0,0 @@
1
- # Features
2
-
3
- Codeaudit is a modern Python source code analyzer based on distrust.
4
-
5
- Codeaudit has the following features:
6
- * Detect and reports complexity and statistics per Python file or from a directory. Collected statistics are:
7
- * Number_Of_Files
8
- * Number_Of_Lines
9
- * AST_Nodes
10
- * Number of used modules
11
- * Functions
12
- * Classes
13
- * Comment_Lines
14
-
15
- All statistics are gathered per Python file. A summary is given for the inspected directory.
16
-
17
- * Detect and reports which module are used within a Python file.
18
-
19
-
20
-
21
- * Detecting and reporting potential vulnerability issues within a Python file.
22
- Per detected issue the line number is given, along with the lines that *could* cause a security issue.
23
-
24
-
25
-
26
- * Detecting and reporting potential vulnerabilities of from all Python files collected in a directory.
27
- This is typically a must check when researching python packages on possible security issues.
@@ -1,43 +0,0 @@
1
- # Introduction
2
-
3
- ![CodeauditLogo](images/codeauditlogo.png)
4
-
5
- Codeaudit is a Python Static Application Security Testing (SAST) tool to find **potential security issues** in Python source files.
6
-
7
- Codeaudit is designed to be:
8
- * Simple to use.
9
- * Simple to extend for various use cases.
10
- * Powerful to determine *potential* security issues within Python code.
11
-
12
- ## Features
13
- :::{admonition} This Python Code Audit tool has the following features:
14
- :class: tip
15
-
16
- * Detecting and reporting potential vulnerabilities of from all Python files collected in a directory. This is a must **do** check when researching python packages on possible security issues.
17
-
18
- * Detect and reports complexity and statistics relevant for security per Python file or from Python files found in a directory.
19
-
20
- * Codeaudit implements a light weight [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) using Python’s Abstract Syntax Tree module. The codeaudit implemented check is by far good enough for determining security risks in Python files very quick!
21
-
22
-
23
- * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is shown.
24
-
25
- * Detecting and reporting potential vulnerability issues within a Python file. Per detected issue the line number shown, with the lines that *could* cause a security issue.
26
-
27
- * All output is saved in simple static HTML-reports. These reports can be examined in every browser.
28
- :::
29
-
30
-
31
-
32
- ## Background
33
-
34
- There are not many FOSS SAST tools for Python available that are simple. The most used and certainly a good one is `Bandit`. However this `Bandit` has some constrains that makes the use not simple and lacks crucial but needed validations.
35
-
36
-
37
- :::{note}
38
- This `codeaudit` tool is designed to be fast and simple and easy to maintain library that can be extended for future needs.
39
- :::
40
-
41
-
42
- ```{tableofcontents}
43
- ```
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes