codeaudit 0.5.4__tar.gz → 0.5.5__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 (120) hide show
  1. {codeaudit-0.5.4 → codeaudit-0.5.5}/.gitignore +1 -1
  2. codeaudit-0.5.5/CONTRIBUTE.md +64 -0
  3. {codeaudit-0.5.4 → codeaudit-0.5.5}/PKG-INFO +13 -11
  4. {codeaudit-0.5.4 → codeaudit-0.5.5}/README.md +12 -10
  5. codeaudit-0.5.5/docs/CLIcommands.ipynb +168 -0
  6. codeaudit-0.5.5/docs/CONTRIBUTE.md +64 -0
  7. codeaudit-0.5.5/docs/_config.yml +105 -0
  8. codeaudit-0.5.5/docs/_static/nocxstyle.css +25 -0
  9. codeaudit-0.5.5/docs/_toc.yml +67 -0
  10. codeaudit-0.5.5/docs/about.md +144 -0
  11. codeaudit-0.5.5/docs/astlines.md +104 -0
  12. codeaudit-0.5.5/docs/astlines2.md +26 -0
  13. codeaudit-0.5.5/docs/checks/assert_check.md +40 -0
  14. codeaudit-0.5.5/docs/checks/base64_check.md +53 -0
  15. codeaudit-0.5.5/docs/checks/binding_check.md +54 -0
  16. codeaudit-0.5.5/docs/checks/builtinfunctions_check.md +32 -0
  17. codeaudit-0.5.5/docs/checks/chmod_check.md +18 -0
  18. codeaudit-0.5.5/docs/checks/directorycreation_check.md +61 -0
  19. codeaudit-0.5.5/docs/checks/exception_check.md +83 -0
  20. codeaudit-0.5.5/docs/checks/hash_check.md +18 -0
  21. codeaudit-0.5.5/docs/checks/httpserver_check.md +10 -0
  22. codeaudit-0.5.5/docs/checks/input_check.md +59 -0
  23. codeaudit-0.5.5/docs/checks/loggingconf_check.md +24 -0
  24. codeaudit-0.5.5/docs/checks/marshal_check.md +26 -0
  25. codeaudit-0.5.5/docs/checks/multiprocessing_check.md +27 -0
  26. codeaudit-0.5.5/docs/checks/pickle_check.md +31 -0
  27. codeaudit-0.5.5/docs/checks/random_check.md +15 -0
  28. codeaudit-0.5.5/docs/checks/shelve_check.md +25 -0
  29. codeaudit-0.5.5/docs/checks/shutil_check.md +23 -0
  30. codeaudit-0.5.5/docs/checks/subprocess_check.md +22 -0
  31. codeaudit-0.5.5/docs/checks/systemcalls_check.md +38 -0
  32. codeaudit-0.5.5/docs/checks/tarfile_extract_check.md +27 -0
  33. codeaudit-0.5.5/docs/checks/xml_check.md +13 -0
  34. codeaudit-0.5.5/docs/checks/zipfile_check.md +12 -0
  35. codeaudit-0.5.5/docs/checksinformation.md +73 -0
  36. codeaudit-0.5.5/docs/codeauditchecks.md +21 -0
  37. codeaudit-0.5.5/docs/codeauditcommands.md +161 -0
  38. codeaudit-0.5.5/docs/codeauditoverview.md +65 -0
  39. codeaudit-0.5.5/docs/complexitycheck.md +28 -0
  40. codeaudit-0.5.5/docs/directoryscan.md +75 -0
  41. codeaudit-0.5.5/docs/examples/checks_example.html +561 -0
  42. codeaudit-0.5.5/docs/examples/directoryscan.html +2157 -0
  43. codeaudit-0.5.5/docs/examples/filescan.html +600 -0
  44. codeaudit-0.5.5/docs/examples/modulescan.html +316 -0
  45. codeaudit-0.5.5/docs/examples/overview.html +338 -0
  46. codeaudit-0.5.5/docs/features.md +27 -0
  47. codeaudit-0.5.5/docs/filescan.md +59 -0
  48. codeaudit-0.5.5/docs/help.md +66 -0
  49. codeaudit-0.5.5/docs/images/OO.png +0 -0
  50. codeaudit-0.5.5/docs/images/ROI_logo.png +0 -0
  51. codeaudit-0.5.5/docs/images/YourLogoHere.png +0 -0
  52. codeaudit-0.5.5/docs/images/codeauditlogo.png +0 -0
  53. codeaudit-0.5.5/docs/images/nocxbanner.png +0 -0
  54. codeaudit-0.5.5/docs/images/overview_linkaudit.png +0 -0
  55. codeaudit-0.5.5/docs/intro.md +43 -0
  56. codeaudit-0.5.5/docs/license.md +702 -0
  57. codeaudit-0.5.5/docs/modulescan.md +64 -0
  58. codeaudit-0.5.5/docs/overviewplot.png +0 -0
  59. codeaudit-0.5.5/docs/sponsors.md +71 -0
  60. codeaudit-0.5.5/docs/userguide.md +67 -0
  61. codeaudit-0.5.5/docs/warnings.md +43 -0
  62. codeaudit-0.5.5/docs/whysast.md +31 -0
  63. codeaudit-0.5.5/filescan.png +0 -0
  64. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/__about__.py +1 -1
  65. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/altairplots.py +30 -18
  66. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/checkmodules.py +20 -23
  67. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/complexitycheck.py +10 -9
  68. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/data/sastchecks.csv +5 -5
  69. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/filehelpfunctions.py +1 -1
  70. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/htmlhelpfunctions.py +9 -8
  71. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/reporting.py +1 -1
  72. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/totals.py +66 -42
  73. {codeaudit-0.5.4 → codeaudit-0.5.5}/LICENSE.txt +0 -0
  74. {codeaudit-0.5.4 → codeaudit-0.5.5/docs}/filescan.png +0 -0
  75. {codeaudit-0.5.4 → codeaudit-0.5.5}/pyproject.toml +0 -0
  76. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/__init__.py +0 -0
  77. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/codeaudit.py +0 -0
  78. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/issuevalidations.py +0 -0
  79. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/security_checks.py +0 -0
  80. {codeaudit-0.5.4 → codeaudit-0.5.5}/src/codeaudit/simple.css +0 -0
  81. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/__init__.py +0 -0
  82. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/count_lines_file1.py +0 -0
  83. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_basicpatterns.py +0 -0
  84. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_chmod.py +0 -0
  85. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_constructspart2.py +0 -0
  86. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_correctexceptionuse.py +0 -0
  87. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_count_commentlines.py +0 -0
  88. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_directorycreation.py +0 -0
  89. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_directorycreation2.py +0 -0
  90. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_hashstrenght.py +0 -0
  91. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_oschecks.py +0 -0
  92. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_random.py +0 -0
  93. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/test_standardlibconstructs.py +0 -0
  94. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/allshit.py +0 -0
  95. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/assert.py +0 -0
  96. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/base64.py +0 -0
  97. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/chmod_things.py +0 -0
  98. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/directorycreation.py +0 -0
  99. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/directorycreation2.py +0 -0
  100. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/exception.py +0 -0
  101. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/file3.py +0 -0
  102. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/file_with_warnings.py +0 -0
  103. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/hashcheck.py +0 -0
  104. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/httpserver.py +0 -0
  105. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/inputstatement.py +0 -0
  106. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/marshal.py +0 -0
  107. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/modulecheck.py +0 -0
  108. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/multiprocessing.py +0 -0
  109. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/oschecks.py +0 -0
  110. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/pickle.py +0 -0
  111. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/python2_file_willnotwork.py +0 -0
  112. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/random.py +0 -0
  113. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/shelve.py +0 -0
  114. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/shutil.py +0 -0
  115. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/subprocess.py +0 -0
  116. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/tarfilevalidation.py +0 -0
  117. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/validation1.py +0 -0
  118. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/validation2.py +0 -0
  119. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/xml.py +0 -0
  120. {codeaudit-0.5.4 → codeaudit-0.5.5}/tests/validationfiles/zipfile.py +0 -0
