Skip to content

Fix git push error for protected CLA branch #3114

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

Merged
merged 47 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ec4d9b7
update test agents for 2019; fixes #1269
gewarren Apr 17, 2019
f155516
[mac] update Xcode version
conceptdev Apr 17, 2019
5fd2257
Merge pull request #4460 from MicrosoftDocs/crdun-publicissue-3048
PRMerger19 Apr 17, 2019
56d3741
sixth set of download tracking URL updates
TerryGLee Apr 17, 2019
70f8f22
Merge pull request #4461 from TerryGLee/tglee-urlupdate
PRMerger19 Apr 17, 2019
6ab1ae2
add 16.1 links and info to What's New
TerryGLee Apr 17, 2019
acce944
minor text refinement
TerryGLee Apr 17, 2019
9a05631
link text update
TerryGLee Apr 17, 2019
f878374
Merge pull request #4462 from TerryGLee/tglee-whatsnew
PRMerger9 Apr 17, 2019
b8bfe96
fixes #3098
gewarren Apr 17, 2019
27a5cb6
fixes #3091
gewarren Apr 17, 2019
f4f13f2
Updating Accessibility in VS Mac
Apr 17, 2019
c9e2c84
fixes #3085
gewarren Apr 17, 2019
ddf6822
fixes #3020
gewarren Apr 17, 2019
6d397bc
Merge pull request #4464 from gewarren/issues-0417
ktoliver Apr 17, 2019
b2cd9b3
fix: MD031/blanks-around-fences
nschonni Apr 17, 2019
93a9a67
Merge pull request #4465 from MicrosoftDocs/repo_sync_working_branch
gewarren Apr 17, 2019
1110e4c
align image under procedure step
ktoliver Apr 17, 2019
1b690ac
Merge pull request #4466 from MicrosoftDocs/repo_sync_working_branch
gewarren Apr 17, 2019
88a9ef0
Merge pull request #4463 from alanjclark/vsmac-accessibility
ktoliver Apr 17, 2019
1ba6a99
Review feedback and refactoring
dotpaul Apr 17, 2019
9e22451
VB NameOf()
dotpaul Apr 17, 2019
db47406
How can I avoid extra blank lines after an !INCLUDE?
dotpaul Apr 18, 2019
449fb28
add product lifecycle and servicing link to admin guide
TerryGLee Apr 18, 2019
71d2de9
add link to network install
TerryGLee Apr 18, 2019
b193fcb
add link to deployment-related content
TerryGLee Apr 18, 2019
bac1417
refresh PR
TerryGLee Apr 18, 2019
e430d87
Merge pull request #4468 from TerryGLee/tglee-installfix
PRMerger10 Apr 18, 2019
1e26465
No more include for common fixes
dotpaul Apr 18, 2019
f12601b
Merge branch 'fix--MD031/blanks-around-fences' of https://github.com/…
ktoliver Apr 18, 2019
6d7b7c7
Merge pull request #4467 from dotpaul/BinaryFormatterRules
ktoliver Apr 18, 2019
4f19037
fix list alignment in note
ktoliver Apr 18, 2019
acda74d
updating links to 2017 download
timeyoutakeit Apr 18, 2019
c94ccd9
fixing link
timeyoutakeit Apr 18, 2019
4dbe21b
fixing link
timeyoutakeit Apr 18, 2019
4310666
Merge pull request #4472 from asb3993/amburns-install2017
PRMerger16 Apr 18, 2019
d30aa69
Merge pull request #4471 from ktoliver/public-3077
itechedit Apr 18, 2019
4a673c5
VS download link updates
Mikejo5000 Apr 18, 2019
224c822
fixes #793
gewarren Apr 18, 2019
a628120
Merge pull request #4473 from MicrosoftDocs/repo_sync_working_branch
gewarren Apr 18, 2019
695b6c4
fixed merge conflict
Mikejo5000 Apr 18, 2019
9c8692e
reverted issue3016
Mikejo5000 Apr 18, 2019
77ce7ef
Merge pull request #4474 from Mikejo5000/mikejo-br15
PRMerger20 Apr 18, 2019
3c5c09a
acrolinx
gewarren Apr 18, 2019
b115023
Merge pull request #4475 from gewarren/2104
PRMerger12 Apr 18, 2019
6182c0b
Merge pull request #4476 from MicrosoftDocs/repo_sync_working_branch
gewarren Apr 18, 2019
4fcd33d
Merge pull request #4477 from MicrosoftDocs/master
Taojunshen Apr 18, 2019
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
1 change: 0 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"MD027": false,
"MD028": false,
"MD029": false,
"MD031": false,
"MD032": false,
"MD033": {
"allowed_elements": [
Expand Down
5 changes: 5 additions & 0 deletions docs/ai/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Deep learning frameworks rely on pip for their own installation.
Then, we need to verify whether Python 3.5 is installed correctly, and upgrade pip to the latest version by executing the following commands in a terminal:

- **Windows**

```cmd
C:\Users\test>python -V
Python 3.5.4
Expand All @@ -92,6 +93,7 @@ Then, we need to verify whether Python 3.5 is installed correctly, and upgrade p
```
- **macOS**
```bash
MyMac:~ test$ python3.5 -V
Python 3.5.4
Expand Down Expand Up @@ -153,10 +155,13 @@ Visit [here](https://caffe2.ai/docs/getting-started.html) to build from source c
To install MXNet, run the following command in a terminal:

- With GPU

```bash
pip3.5 install mxnet-cu80==0.12.0
```

- Without GPU

```bash
pip3.5 install mxnet==0.12.0
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ If you're using Azure SDK 2.5 and want to specify a custom data source, you can
<DataSource name="CustomDataSource!*" />
</WindowsEventLog>
```

### Performance counters
Performance counter information can help you locate system bottlenecks and fine-tune system and application performance. For more information, see [Create and use performance counters in an Azure application](https://msdn.microsoft.com/library/azure/hh411542.aspx). To capture performance counters, select the **Enable transfer of Performance Counters** check box. To increase or decrease the interval between the transfer of event logs to your storage account, change the **Transfer Period (min)** value. Select the check boxes for the performance counters that you want to track.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ while (true)
}
}
```

## Consider using asynchronous Service Bus methods
### ID
AP2003
Expand Down
1 change: 1 addition & 0 deletions docs/azure/vs-azure-tools-resource-groups-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ The following procedures walk you through the steps necessary to configure conti
```
-_artifactsLocation $(artifactsLocation) -_artifactsLocationSasToken (ConvertTo-SecureString -String "$(artifactsLocationSasToken)" -AsPlainText -Force)
```
![Configure Azure Resource Group Deployment Task](media/vs-azure-tools-resource-groups-ci-in-vsts/walkthrough18.png)
7. After you’ve added all the required items, save the build pipeline and choose **Queue new build** at the top.
Expand Down
2 changes: 2 additions & 0 deletions docs/code-quality/C26404.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Once owner pointer releases or transfers its resource, it gets into an "invalid"
Deleting such a pointer may lead to immediate memory corruption due to double delete, or to an access violation when the deleted resource is accessed from another owner pointer.

## Example 1: Deleting an owner after transferring its value

```cpp
gsl::owner<State*> validState = nullptr;
gsl::owner<State*> state = ReadState();
Expand All @@ -27,6 +28,7 @@ if (!IsValid(state))
```

## Example 2: Deleting an uninitialized owner

```cpp
gsl::owner<Message*> message;
if (popLast)
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/C26405.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ms.workload:
If an owner pointer already points to a valid memory buffer, it must not be assigned to another value without releasing its current resource first. Such assignment may lead to a resource leak even if the resource address is copied into some raw pointer (because raw pointers shouldn’t release resources).

## Example 1: Overwriting an owner in a loop

```cpp
gsl::owner<Shape*> shape = nullptr;
while (shape = NextShape()) // C26405
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/C26406.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ms.workload:
Owners are initialized from allocations or from other owners. Assigning a value from a raw pointer to an owner pointer is not allowed. Raw pointers don’t guarantee ownership transfer; there is still may be an original owner which holds the resource and will attempt to release it. Note that assigning a value from owner to a raw pointer is fine; raw pointers are valid clients to access resources, but not to manage them.

## Example 1: Using address of object

```cpp
gsl::owner<Socket*> socket = defaultSocket ? &defaultSocket : new Socket(); // C26406
```
5 changes: 5 additions & 0 deletions docs/code-quality/C26407.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,31 @@ To avoid unnecessary use of pointers we try to detect common patterns of local a
- The pattern is detected only for local variables, so we don’t warn on cases where an allocation is assigned to, say, a global variable and then deleted in the same function.

## Example 1: Unnecessary object allocation on heap

```cpp
auto tracer = new Tracer();
ScanObjects(tracer);
delete tracer; // C26407
```
## Example 2: Unnecessary object allocation on heap (fixed with local object)
```cpp
Tracer tracer; // OK
ScanObjects(&tracer);
```

## Example 3: Unnecessary buffer allocation on heap

```cpp
auto value = new char[maxValueSize];
if (ReadSetting(name, value, maxValueSize))
CheckValue(value);
delete[] value; // C26407
```
## Example 4: Unnecessary buffer allocation on the heap (fixed with container)
```cpp
auto value = std::vector<char>(maxValueSize); // OK
if (ReadSetting(name, value.data(), maxValueSize))
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/C26410.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Generally, references to const unique pointer are meaningless. They can safely b
- Template code may produce a lot of noise. Keep in mind that templates can be instantiated with various type parameters with different levels of indirection, including references. Some warnings may not be obvious and fixes may require some rework of templates (for example, explicit removal of reference indirection). If template code is intentionally generic, the warning can be suppressed.

## Example 1: Unnecessary reference

```cpp
std::vector<std::unique_ptr<Tree>> roots = GetRoots();
std::for_each(
Expand Down
4 changes: 4 additions & 0 deletions docs/code-quality/C26450.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ int multiply()
return c;
}
```

To correct this warning, use the following code.

```cpp
Expand All @@ -53,6 +54,7 @@ int add()
return c;
}
```

To correct this warning, use the following code:

```cpp
Expand All @@ -64,6 +66,7 @@ long long add()
return c;
}
```

## Example 3

```cpp
Expand All @@ -75,6 +78,7 @@ int subtract()
return c;
}
```

To correct this warning, use the following code.

```cpp
Expand Down
2 changes: 2 additions & 0 deletions docs/code-quality/C26451.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void leftshift(int i)
// code
}
```
To correct this warning, use the following code:
```cpp
Expand All @@ -41,6 +42,7 @@ void leftshift(int i)
// code
}
```

## Example 2

```cpp
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/C26452.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ unsigned __int64 combine(unsigned lo, unsigned hi)
return (hi << 32) | lo; // C26252 here
}
```
To correct this warning, use the following code:
```cpp
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/C26454.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ unsigned int negativeunsigned()
return x;
}
```

To correct this warning, use the following code:

```cpp
Expand Down
1 change: 1 addition & 0 deletions docs/code-quality/c28112.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ inter_var --;
...
InterlockedIncrement(&inter_var);
```

The following code example avoids this warning:

```cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "CA2104: Do not declare read only mutable reference types"
title: "CA2104: Do not declare read-only mutable reference types"
ms.date: 11/01/2018
ms.topic: reference
f1_keywords:
Expand Down Expand Up @@ -29,7 +29,7 @@ ms.workload:
|Breaking Change|Non-breaking|

