Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rule documentation #5333

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions analyzers/rspec/cs/S1155_c#.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ <h2>Compliant Solution</h2>
return strings.Any();
}

private static bool HasContent2(IEnumerable&lt;string&gt; strings)
{
return strings.Any();
}

private static bool IsEmpty(IEnumerable&lt;string&gt; strings)
{
return !strings.Any();
Expand Down
13 changes: 0 additions & 13 deletions analyzers/rspec/cs/S2755_c#.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
<p>When parsing the XML file, the content of the external entities is retrieved from an external storage such as the file system or network, which may
lead, if no restrictions are put in place, to arbitrary file disclosures or <a
href="https://www.owasp.org/index.php/Server_Side_Request_Forgery">server-side request forgery (SSRF)</a> vulnerabilities.</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!DOCTYPE person [
&lt;!ENTITY file SYSTEM "file:///etc/passwd"&gt;
&lt;!ENTITY ssrf SYSTEM "https://internal.network/sensitive_information"&gt;
]&gt;

&lt;person&gt;
&lt;name&gt;&amp;file;&lt;/name&gt;
&lt;city&gt;&amp;ssrf;&lt;/city&gt;
&lt;age&gt;18&lt;/age&gt;
&lt;/person&gt;
</pre>
<p>It’s recommended to limit resolution of external entities by using one of these solutions:</p>
<ul>
<li> If DOCTYPE is not necessary, completely disable all DOCTYPE declarations. </li>
Expand Down
2 changes: 1 addition & 1 deletion analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"languages": [
"CSH"
],
"latest-update": "2022-01-14T13:59:59.537596400Z"
"latest-update": "2022-01-27T12:40:53.264405400Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ <h2>Compliant Solution</h2>
return strings.Any();
}

private static bool HasContent2(IEnumerable&lt;string&gt; strings)
{
return strings.Any();
}

private static bool IsEmpty(IEnumerable&lt;string&gt; strings)
{
return !strings.Any();
Expand Down
13 changes: 0 additions & 13 deletions analyzers/src/SonarAnalyzer.Utilities/Rules.Description/S2755.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
<p>When parsing the XML file, the content of the external entities is retrieved from an external storage such as the file system or network, which may
lead, if no restrictions are put in place, to arbitrary file disclosures or <a
href="https://www.owasp.org/index.php/Server_Side_Request_Forgery">server-side request forgery (SSRF)</a> vulnerabilities.</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!DOCTYPE person [
&lt;!ENTITY file SYSTEM "file:///etc/passwd"&gt;
&lt;!ENTITY ssrf SYSTEM "https://internal.network/sensitive_information"&gt;
]&gt;

&lt;person&gt;
&lt;name&gt;&amp;file;&lt;/name&gt;
&lt;city&gt;&amp;ssrf;&lt;/city&gt;
&lt;age&gt;18&lt;/age&gt;
&lt;/person&gt;
</pre>
<p>It’s recommended to limit resolution of external entities by using one of these solutions:</p>
<ul>
<li> If DOCTYPE is not necessary, completely disable all DOCTYPE declarations. </li>
Expand Down
2 changes: 1 addition & 1 deletion analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"languages": [
"VBNET"
],
"latest-update": "2022-01-14T14:00:19.582271800Z"
"latest-update": "2022-01-27T12:42:26.323915200Z"
}