Skip to content

Commit

Permalink
Lab structure reorg, user and passwords removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizMacedo committed May 11, 2022
1 parent ffffc36 commit 2ceda47
Show file tree
Hide file tree
Showing 22 changed files with 1,730 additions and 1,995 deletions.
7 changes: 4 additions & 3 deletions Instructions/Labs/AZ400_M00_Validate_lab_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ lab:
---

# Lab 00: Validate lab environment

# Student lab manual

## Instructions

1. Get a new **Azure Pass promocode** (valid for 30 days) from the instructor or other source.
2. Use a private browser session to get a new **Microsoft Account (MSA)** at [Microsoft account](https://account.microsoft.com) or use an existing one.
3. Using the same browser session, go to [Microsoft Azure Pass](https://www.microsoftazurepass.com) to redeem your Azure Pass using your Microsoft Account (MSA). For details, see [Redeem a Microsoft Azure Pass](https://www.microsoftazurepass.com/Home/HowTo?Length=5). Follow the instructions for redemption.
4. Using the same browser session, go to [Microsoft Azure](https://portal.azure.com), then search at the top of the portal screen for **Azure DevOps**. In the resulting page, click **Azure DevOps organizations**.
3. Using the same browser session, go to [Microsoft Azure Pass](https://www.microsoftazurepass.com) to redeem your Azure Pass using your Microsoft Account (MSA). For details, see [Redeem a Microsoft Azure Pass](https://www.microsoftazurepass.com/Home/HowTo?Length=5). Follow the instructions for redemption.
4. Using the same browser session, go to [Microsoft Azure](https://portal.azure.com), then search at the top of the portal screen for **Azure DevOps**. In the resulting page, click **Azure DevOps organizations**.
5. Next, click on the link labelled **My Azure DevOps Organizations** or navigate directly to [My Information](https://aex.dev.azure.com).
6. On the **We need a few more details** page, select **Continue**.
7. In the drop-down box on the left, choose **Default Directory**, instead of “Microsoft Account”.
Expand All @@ -23,7 +24,7 @@ lab:
12. Once the newly created organization opens in **Azure DevOps**, click **Organization settings** in the bottom left corner.
13. At the **Organization settings** screen click **Billing** (opening this screen takes a few seconds).
14. Click **Setup billing** and on the right-hand side of the screen select the **Azure Pass - Sponsorship** subscription and click **Save** to link the subscription with the organization.
15. Once the screen shows the linked Azure Subscription ID at the top, change the number of **Paid parallel jobs** for **MS Hosted CI/CD** from 0 to **1**. Then click the **SAVE** button at the bottom.
15. Once the screen shows the linked Azure Subscription ID at the top, change the number of **Paid parallel jobs** for **MS Hosted CI/CD** from 0 to **1**. Then click the **SAVE** button at the bottom.
16. **Wait at least 3 hours before using the CI/CD capabilities** so that the new settings are reflected in the back end. Otherwise, you will still see the message *"This agent is not running because you have reached the maximum number of requests…"*.
17. In Organization Settings, go to Security -> **Policies**
18. **Turn on** "Third-party application access via OAuth"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

163 changes: 74 additions & 89 deletions Instructions/Labs/AZ400_M04_Creating_a_Release_Dashboard.md

Large diffs are not rendered by default.

196 changes: 92 additions & 104 deletions Instructions/Labs/AZ400_M05_Configuring_Pipelines_as_Code_with_YAML.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

177 changes: 81 additions & 96 deletions Instructions/Labs/AZ400_M05_Setting_Up_and_Running_Functional_Tests.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ lab:
---

# Lab 15: Implement Security and Compliance in an Azure DevOps pipeline

# Student lab manual

## Lab requirements

- This lab requires **Microsoft Edge** or an [Azure DevOps supported browser.](https://docs.microsoft.com/en-us/azure/devops/server/compatibility?view=azure-devops#web-portal-supported-browsers)

- **Set up an Azure DevOps organization:** If you don't already have an Azure DevOps organization that you can use for this lab, create one by following the instructions available at [Create an organization or project collection](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/create-organization?view=azure-devops).

## Lab overview

In this lab, you will use **WhiteSource Bolt with Azure DevOps** to automatically detect vulnerable open source components, outdated libraries, and license compliance issues in your code. You will leverage WebGoat, an intentionally insecure web application, maintained by OWASP designed to illustrate common web application security issues.
Expand All @@ -29,31 +36,10 @@ After you complete this lab, you will be able to:
- Activate WhiteSource Bolt
- Run a build pipeline and review WhiteSource security and compliance report

## Lab duration

- Estimated time: **45 minutes**
## Estimated timing: 45 minutes

## Instructions

### Before you start

#### Sign in to the lab virtual machine

Ensure that you're signed in to your Windows 10 computer by using the following credentials:

- Username: **Student**
- Password: **Pa55w.rd**

#### Review applications required for this lab

Identify the applications that you'll use in this lab:

- Microsoft Edge

#### Set up an Azure DevOps organization.

If you don't already have an Azure DevOps organization that you can use for this lab, create one by following the instructions available at [Create an organization or project collection](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/create-organization?view=azure-devops).

### Exercise 0: Configure the lab prerequisites

In this exercise, you will set up the prerequisites for the lab, which consist of a new Azure DevOps project with a repository based on the [Parts Unlimited MRP GitHub repository](https://www.github.com/microsoft/partsunlimitedmrp).
Expand All @@ -62,19 +48,19 @@ In this exercise, you will set up the prerequisites for the lab, which consist o

In this task, you will use Azure DevOps Demo Generator to generate a new project based on the [WhiteSource-Bolt template](https://azuredevopsdemogenerator.azurewebsites.net/?name=WhiteSource-Bolt&templateid=77362)

1. On your lab computer, start a web browser and navigate to [Azure DevOps Demo Generator](https://azuredevopsdemogenerator.azurewebsites.net). This utility site will automate the process of creating a new Azure DevOps project within your account that is prepopulated with content (work items, repos, etc.) required for the lab.
1. On your lab computer, start a web browser and navigate to [Azure DevOps Demo Generator](https://azuredevopsdemogenerator.azurewebsites.net). This utility site will automate the process of creating a new Azure DevOps project within your account that is prepopulated with content (work items, repos, etc.) required for the lab.

> **Note**: For more information on the site, see https://docs.microsoft.com/en-us/azure/devops/demo-gen.
> **Note**: For more information on the site, see <https://docs.microsoft.com/en-us/azure/devops/demo-gen>.
1. Click **Sign in** and sign in using the Microsoft account associated with your Azure DevOps subscription.
1. If required, on the **Azure DevOps Demo Generator** page, click **Accept** to accept the permission requests for accessing your Azure DevOps subscription.
1. On the **Create New Project** page, in the **New Project Name** textbox, type **WhiteSource Bolt**, in the **Select organization** dropdown list, select your Azure DevOps organization, and then click **Choose template**.
1. In the list of templates, in the toolbar, click **DevOps Labs**, select the **WhiteSource Bolt** template and click **Select Template**.
1. Back on the **Create New Project** page, if prompted to install a missing extension, select the checkbox below the **WhiteSource Bolt** and click **Create Project**.
1. Click **Sign in** and sign in using the Microsoft account associated with your Azure DevOps subscription.
1. If required, on the **Azure DevOps Demo Generator** page, click **Accept** to accept the permission requests for accessing your Azure DevOps subscription.
1. On the **Create New Project** page, in the **New Project Name** textbox, type **WhiteSource Bolt**, in the **Select organization** dropdown list, select your Azure DevOps organization, and then click **Choose template**.
1. In the list of templates, in the toolbar, click **DevOps Labs**, select the **WhiteSource Bolt** template and click **Select Template**.
1. Back on the **Create New Project** page, if prompted to install a missing extension, select the checkbox below the **WhiteSource Bolt** and click **Create Project**.

> **Note**: Wait for the process to complete. This should take about 2 minutes. In case the process fails, navigate to your DevOps organization, delete the project, and try again.
1. On the **Create New Project** page, click **Navigate to project**.
1. On the **Create New Project** page, click **Navigate to project**.

### Exercise 1: Implement Security and Compliance in an Azure DevOps pipeline by using WhiteSource Bolt

Expand All @@ -84,16 +70,16 @@ In this exercise, leverage WhiteSource Bolt to scan the project code for securit

In this task, you will activate WhiteSource Bolt in the newly generated Azure Devops project.

1. On your lab computer, in the web browser window displaying the Azure DevOps portal with the **WhiteSource Bolt** project open, **in the vertical menu bar** at the far left of the Azure DevOps portal, click **Pipelines** section and **WhiteSource Bolt** option (in the vertical menu bar under "Deployment Groups" option).
1. On the **You're almost there** pane, provide your **Work Email** and **Company Name**, in the **Country** dropdown list, select the entry representing your country, and click *Get Started* button to start using the *Free* version of WhiteSource Bolt. This will automatically open a new browser tab displaying the **Get Started With Bolt** page.
1. Switch back to the web browser tab displaying the Azure DevOps portal and verify that the **You are using a FREE version of WhiteSource Bolt** is displayed.
1. On your lab computer, in the web browser window displaying the Azure DevOps portal with the **WhiteSource Bolt** project open, **in the vertical menu bar** at the far left of the Azure DevOps portal, click **Pipelines** section and **WhiteSource Bolt** option (in the vertical menu bar under "Deployment Groups" option).
1. On the **You're almost there** pane, provide your **Work Email** and **Company Name**, in the **Country** dropdown list, select the entry representing your country, and click *Get Started* button to start using the *Free* version of WhiteSource Bolt. This will automatically open a new browser tab displaying the **Get Started With Bolt** page.
1. Switch back to the web browser tab displaying the Azure DevOps portal and verify that the **You are using a FREE version of WhiteSource Bolt** is displayed.

#### Task 2: Trigger a build

In this task, you will trigger a build within your Java code-based Azure DevOps project. You will use **WhiteSource Bolt** extension to identify vulnerable components present in this code.

1. On your lab computer, in the vertical menu bar on the left side, navigate to the **Pipelines** section, click **WhileSourceBolt**, click **Run pipeline** and then, on the **Run pipeline** pane, click **Run**.
1. On the **Summary** tab of the build pane, in the **Jobs** section, click **Phase 1** and monitor the progress of the build process.
1. On your lab computer, in the vertical menu bar on the left side, navigate to the **Pipelines** section, click **WhileSourceBolt**, click **Run pipeline** and then, on the **Run pipeline** pane, click **Run**.
1. On the **Summary** tab of the build pane, in the **Jobs** section, click **Phase 1** and monitor the progress of the build process.

> **Note**: The build may take a few minutes to complete. The build definition consists of the following tasks:
Expand All @@ -104,20 +90,20 @@ In this task, you will trigger a build within your Java code-based Azure DevOps
| ![whitesourcebolt](images/m07/whitesourcebolt.png) **WhiteSource Bolt** | scans the code in the provided working directory/root directory to detect security vulnerabilities, problematic open source licenses |
| ![copy-files](images/m07/copy-files.png) **Copy Files** | copies the resulting JAR files from the source to the destination folder using match patterns |
| ![publish-build-artifacts](images/m07/publish-build-artifacts.png) **Publish Build Artifacts** | publishes the artifacts produced by the build |
1. Once the build completes, navigate back to the **Summary** tab and review **Tests and coverage** section.

1. Once the build completes, navigate back to the **Summary** tab and review **Tests and coverage** section.

#### Task 3: Analyze Reports

In this task, you will review the WhiteSource Bolt build report.
In this task, you will review the WhiteSource Bolt build report.

1. On the build pane, click the **WhiteSource Bolt Build Report** tab header and wait for the report to fully render.
1. While on the **WhiteSource Bolt Build Report** tab, verify that WhiteSource Bolt automatically detected Open Source components in the software including transitive dependencies and their respective licenses.
1. While on the **WhiteSource Bolt Build Report** tab, review the Security dashboard, displaying the vulnerabilities discovered during the build.
1. On the build pane, click the **WhiteSource Bolt Build Report** tab header and wait for the report to fully render.
1. While on the **WhiteSource Bolt Build Report** tab, verify that WhiteSource Bolt automatically detected Open Source components in the software including transitive dependencies and their respective licenses.
1. While on the **WhiteSource Bolt Build Report** tab, review the Security dashboard, displaying the vulnerabilities discovered during the build.

> **Note**: The report displays the list of all vulnerable open source components, including **Vulnerability Score**, **Vulnerable Libraries**, and **Severity Distribution**. You can identify the opensource license distribution by leveraging a detailed view of all components and links to their metadata and licensed references.
1. While on the **WhiteSource Bolt Build Report** tab, scroll down to the **Outdated Libraries** section and review its content.
1. While on the **WhiteSource Bolt Build Report** tab, scroll down to the **Outdated Libraries** section and review its content.

> **Note**: WhiteSource Bolt tracks outdated libraries in the project, providing library details, links to newer versions, and remediation recommendations.
Expand Down
Loading

0 comments on commit 2ceda47

Please sign in to comment.