> [!NOTE]
> Rule CA2104 is obsolete and will be removed in a future version of Visual Studio.
> Rule CA2104 is obsolete and will be removed in a future version of Visual Studio. It will not be implemented as an [analyzer](roslyn-analyzers-overview.md) due to the complicated analysis that's required to determine the actual immutability of a type.

## Cause

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@ This rule finds <xref:System.Runtime.Serialization.Formatters.Binary.BinaryForma
- If possible, use a secure serializer instead, and **don't allow an attacker to specify an arbitrary type to deserialize**. Some safer serializers include:
- <xref:System.Runtime.Serialization.DataContractSerializer?displayProperty=nameWithType>
- <xref:System.Runtime.Serialization.Json.DataContractJsonSerializer?displayProperty=nameWithType>
- <xref:System.Web.Script.Serialization.JavaScriptSerializer?displayProperty=nameWithType> - Never use <xref:System.Web.Script.Serialization.SimpleTypeResolver?displayProperty=nameWithType>. If you must use a type resolver, you must restrict deserialized types to an expected list.
- <xref:System.Web.Script.Serialization.JavaScriptSerializer?displayProperty=nameWithType> - Never use <xref:System.Web.Script.Serialization.SimpleTypeResolver?displayProperty=nameWithType>. If you must use a type resolver, restrict deserialized types to an expected list.
- <xref:System.Xml.Serialization.XmlSerializer?displayProperty=nameWithType>
- NewtonSoft Json.NET - Use TypeNameHandling.None. If you must use another value for TypeNameHandling, then you must restrict deserialized types to an expected list.
- NewtonSoft Json.NET - Use TypeNameHandling.None. If you must use another value for TypeNameHandling, restrict deserialized types to an expected list with a custom ISerializationBinder.
- Protocol Buffers
- Make the serialized data tamper proof. After serialization, cryptographically sign the serialized data. Before deserializing, validate the cryptographic signature. You must protect the cryptographic key from being disclosed, and should design for key rotations.
- Make the serialized data tamper-proof. After serialization, cryptographically sign the serialized data. Before deserialization, validate the cryptographic signature. Protect the cryptographic key from being disclosed, and design for key rotations.
- Restrict deserialized types. Implement a custom <xref:System.Runtime.Serialization.SerializationBinder?displayProperty=nameWithType>. Before deserializing with <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter>, set the <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Binder> property to an instance of your custom <xref:System.Runtime.Serialization.SerializationBinder>. In the overridden <xref:System.Runtime.Serialization.SerializationBinder.BindToType%2A> method, if the type is unexpected then throw an exception.
- If you restrict deserialized types, you may want to disable this rule and enable rules [CA2301](ca2301-do-not-call-binaryformatter-deserialize-without-first-setting-binaryformatter-binder.md) and [CA2302](ca2302-ensure-binaryformatter-binder-is-set-before-calling-binaryformatter-deserialize.md). Enabling rules [CA2301](ca2301-do-not-call-binaryformatter-deserialize-without-first-setting-binaryformatter-binder.md) and [CA2302](ca2302-ensure-binaryformatter-binder-is-set-before-calling-binaryformatter-deserialize.md) will help ensure that the <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Binder> property is always set before deserializing.
- If you restrict deserialized types, you may want to disable this rule and enable rules [CA2301](ca2301-do-not-call-binaryformatter-deserialize-without-first-setting-binaryformatter-binder.md) and [CA2302](ca2302-ensure-binaryformatter-binder-is-set-before-calling-binaryformatter-deserialize.md). Rules [CA2301](ca2301-do-not-call-binaryformatter-deserialize-without-first-setting-binaryformatter-binder.md) and [CA2302](ca2302-ensure-binaryformatter-binder-is-set-before-calling-binaryformatter-deserialize.md) help to ensure that the <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Binder> property is always set before deserializing.