@@ -145,5 +145,5 @@ dmypy.json
145
145
  ## NOCX
146
146
  _build/*
147
147
  .gitignore
148
- docs
148
+
149
149
 
@@ -0,0 +1,64 @@
1
+ # Contribute
2
+
3
+ Great that you see this page and want to contribute!
4
+
5
+ :::{tip}
6
+ All contributions are welcome!
7
+ Think of corrections on the manual, code and more or better tests.
8
+ :::
9
+
10
+ The **Codeaudit** code repository is hosted at [Github](github.com/nocomplexity/codeaudit).
11
+
12
+ Simple Guidelines:
13
+
14
+ * Questions, Feature Requests, Bug Reports should all be reported on the [Github Issue Tracker](https://github.com/nocomplexity/codeaudit/issues) .
15
+ * [Black](https://black.readthedocs.io/en/stable/index.html) is used for code style. But for a simple fix, using `Black` is not required!
16
+
17
+ This codeaudit tool is designed by applying [Zero Complexity By Design principles](https://nocomplexity.com/documents/0complexity/abstract.html). So the goal is to keep the tool simple to use and the code simple to adjust or to extend.
18
+
19
+ :::{warning}
20
+ This simple tool is designed to be simple to use and maintain.
21
+ :::
22
+
23
+ **Pull Requests are welcome!**
24
+
25
+ When you contribute to Codeaudit, your contributions are made under the same license as the file you are working on.
26
+
27
+
28
+ We adopt the [Collective Code Construction Contract(C4)](https://rfc.zeromq.org/spec/42/) to streamline collaboration. C4 is meant to provide a reusable optimal collaboration model for open source software projects.
29
+
30
+ :::{attention}
31
+ This project values respect and inclusiveness, and enforces a [Code of Conduct](CoC-label) in all interactions.
32
+ :::
33
+
34
+
35
+ :::{note}
36
+ This is an open community driven project. Contributors will be mentioned in the documentation.
37
+ :::
38
+
39
+ (CoC-label)=
40
+ ## Code of Conduct
41
+
42
+ Version : 1.0
43
+
44
+ As contributors, maintainers, administrators and founders of the Python Codeaudit Community projects, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
45
+
46
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
47
+
48
+ Examples of unacceptable behavior by participants include:
49
+ * The use of sexualized language or imagery.
50
+ * Personal attacks.
51
+ * Trolling or insulting/derogatory comments.
52
+ * Public or private harassment.
53
+ * Publishing other’s private information, such as physical or electronic addresses, without explicit permission.
54
+ * Other unethical or unprofessional conduct.
55
+
56
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, documentation edits, issues, and other contributions that are not aligned to this Code of Conduct.
57
+
58
+ By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
59
+
60
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
61
+
62
+ This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
63
+
64
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](https://www.contributor-covenant.org/version/1/2/0/code-of-conduct/).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeaudit
3
- Version: 0.5.4
3
+ Version: 0.5.5
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
@@ -24,14 +24,16 @@ Requires-Dist: fire>=0.7.0
24
24
  Requires-Dist: pandas>=2.3
25
25
  Description-Content-Type: text/markdown
26
26
 
27
- # codeaudit
27
+ # Codeaudit
28
+
29
+ ![CodeauditLogo](docs/images/codeauditlogo.png)
28
30
 
29
31
  [![PyPI - Version](https://img.shields.io/pypi/v/codeaudit.svg)](https://pypi.org/project/codeaudit)
30
32
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/codeaudit.svg)](https://pypi.org/project/codeaudit)
31
33
 
32
- Codeaudit - A modern Python source code analyzer based on distrust.
34
+ Python Codeaudit - A modern Python source code analyzer based on distrust.
33
35
 
34
- Codeaudit is a tool designed to find security issues 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.
36
+ Codeaudit is a tool to find security issues 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.
35
37
 
36
38
  This tool is created for:
37
39
  * Anyone who want or must check security risks with Python programs.
@@ -40,20 +42,20 @@ This tool is created for:
40
42
 
41
43
 
42
44
  > [!WARNING]
43
- > Codeaudit is still is currently in *beta status*. There are still bugs in the software that need to be fixed. Consider [contributing](CONTRIBUTING.md) to make Codeaudit a cool modern Python SAST tool. Codeaudit is currently in a thorough testing period and changes and fixes are frequently applied.
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!
44
46
 
45
47
  ## Features
46
48
 
47
- Codeaudit has the following features:
49
+ Python Codeaudit has the following features:
48
50
 
49
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.
50
52
 
51
53
  * Detect and reports complexity and statistics relevant for security per Python file or from Python files found in a directory.
52
54
 
53
- * 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!
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!
54
56
 
55
57
 
56
- * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is shown.
58
+ * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is reported.
57
59
 
58
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.
59
61
 
@@ -61,7 +63,7 @@ Codeaudit has the following features:
61
63
 
62
64
 
63
65
  > [!IMPORTANT]
64
- > Codeaudit uses the Python's Abstract Syntax Tree (AST) to get robust and reliable result. Using the Python AST makes contextual Vulnerability Detection possible and false positive are minimized.
66
+ > Python Codeaudit uses the Python's Abstract Syntax Tree (AST) to get robust and reliable result. Using the Python AST makes contextual Vulnerability Detection possible and false positive are minimized.
65
67
 
66
68
 
67
69
  ## Installation
@@ -113,7 +115,7 @@ Commands:
113
115
  checks Generate an HTML report of all implemented codeaudit security checks.
114
116
  version Prints the module version. Use [-v] [--v] [-version] or [--version].
115
117
 
116
- Use the Codeaudit documentation to check the security of Python programs and make your Python programs more secure!
118
+ Use the [Codeaudit documentation](https://nocomplexity.com/documents/codeaudit/intro.html) to check the security of Python programs and make your Python programs more secure!
117
119
  Check https://simplifysecurity.nocomplexity.com/
118
120
  ```
119
121
 
@@ -150,7 +152,7 @@ When you contribute to Codeaudit, your contributions are made under the same lic
150
152
 
151
153
 
152
154
  > [!NOTE]
153
- > This is an open community driven project. Contributors will be mentioned in the documentation.
155
+ > This is an open community driven project. Contributors will be mentioned in the [documentation](https://nocomplexity.com/documents/codeaudit/intro.html).
154
156
 
155
157
  We adopt the [Collective Code Construction Contract(C4)](https://rfc.zeromq.org/spec/42/) to streamline collaboration.
156
158
 
@@ -1,11 +1,13 @@
1
- # codeaudit
1
+ # Codeaudit
2
+
3
+ ![CodeauditLogo](docs/images/codeauditlogo.png)
2
4
 
3
5
  [![PyPI - Version](https://img.shields.io/pypi/v/codeaudit.svg)](https://pypi.org/project/codeaudit)
4
6
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/codeaudit.svg)](https://pypi.org/project/codeaudit)
5
7
 
6
- Codeaudit - A modern Python source code analyzer based on distrust.
8
+ Python Codeaudit - A modern Python source code analyzer based on distrust.
7
9
 
8
- Codeaudit is a tool designed to find security issues 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.
10
+ Codeaudit is a tool to find security issues 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.
9
11
 
10
12
  This tool is created for:
11
13
  * Anyone who want or must check security risks with Python programs.
@@ -14,20 +16,20 @@ This tool is created for:
14
16
 
15
17
 
16
18
  > [!WARNING]
17
- > Codeaudit is still is currently in *beta status*. There are still bugs in the software that need to be fixed. Consider [contributing](CONTRIBUTING.md) to make Codeaudit a cool modern Python SAST tool. Codeaudit is currently in a thorough testing period and changes and fixes are frequently applied.
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!
18
20
 
19
21
  ## Features
20
22
 
21
- Codeaudit has the following features:
23
+ Python Codeaudit has the following features:
22
24
 
23
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.
24
26
 
25
27
  * Detect and reports complexity and statistics relevant for security per Python file or from Python files found in a directory.
26
28
 
27
- * 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!
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!
28
30
 
29
31
 
30
- * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is shown.
32
+ * Detect and reports which module are used within a Python file. Also vulnerability information found from used external modules is reported.
31
33
 
32
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.
33
35
 
@@ -35,7 +37,7 @@ Codeaudit has the following features:
35
37
 
36
38
 
37
39
  > [!IMPORTANT]
38
- > Codeaudit uses the Python's Abstract Syntax Tree (AST) to get robust and reliable result. Using the Python AST makes contextual Vulnerability Detection possible and false positive are minimized.
40
+ > Python Codeaudit uses the Python's Abstract Syntax Tree (AST) to get robust and reliable result. Using the Python AST makes contextual Vulnerability Detection possible and false positive are minimized.
39
41
 
40
42
 
41
43
  ## Installation
@@ -87,7 +89,7 @@ Commands:
87
89
  checks Generate an HTML report of all implemented codeaudit security checks.
88
90
  version Prints the module version. Use [-v] [--v] [-version] or [--version].
89
91
 
90
- Use the Codeaudit documentation to check the security of Python programs and make your Python programs more secure!
92
+ Use the [Codeaudit documentation](https://nocomplexity.com/documents/codeaudit/intro.html) to check the security of Python programs and make your Python programs more secure!
91
93
  Check https://simplifysecurity.nocomplexity.com/
92
94
  ```
93
95
 
@@ -124,7 +126,7 @@ When you contribute to Codeaudit, your contributions are made under the same lic
124
126
 
125
127
 
126
128
  > [!NOTE]
127
- > This is an open community driven project. Contributors will be mentioned in the documentation.
129
+ > This is an open community driven project. Contributors will be mentioned in the [documentation](https://nocomplexity.com/documents/codeaudit/intro.html).
128
130
 
129
131
  We adopt the [Collective Code Construction Contract(C4)](https://rfc.zeromq.org/spec/42/) to streamline collaboration.
130
132
 
@@ -0,0 +1,168 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "6e4cc5f7-58db-4fc9-a5be-b5c75db9b2c1",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Codeaudit CLI Commands\n",
9
+ "\n",
10
+ "Generated overview of codeaudit implemented commands.\n",
11
+ "So always up-to-date with the code!"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": 1,
17
+ "id": "923aba22-7103-4431-8545-ee5596efa371",
18
+ "metadata": {},
19
+ "outputs": [],
20
+ "source": [
21
+ "from codeaudit import codeaudit"
22
+ ]
23
+ },
24
+ {
25
+ "cell_type": "code",
26
+ "execution_count": 2,
27
+ "id": "057c9730-7b09-49a8-82f1-bc681d880c96",
28
+ "metadata": {},
29
+ "outputs": [],
30
+ "source": [
31
+ "output = ''"
32
+ ]
33
+ },
34
+ {
35
+ "cell_type": "code",
36
+ "execution_count": 3,
37
+ "id": "67576531-b66f-42a3-b6e4-460423ca28e0",
38
+ "metadata": {},
39
+ "outputs": [],
40
+ "source": [
41
+ "%%capture version --no-display\n",
42
+ "codeaudit.display_version()"
43
+ ]
44
+ },
45
+ {
46
+ "cell_type": "code",
47
+ "execution_count": 4,
48
+ "id": "2717fe66-9e66-4fcc-ae82-0d1ba26892c4",
49
+ "metadata": {},
50
+ "outputs": [],
51
+ "source": [
52
+ "version_id = version.stdout"
53
+ ]
54
+ },
55
+ {
56
+ "cell_type": "code",
57
+ "execution_count": 5,
58
+ "id": "3f286724-0a8f-45b2-80fe-d6d061fe440a",
59
+ "metadata": {},
60
+ "outputs": [],
61
+ "source": [
62
+ "output += '% THIS FILE IS GENERATED! - Use CLIcommands.ipynb to make it better!\\n'\n",
63
+ "output += '# Overview of Codeaudit commands\\n'\n",
64
+ "output += f'Codeaudit commands for: {version_id}'"
65
+ ]
66
+ },
67
+ {
68
+ "cell_type": "code",
69
+ "execution_count": 6,
70
+ "id": "693c3354-530b-4a40-a561-ed722d9bb1fa",
71
+ "metadata": {},
72
+ "outputs": [],
73
+ "source": [
74
+ "%%capture helpoutput --no-display\n",
75
+ "codeaudit.display_help()"
76
+ ]
77
+ },
78
+ {
79
+ "cell_type": "code",
80
+ "execution_count": 7,
81
+ "id": "5fa9a420-bd9a-4641-99c9-de0bcf448dbc",
82
+ "metadata": {},
83
+ "outputs": [],
84
+ "source": [
85
+ "output += '```' # raw display\n",
86
+ "output += helpoutput.stdout\n",
87
+ "output += '```' # end raw display\n",
88
+ "output += '\\n' # newlines matter when creating markdown"
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "execution_count": 8,
94
+ "id": "bf6afe56-e0f7-4fa2-a3a5-968bad11bf9c",
95
+ "metadata": {},
96
+ "outputs": [],
97
+ "source": [
98
+ "commands = { \"overview\": 'overview_report', \n",
99
+ " \"modulescan\": 'report_module_information',\n",
100
+ " \"filescan\" : 'file_scan_report',\n",
101
+ " \"directoryscan\" : 'directory_scan_report',\n",
102
+ " \"checks\" : 'report_implemented_tests',\n",
103
+ " \"version\" : 'display_version'} \n",
104
+ "for key, value in commands.items(): \n",
105
+ " output += f'## codeaudit {key}\\n' # newlines matter when creating markdown\n",
106
+ " output += '```text\\n' # raw display \n",
107
+ " func_name = value\n",
108
+ " output += getattr(codeaudit, func_name).__doc__\n",
109
+ " #print(func_name.__doc__) \n",
110
+ " output += func_name.__doc__ \n",
111
+ " output += '\\n' # newlines matter when creating markdown\n",
112
+ " output += '```\\n' "
113
+ ]
114
+ },
115
+ {
116
+ "cell_type": "code",
117
+ "execution_count": 9,
118
+ "id": "0335783c-7676-4099-94c5-c98cc8f2f205",
119
+ "metadata": {
120
+ "editable": true,
121
+ "slideshow": {
122
+ "slide_type": ""
123
+ },
124
+ "tags": []
125
+ },
126
+ "outputs": [],
127
+ "source": [
128
+ "def create_documentation_file(output):\n",
129
+ " \"\"\"Creates a MyST file for the documentation\"\"\"\n",
130
+ " outputfile= \"codeauditcommands.md\"\n",
131
+ " with open(outputfile, 'w') as f:\n",
132
+ " f.write(output) \n",
133
+ " "
134
+ ]
135
+ },
136
+ {
137
+ "cell_type": "code",
138
+ "execution_count": 10,
139
+ "id": "4667d7ec-3727-4e2d-97b5-6f597c697ec7",
140
+ "metadata": {},
141
+ "outputs": [],
142
+ "source": [
143
+ "create_documentation_file(output)"
144
+ ]
145
+ }
146
+ ],
147
+ "metadata": {
148
+ "kernelspec": {
149
+ "display_name": "Python 3 (ipykernel)",
150
+ "language": "python",
151
+ "name": "python3"
152
+ },
153
+ "language_info": {
154
+ "codemirror_mode": {
155
+ "name": "ipython",
156
+ "version": 3
157
+ },
158
+ "file_extension": ".py",
159
+ "mimetype": "text/x-python",
160
+ "name": "python",
161
+ "nbconvert_exporter": "python",
162
+ "pygments_lexer": "ipython3",
163
+ "version": "3.13.1"
164
+ }
165
+ },
166
+ "nbformat": 4,
167
+ "nbformat_minor": 5
168
+ }
@@ -0,0 +1,64 @@
1
+ # Contribute
2
+
3
+ Great that you see this page and want to contribute!
4
+
5
+ :::{tip}
6
+ All contributions are welcome!
7
+ Think of corrections on the manual, code and more or better tests.
8
+ :::
9
+
10
+ The **Codeaudit** code repository is hosted at [Github](github.com/nocomplexity/codeaudit).
11
+
12
+ Simple Guidelines:
13
+
14
+ * Questions, Feature Requests, Bug Reports should all be reported on the [Github Issue Tracker](https://github.com/nocomplexity/codeaudit/issues) .
15
+ * [Black](https://black.readthedocs.io/en/stable/index.html) is used for code style. But for a simple fix, using `Black` is not required!
16
+
17
+ This codeaudit tool is designed by applying [Zero Complexity By Design principles](https://nocomplexity.com/documents/0complexity/abstract.html). So the goal is to keep the tool simple to use and the code simple to adjust or to extend.
18
+
19
+ :::{warning}
20
+ This simple tool is designed to be simple to use and maintain.
21
+ :::
22
+
23
+ **Pull Requests are welcome!**
24
+
25
+ When you contribute to Codeaudit, your contributions are made under the same license as the file you are working on.
26
+
27
+
28
+ We adopt the [Collective Code Construction Contract(C4)](https://rfc.zeromq.org/spec/42/) to streamline collaboration. C4 is meant to provide a reusable optimal collaboration model for open source software projects.
29
+
30
+ :::{attention}
31
+ This project values respect and inclusiveness, and enforces a [Code of Conduct](CoC-label) in all interactions.
32
+ :::
33
+
34
+
35
+ :::{note}
36
+ This is an open community driven project. Contributors will be mentioned in the documentation.
37
+ :::
38
+
39
+ (CoC-label)=
40
+ ## Code of Conduct
41
+
42
+ Version : 1.0
43
+
44
+ As contributors, maintainers, administrators and founders of the Python Codeaudit Community projects, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
45
+
46
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
47
+
48
+ Examples of unacceptable behavior by participants include:
49
+ * The use of sexualized language or imagery.
50
+ * Personal attacks.
51
+ * Trolling or insulting/derogatory comments.
52
+ * Public or private harassment.
53
+ * Publishing other’s private information, such as physical or electronic addresses, without explicit permission.
54
+ * Other unethical or unprofessional conduct.
55
+
56
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, documentation edits, issues, and other contributions that are not aligned to this Code of Conduct.
57
+
58
+ By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
59
+
60
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
61
+
62
+ This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
63
+
64
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](https://www.contributor-covenant.org/version/1/2/0/code-of-conduct/).
@@ -0,0 +1,105 @@
1
+ #######################################################################################
2
+ # The NO Complexity default configuration configuration making jupyter books
3
+ # Override these values in their own `_config.yml` file.
4
+ # Created by Maikel Mardjan (nocomplexity.com)
5
+ #######################################################################################
6
+ # Book settings
7
+ #title : SimplifiedNLP Documentation # The title of the book. Will be placed in the left navbar.
8
+ title : ""
9
+ author : '<a href="https://nocomplexity.com/">Maikel Mardjan (nocomplexity.com)</a>' # The author of the book
10
+ copyright : '2025- Maikel Mardjan - Business Management Support Foundation' # Copyright year to be placed in the footer
11
+ logo : "images/nocxbanner.png" # A path to the book logo
12
+ # Patterns to skip when building the book. Can be glob-style (e.g. "*skip.ipynb")
13
+ exclude_patterns : [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints"]
14
+ # Auto-exclude files not in the toc
15
+ only_build_toc_files : false
16
+
17
+ #######################################################################################
18
+ # Execution settings
19
+ execute:
20
+ execute_notebooks : auto # Whether to execute notebooks at build time. Must be one of ("auto", "force", "cache", "off")
21
+ cache : "" # A path to the jupyter cache that will be used to store execution artifacs. Defaults to `_build/.jupyter_cache/`
22
+ exclude_patterns : [] # A list of patterns to *skip* in execution (e.g. a notebook that takes a really long time)
23
+ timeout : 30 # The maximum time (in seconds) each notebook cell is allowed to run.
24
+ run_in_temp : false # If `True`, then a temporary directory will be created and used as the command working directory (cwd),
25
+ # otherwise the notebook's parent directory will be the cwd.
26
+ allow_errors : false # If `False`, when a code cell raises an error the execution is stopped, otherwise all cells are always run.
27
+ stderr_output : show # One of 'show', 'remove', 'remove-warn', 'warn', 'error', 'severe'
28
+
29
+ #######################################################################################
30
+ # Parse and render settings
31
+ parse:
32
+ myst_enable_extensions: # default extensions to enable in the myst parser. See https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html
33
+ - amsmath
34
+ - colon_fence
35
+ - deflist
36
+ - dollarmath
37
+ - html_admonition
38
+ - html_image
39
+ - linkify
40
+ - replacements
41
+ - smartquotes
42
+ - substitution
43
+
44
+ myst_url_schemes : [mailto, http, https] # URI schemes that will be recognised as external URLs in Markdown links
45
+
46
+ #######################################################################################
47
+ # HTML-specific settings
48
+ html:
49
+ # favicon : "" # A path to a favicon image
50
+ # use_edit_page_button : true # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in
51
+ # use_repository_button : true # Whether to add a link to your repository button
52
+ # use_issues_button : true # Whether to add an "open an issue" button
53
+
54
+
55
+ #extra_footer : '<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a> © Copyright 2025, BM-Support.org - Maikel Mardjan. This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>'
56
+ #extra_navbar : '<a href="https://bm-support.org/"><b>ROI Now!</b></a>' #DOES NOT WORK ANYMORE!? (status May 2023)
57
+
58
+ home_page_in_navbar : true # Whether to include your home page in the left Navigation Bar
59
+ baseurl : "" # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/
60
+ comments:
61
+ hypothesis : false
62
+ utterances : false
63
+
64
+ #######################################################################################
65
+ # LaTeX-specific settings
66
+ latex:
67
+ latex_engine : pdflatex # one of 'pdflatex', 'xelatex' (recommended for unicode), 'luatex', 'platex', 'uplatex'
68
+
69
+ #######################################################################################
70
+ # Launch button settings
71
+ launch_buttons:
72
+ notebook_interface : classic # The interface interactive links will activate ["classic", "jupyterlab"]
73
+ binderhub_url : https://mybinder.org # The URL of the BinderHub (e.g., https://mybinder.org)
74
+ jupyterhub_url : "" # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu)
75
+ thebe : false # Add a thebe button to pages (requires the repository to run on Binder)
76
+ colab_url : "" # The URL of Google Colab (https://colab.research.google.com)
77
+
78
+
79
+ #######################################################################################
80
+ # Advanced and power-user settings
81
+ sphinx:
82
+ extra_extensions :
83
+ - sphinx.ext.autodoc
84
+ - sphinx.ext.viewcode
85
+ - sphinx.ext.napoleon
86
+ - sphinx.ext.todo
87
+
88
+ local_extensions : # A list of local extensions to load by sphinx specified by "name: path" items
89
+ # simplifiednlp : '/home/maikel/projects/pythondev/simplifiednlp'
90
+ config:
91
+ html_show_copyright: false
92
+ html_last_updated_fmt: ""
93
+ napoleon_google_docstring: true
94
+ napoleon_numpy_docstring: true
95
+ html_theme_options:
96
+ repository_url: "https://github.com/nocomplexity/codeaudit"
97
+ repository_branch: "master"
98
+ use_repository_button: True
99
+ use_edit_page_button: True
100
+ use_issues_button: True
101
+ home_page_in_toc: True
102
+ logo:
103
+ text: <b>Python Security Code Audit</b>
104
+ extra_footer: '<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a> This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>'
105
+
@@ -0,0 +1,25 @@
1
+ .caption-text {
2
+ color: #FF0000;
3
+ }
4
+
5
+ /* <your static path>/custom.css */
6
+
7
+ div.admonition.admonition-nocx {
8
+ border-color: #FF0000;
9
+ }
10
+ div.admonition.admonition-nocx > .admonition-title:before {
11
+ background-color: #FF0000;
12
+ }
13
+ div.admonition.admonition-nocx > .admonition-title:after {
14
+ color: #FF0000;
15
+ }
16
+
17
+
18
+ /* for the danger color (button!) to be NOCX red instead of the default*/
19
+ /* 19-11-2023: --pst-color-secondary: makes the TOC hover link red again, else purple by default*/
20
+
21
+ html[data-theme="light"] {
22
+ --pst-color-danger: red;
23
+ --pst-color-secondary: #000;
24
+ }
25
+
@@ -0,0 +1,67 @@
1
+ format: jb-book
2
+ root: intro
3
+
4
+ parts:
5
+ - caption: Quick Start
6
+ chapters:
7
+ - file: features
8
+ - file: userguide
9
+ sections:
10
+ - file: codeauditoverview
11
+ - file: modulescan
12
+ - file: filescan
13
+ - file: directoryscan
14
+ - file: codeauditchecks
15
+ - file: whysast
16
+
17
+
18
+ - caption: Security Checks
19
+ chapters:
20
+ - file: checksinformation
21
+ sections:
22
+ - file: checks/assert_check
23
+ - file: checks/input_check
24
+ - file: checks/builtinfunctions_check
25
+ - file: checks/chmod_check
26
+ - file: checks/binding_check
27
+ - file: checks/directorycreation_check
28
+ - file: checks/exception_check
29
+ - file: checks/tarfile_extract_check
30
+ - file: checks/hash_check
31
+ - file: checks/marshal_check
32
+ - file: checks/subprocess_check
33
+ - file: checks/systemcalls_check
34
+ - file: checks/loggingconf_check
35
+ - file: checks/base64_check
36
+ - file: checks/httpserver_check
37
+ - file: checks/multiprocessing_check
38
+ - file: checks/pickle_check
39
+ - file: checks/random_check
40
+ - file: checks/shelve_check
41
+ - file: checks/xml_check
42
+ - file: checks/zipfile_check
43
+ - file: checks/shutil_check
44
+
45
+
46
+ - caption: Architecture
47
+ chapters:
48
+ # - file: astlines
49
+ # - file: astlines2
50
+ - file: complexitycheck
51
+ - file: warnings
52
+ - file: codeauditcommands
53
+
54
+
55
+
56
+ # - caption: API Documentation
57
+ # chapters:
58
+ # - file: modules
59
+
60
+
61
+ - caption: About
62
+ chapters:
63
+ - file: help
64
+ - file: CONTRIBUTE
65
+ - file: sponsors
66
+ - file: license
67
+ - file: about