mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
@@ -18,7 +18,7 @@ more difficult to change which implementation you are using at a later date.</p>
|
||||
</example>
|
||||
<references>
|
||||
|
||||
<li>C# Corner, <a href="http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx">C# Interface Based Development</a>.</li>
|
||||
<li>C# Corner, <a href="https://www.c-sharpcorner.com/article/C-Sharp-interface-based-development/">C# Interface Based Development</a>.</li>
|
||||
|
||||
</references>
|
||||
</qhelp>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<overview>
|
||||
<p>
|
||||
Comparisons which always yield the same result are unnecessary and may indicate a bug in the
|
||||
logic. This can can happen when the data type of one of the operands has a limited range of values.
|
||||
logic. This can happen when the data type of one of the operands has a limited range of values.
|
||||
For example unsigned integers are always greater than or equal to zero, and <code>byte</code>
|
||||
values are always less than 256.
|
||||
</p>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</p>
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>Use speific era when creating DateTime and DateTimeOffset structs from previously stored date in Japanese calendar</p>
|
||||
<p>Use specific era when creating DateTime and DateTimeOffset structs from previously stored date in Japanese calendar</p>
|
||||
<p>Don't store dates in Japanese format</p>
|
||||
<p>Don't use hard-coded era start date for date calculations converting dates from Japanese date format</p>
|
||||
<p>Use <code>JapaneseCalendar</code> class for date formatting only</p>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<include src="ThreadUnsafeICryptoTransformOverview.inc.qhelp" />
|
||||
</overview>
|
||||
<recommendation>
|
||||
<p>Create new instances of the object that implements or has a field of type <code>System.Security.Cryptography.ICryptoTransform</code> to avoid sharing it accross multiple threads.</p>
|
||||
<p>Create new instances of the object that implements or has a field of type <code>System.Security.Cryptography.ICryptoTransform</code> to avoid sharing it across multiple threads.</p>
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<qhelp>
|
||||
<overview>
|
||||
<p>ECB should not be used as a mode for encryption. It has dangerous weaknesses. Data is encrypted the same way every time
|
||||
meaning the same plaintext input will always produce the same cyphertext. This makes encrypted messages vulnerable
|
||||
meaning the same plaintext input will always produce the same ciphertext. This makes encrypted messages vulnerable
|
||||
to replay attacks.</p>
|
||||
|
||||
</overview>
|
||||
|
||||
Reference in New Issue
Block a user