## When to suppress warnings

- It's safe to suppress a warning from this rule if you know the input is trusted. Consider that your application's trust boundary and data flows may change over time.
- It's safe to suppress this warning if you've taken one of the precautions above.
[!INCLUDE[insecure-deserializers-common-safe-to-suppress](includes/insecure-deserializers-common-safe-to-suppress-md.md)]

## Pseudo-code examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@ This rule finds <xref:System.Runtime.Serialization.Formatters.Binary.BinaryForma
- If possible, use a secure serializer instead, and **don't allow an attacker to specify an arbitrary type to deserialize**. Some safer serializers include:
- <xref:System.Runtime.Serialization.DataContractSerializer?displayProperty=nameWithType>
- <xref:System.Runtime.Serialization.Json.DataContractJsonSerializer?displayProperty=nameWithType>
- <xref:System.Web.Script.Serialization.JavaScriptSerializer?displayProperty=nameWithType> - Never use <xref:System.Web.Script.Serialization.SimpleTypeResolver?displayProperty=nameWithType>. If you must use a type resolver, you must restrict deserialized types to an expected list.
- <xref:System.Web.Script.Serialization.JavaScriptSerializer?displayProperty=nameWithType> - Never use <xref:System.Web.Script.Serialization.SimpleTypeResolver?displayProperty=nameWithType>. If you must use a type resolver, restrict deserialized types to an expected list.
- <xref:System.Xml.Serialization.XmlSerializer?displayProperty=nameWithType>
- NewtonSoft Json.NET - Use TypeNameHandling.None. If you must use another value for TypeNameHandling, then you must restrict deserialized types to an expected list.
- NewtonSoft Json.NET - Use TypeNameHandling.None. If you must use another value for TypeNameHandling, restrict deserialized types to an expected list with a custom ISerializationBinder.
- Protocol Buffers
- Make the serialized data tamper proof. After serialization, cryptographically sign the serialized data. Before deserializing, validate the cryptographic signature. You must protect the cryptographic key from being disclosed, and should design for key rotations.
- Make the serialized data tamper-proof. After serialization, cryptographically sign the serialized data. Before deserialization, validate the cryptographic signature. Protect the cryptographic key from being disclosed, and design for key rotations.
- Restrict deserialized types. Implement a custom <xref:System.Runtime.Serialization.SerializationBinder?displayProperty=nameWithType>. Before deserializing with <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter>, set the <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Binder> property to an instance of your custom <xref:System.Runtime.Serialization.SerializationBinder>. In the overridden <xref:System.Runtime.Serialization.SerializationBinder.BindToType%2A> method, if the type is unexpected then throw an exception.

## When to suppress warnings

- It's safe to suppress a warning from this rule if you know the input is trusted. Consider that your application's trust boundary and data flows may change over time.
- It's safe to suppress this warning if you've taken one of the precautions above.
[!INCLUDE[insecure-deserializers-common-safe-to-suppress](includes/insecure-deserializers-common-safe-to-suppress-md.md)]

## Pseudo-code examples

Expand Down Expand Up @@ -114,6 +113,7 @@ End Class
```

### Solution

```csharp
using System;
using System.IO;
Expand All @@ -135,7 +135,7 @@ public class BookRecordSerializationBinder : SerializationBinder
}
else
{
throw new ArgumentException("Unexpected type", "typeName");
throw new ArgumentException("Unexpected type", nameof(typeName));
}
}
}
Expand Down Expand Up @@ -188,7 +188,7 @@ Public Class BookRecordSerializationBinder
If typeName = "BinaryFormatterVB.BookRecord" Or typeName = "BinaryFormatterVB.AisleLocation" Then
Return Nothing
Else
Throw New ArgumentException("Unexpected type", "typeName")
Throw New ArgumentException("Unexpected type", NameOf(typeName))
End If
End Function
End Class
Expand Down
Loading