Skip to content

Commit 6bb795e

Browse files
Merge pull request #270951 from cdpark/group3-secure-code-blackmist
User Story 233117: Q&M: March AzureML Freshness updates - Secure code
2 parents c71b1fa + f95c829 commit 6bb795e

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
---
22
title: Secure code best practices
33
titleSuffix: Azure Machine Learning
4-
description: Learn about potential security threats that may exist when developing for Azure Machine Learning, mitigations, and best practices.
4+
description: Learn about potential security threats that exist when developing for Azure Machine Learning, mitigations, and best practices.
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: enterprise-readiness
88
ms.topic: conceptual
99
ms.author: larryfr
1010
author: Blackmist
1111
ms.reviewer: deeikele
12-
ms.date: 03/11/2024
12+
ms.date: 04/02/2024
1313
---
1414

15-
# Secure code best practices with Azure Machine Learning
15+
# Best practices for secure code
1616

17-
In Azure Machine Learning, you can upload files and content from any source into Azure. Content within Jupyter notebooks or scripts that you load can potentially read data from your sessions, access data within your organization in Azure, or run malicious processes on your behalf.
17+
In Azure Machine Learning, you can upload files and content from any source into Azure. Content within Jupyter notebooks or scripts that you load can potentially read data from your sessions, access sensitive data within your organization in Azure, or run malicious processes on your behalf.
1818

1919
> [!IMPORTANT]
2020
> Only run notebooks or scripts from trusted sources. For example, where you or your security team have reviewed the notebook or script.
2121
2222
## Potential threats
2323

24-
Development with Azure Machine Learning often involves web-based development environments (Notebooks & Azure Machine Learning studio). When you use web-based development environments, the potential threats are:
24+
Development with Azure Machine Learning often involves web-based development environments, such as notebooks or the Azure Machine Learning studio. When you use web-based development environments, the potential threats are:
2525

26-
* [Cross site scripting (XSS)](https://owasp.org/www-community/attacks/xss/)
26+
* [Cross-site scripting (XSS)](https://owasp.org/www-community/attacks/xss/)
2727

2828
* __DOM injection__: This type of attack can modify the UI displayed in the browser. For example, by changing how the run button behaves in a Jupyter Notebook.
29-
* __Access token/cookies__: XSS attacks can also access local storage and browser cookies. Your Microsoft Entra authentication token is stored in local storage. An XSS attack could use this token to make API calls on your behalf, and then send the data to an external system or API.
29+
* __Access token or cookies__: XSS attacks can also access local storage and browser cookies. Your Microsoft Entra authentication token is stored in local storage. An XSS attack could use this token to make API calls on your behalf, and then send the data to an external system or API.
3030

31-
* [Cross site request forgery (CSRF)](https://owasp.org/www-community/attacks/csrf): This attack may replace the URL of an image or link with the URL of a malicious script or API. When the image is loaded, or link clicked, a call is made to the URL.
31+
* [Cross-site request forgery (CSRF)](https://owasp.org/www-community/attacks/csrf): This attack could replace the URL of an image or link with the URL of a malicious script or API. When the image is loaded, or link clicked, a call is made to the URL.
3232

3333
## Azure Machine Learning studio notebooks
3434

35-
Azure Machine Learning studio provides a hosted notebook experience in your browser. Cells in a notebook can output HTML documents or fragments that contain malicious code. When the output is rendered, the code can be executed.
35+
Azure Machine Learning studio provides a hosted notebook experience in your browser. Cells in a notebook can output HTML documents or fragments that contain malicious code. When the output is rendered, the code can be executed.
3636

3737
__Possible threats__:
38-
* Cross site scripting (XSS)
39-
* Cross site request forgery (CSRF)
38+
* Cross-site scripting (XSS)
39+
* Cross-site request forgery (CSRF)
4040

4141
__Mitigations provided by Azure Machine Learning__:
4242
* __Code cell output__ is sandboxed in an iframe. The iframe prevents the script from accessing the parent DOM, cookies, or session storage.
4343
* __Markdown cell__ contents are cleaned using the dompurify library. This blocks malicious scripts from executing with markdown cells are rendered.
44-
* __Image URL__ and __Markdown links__ are sent to a Microsoft owned endpoint, which checks for malicious values. If a malicious value is detected, the endpoint rejects the request.
44+
* __Image URL__ and __markdown links__ are sent to a Microsoft-owned endpoint, which checks for malicious values. If a malicious value is detected, the endpoint rejects the request.
4545

4646
__Recommended actions__:
47-
* Verify that you trust the contents of files before uploading to studio. When uploading, you must acknowledge that you're uploading trusted files.
48-
* When selecting a link to open an external application, you'll be prompted to trust the application.
47+
* Verify that you trust the contents of files before uploading to the studio. You must acknowledge that you're uploading trusted files.
48+
* When selecting a link to open an external application, you're prompted to trust the application.
4949

5050
## Azure Machine Learning compute instance
5151

52-
Azure Machine Learning compute instance hosts __Jupyter__ and __Jupyter Lab__. When you use either, cells in a notebook or code in can output HTML documents or fragments that contain malicious code. When the output is rendered, the code can be executed. The same threats also apply when you use __RStudio__ and __Posit Workbench (formerly RStudio Workbench)__ hosted on a compute instance.
52+
Azure Machine Learning compute instance hosts Jupyter and JupyterLab. When you use either, code inside notebook cells can output HTML documents or fragments that contain malicious code. When the output is rendered, the code can be executed. The same threats apply when you use RStudio or Posit Workbench (formerly RStudio Workbench) hosted on a compute instance.
5353

5454
__Possible threats__:
55-
* Cross site scripting (XSS)
56-
* Cross site request forgery (CSRF)
55+
* Cross-site scripting (XSS)
56+
* Cross-site request forgery (CSRF)
5757

5858
__Mitigations provided by Azure Machine Learning__:
59-
* None. Jupyter and Jupyter Lab are open-source applications hosted on the Azure Machine Learning compute instance.
59+
* None. Jupyter and JupyterLab are open-source applications hosted on the Azure Machine Learning compute instance.
6060

6161
__Recommended actions__:
62-
* Verify that you trust the contents of files before uploading to studio. When uploading, you must acknowledge that you're uploading trusted files.
62+
* Verify that you trust the contents of files before uploading. You must acknowledge that you're uploading trusted files.
6363

64-
## Report security issues or concerns
64+
## Report security issues or concerns
6565

6666
Azure Machine Learning is eligible under the Microsoft Azure Bounty Program. For more information, visit [https://www.microsoft.com/msrc/bounty-microsoft-azure](https://www.microsoft.com/msrc/bounty-microsoft-azure).
6767

68-
## Next steps
68+
## Related content
6969

70-
* [Enterprise security for Azure Machine Learning](concept-enterprise-security.md)
70+
* [Enterprise security and governance for Azure Machine Learning](concept-enterprise-security.md)

articles/machine-learning/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@
13651365
href: how-to-manage-optimize-cost.md
13661366
- name: Monitor
13671367
href: monitor-azure-machine-learning.md
1368-
- name: Secure coding
1368+
- name: Secure code
13691369
displayName: security threat
13701370
href: concept-secure-code-best-practice.md
13711371
- name: Audit and manage

0 commit comments

Comments
 (0)