Skip to content

Commit f541e6c

Browse files
committed
fixing links
Signed-off-by: Helge Wehder <[email protected]>
1 parent 0bcc21d commit f541e6c

File tree

1 file changed

+10
-1
lines changed
  • docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1335

1 file changed

+10
-1
lines changed

docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1335/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ print("Will never reach here")
164164

165165
## Compliant Solution
166166

167-
Bit-shifting is an optimization pattern that works better for languages closer to the CPU than Python. Math in Python is better done by arithmetical functions in Python as stated by *NUM01-P3 Do Not Perform Bit-wise and Arithmetic Operations on the Same Data* [[SEI CERT JAVA 2024]](https://eteamspace.internal.ericsson.com/pages/viewpage.action?pageId=1122687324).
167+
Bit-shifting is an optimization pattern that works better for languages closer to the CPU than Python. Math in Python is better done by arithmetical functions in Python as stated by *CWE-1335: Promote readability and compatibility by using mathematical written code with arithmetic operations instead of bit-wise operations* [[OpenSSF Secure Coding in Python 2025]](https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1335/01/README.md).
168168
Understanding `ctypes` or `C` requires understanding the *CERT C Coding Standard* [[SEI CERT C 2025]](https://www.securecoding.cert.org/confluence/display/seccode/CERT+C+Coding+Standard)and setting boundaries manually in Python.
169169

170170
## Automated Detection
@@ -176,6 +176,15 @@ Not available
176176
<table>
177177
<tr>
178178
<td>
179+
<a href="https://github.com/ossf/wg-best-practices-os-developers/tree/main/docs/Secure-Coding-Guide-for-Python">[OpenSSF Secure Coding in Python 2025]</a>
180+
</td>
181+
<td>
182+
<a href="https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1335/01/README.md">CWE-1335: Promote readability and compatibility by using mathematical written code with arithmetic operations instead of bit-wise operations</a>
183+
</td>
184+
</tr>
185+
<tr>
186+
<tr>
187+
<td>
179188
<a href="http://cwe.mitre.org/">MITRE CWE</a>
180189
</td>
181190
<td>

0 commit comments

Comments
 (0)