Skip to content

Commit 3ea8562

Browse files
committed
refactoring and minor fix
1 parent da9eb04 commit 3ea8562

7 files changed

Lines changed: 694 additions & 433 deletions

File tree

docs/examples/ca_api_example_overview.ipynb

Lines changed: 17 additions & 17 deletions
Large diffs are not rendered by default.

docs/examples/ca_api_example_scanning.ipynb

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": 6,
33+
"execution_count": 3,
3434
"id": "bbcc805d-0f4d-49fc-a0f5-3ad863fe6da8",
3535
"metadata": {},
3636
"outputs": [],
@@ -40,28 +40,28 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 7,
43+
"execution_count": 4,
4444
"id": "91d37dcb-12fe-4bec-af5c-0f0787e64153",
4545
"metadata": {},
4646
"outputs": [
4747
{
4848
"data": {
4949
"text/plain": [
5050
"{'name': 'Python_Code_Audit',\n",
51-
" 'version': '1.4.1',\n",
52-
" 'generated_on': '2026-01-06 15:59',\n",
51+
" 'version': '1.6.2',\n",
52+
" 'generated_on': '2026-04-10 16:09',\n",
5353
" 'package_name': 'linkaudit',\n",
54-
" 'package_release': '0.9.7',\n",
54+
" 'package_release': '0.9.8',\n",
5555
" 'statistics_overview': {'Number_Of_Files': 6,\n",
56-
" 'Number_Of_Lines': 484,\n",
57-
" 'AST_Nodes': 221,\n",
56+
" 'Number_Of_Lines': 523,\n",
57+
" 'AST_Nodes': 225,\n",
5858
" 'Core Modules': 6,\n",
5959
" 'External Modules': 3,\n",
6060
" 'Functions': 16,\n",
6161
" 'Classes': 0,\n",
62-
" 'Comment_Lines': 158,\n",
63-
" 'Median_Complexity': 9.0,\n",
64-
" 'Maximum_Complexity': 24},\n",
62+
" 'Comment_Lines': 194,\n",
63+
" 'Median_Complexity': 9.3,\n",
64+
" 'Maximum_Complexity': 26},\n",
6565
" 'module_overview': {'core_modules': ['asyncio',\n",
6666
" 'os',\n",
6767
" 're',\n",
@@ -70,7 +70,7 @@
7070
" 'urllib.request'],\n",
7171
" 'imported_modules': ['_version', 'fire', 'linkaudit']},\n",
7272
" 'file_security_info': {0: {'FileName': '__init__.py',\n",
73-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/__init__.py',\n",
73+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/__init__.py',\n",
7474
" 'Number_Of_Lines': 10,\n",
7575
" 'AST_Nodes': 2,\n",
7676
" 'Std-Modules': 0,\n",
@@ -85,7 +85,7 @@
8585
" 'file_name': '__init__.py',\n",
8686
" 'sast_result': {}},\n",
8787
" 1: {'FileName': 'html_result.py',\n",
88-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/html_result.py',\n",
88+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/html_result.py',\n",
8989
" 'Number_Of_Lines': 83,\n",
9090
" 'AST_Nodes': 28,\n",
9191
" 'Std-Modules': 1,\n",
@@ -100,7 +100,7 @@
100100
" 'file_name': 'html_result.py',\n",
101101
" 'sast_result': {}},\n",
102102
" 2: {'FileName': 'markdownhelpers.py',\n",
103-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/markdownhelpers.py',\n",
103+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/markdownhelpers.py',\n",
104104
" 'Number_Of_Lines': 128,\n",
105105
" 'AST_Nodes': 50,\n",
106106
" 'Std-Modules': 2,\n",
@@ -115,22 +115,26 @@
115115
" 'file_name': 'markdownhelpers.py',\n",
116116
" 'sast_result': {}},\n",
117117
" 3: {'FileName': 'linkaudit.py',\n",
118-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/linkaudit.py',\n",
119-
" 'Number_Of_Lines': 232,\n",
120-
" 'AST_Nodes': 131,\n",
118+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/linkaudit.py',\n",
119+
" 'Number_Of_Lines': 271,\n",
120+
" 'AST_Nodes': 135,\n",
121121
" 'Std-Modules': 5,\n",
122122
" 'External-Modules': 2,\n",
123123
" 'Functions': 9,\n",
124124
" 'Classes': 0,\n",
125-
" 'Comment_Lines': 48,\n",
126-
" 'Complexity_Score': 24,\n",
125+
" 'Comment_Lines': 84,\n",
126+
" 'Complexity_Score': 26,\n",
127127
" 'warnings': 0,\n",
128128
" 'core_modules': ['asyncio', 'os', 'sys', 'urllib.error', 'urllib.request'],\n",
129129
" 'imported_modules': ['fire', 'linkaudit'],\n",
130130
" 'file_name': 'linkaudit.py',\n",
131-
" 'sast_result': {'input': [144]}},\n",
131+
" 'sast_result': {171: {'line': 171,\n",
132+
" 'validation': 'input',\n",
133+
" 'severity': 'Low',\n",
134+
" 'info': 'User input must be strictly sanitized and validated to prevent injection vulnerabilities.',\n",
135+
" 'code': \"<pre><code class='language-python'> files_tocheck = markdownhelpers.collect_markdown_files(bookdirectory)\\n result_output = input(&quot;HTML output [H] (=Default) or TXT output [T]? )&quot;)\\n txtoutput = &quot;# Result of Link Audit for markdown files (URL checker) \\\\n\\\\n&quot;</code></pre>\"}}},\n",
132136
" 4: {'FileName': '_version.py',\n",
133-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/_version.py',\n",
137+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/_version.py',\n",
134138
" 'Number_Of_Lines': 1,\n",
135139
" 'AST_Nodes': 1,\n",
136140
" 'Std-Modules': 0,\n",
@@ -145,7 +149,7 @@
145149
" 'file_name': '_version.py',\n",
146150
" 'sast_result': {}},\n",
147151
" 5: {'FileName': 'nocxhelpers.py',\n",
148-
" 'FilePath': '/tmp/codeaudit_ge_usq3_/linkaudit-0.9.7/src/linkaudit/nocxhelpers.py',\n",
152+
" 'FilePath': '/tmp/codeaudit_sviyoehh/linkaudit-0.9.8/src/linkaudit/nocxhelpers.py',\n",
149153
" 'Number_Of_Lines': 30,\n",
150154
" 'AST_Nodes': 9,\n",
151155
" 'Std-Modules': 0,\n",
@@ -161,7 +165,7 @@
161165
" 'sast_result': {}}}}"
162166
]
163167
},
164-
"execution_count": 7,
168+
"execution_count": 4,
165169
"metadata": {},
166170
"output_type": "execute_result"
167171
}
@@ -187,7 +191,7 @@
187191
"name": "python",
188192
"nbconvert_exporter": "python",
189193
"pygments_lexer": "ipython3",
190-
"version": "3.13.11"
194+
"version": "3.14.3"
191195
}
192196
},
193197
"nbformat": 4,

docs/examples/codeauditchecks.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,4 +738,4 @@
738738
<td>Vulnerable to path traversal attacks if used with untrusted archives.</td>
739739
</tr>
740740
</tbody>
741-
</table><br><p>Number of implemented security validations:<b>83</b></p><p>Version of codeaudit: <b>1.6.2</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-04-09 17:20</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.6.2</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">&#10084;</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>
741+
</table><br><p>Number of implemented security validations:<b>83</b></p><p>Version of codeaudit: <b>1.6.2</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-04-10 16:14</b> with <a href="https://github.com/nocomplexity/codeaudit" target="_blank"><b>Python Code Audit</b></a> version <b>1.6.2</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">&#10084;</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>

0 commit comments

Comments
 (0)