Keyboard Time: 10 mins, Automation Wait Time: 5 mins
Scenarios: Instructor-Led, Self-Paced
GitLab’s MR view of vunerability findings and code quality changes are unique among security tooling because:
Perform security scanning on the application.
Explore the Merge Request view of vulnerability findings.
Open ‘yourpersonalgroup/hello-world’
In the left navigation Click Repository => Files
Near the top right of the page Click *Web IDE* (button)
In the left file navigation Navigate to the file src/microwebserver.py
Around line 11, locate the text <BODY style="background:
Change the color after the word background:
to beige
Result: <BODY style="background:beige">
Other available color values are listed here
In the left file navigation Click Dockerfile
Change the first line starting with FROM to FROM python:3.6-slim-bullseye
In the left file navigation Click .gitlab-ci.yml
Delete or Comment the line STAGING_ENABLED: true
This will speed our labs up - keep in mind the production environment is only published the container - so a review environment and production environment for integration may be enough environments for your development process.
Click Create commit…
Select Create a new branch (Should be the default)
Leave the default branch name.
Check Start a new merge request (should be defaulted to checked)
Click Commit
On the ‘New merge request’ page, for Title, Type Updating color
Click Create merge request
You will be put within the context of the new merge request
On the Merge Request page locate the tab bar containing Overview, Commits, Pipelines and Changes.
Click Pipelines
Merge Request pipelines are specifically associated with a Merge Request as well as the underlying branch.
To open the pipeline page, Click [the Status badge] or [the pipeline #]
The Review stage is where GitLab is creating a temporary copy of the running application so that Dynamic Application Security Testing (DAST) can be performed or any other type of QA requiring a running copy of the application.
[Automation wait: ~5 min] Wait for the Review stage to complete.
On the left navigation, Click Deployments => Environments
Next to ‘review/<your_mr_branch_name>’ Click Open.
This review environment should have the new background color.
In the browser tabs, Click Environments
Next to ‘production’ Click Open
The production environment should have the original background color.
In the browser tabs, Click Environments
In the left navigation, Click Merge Requests
Click [your merge request (“Updating color”)]
In the main page body, next to ‘Security scanning detected…’, Click Expand
In the left navigation, Click [one of the findings links]
Click [the small X in the upper right corner]
Take a mental note of the total number of Critical findings.
In the left navigation, Click Security & Compliance => Vulnerability report
Hover over the description for one of the vulnerabilities and notice the branch reference. They are all from the main branch.
The Merge Request gives excellent motivational context for the formation of an active vulnerability remediation habit because:
Perform security scanning on the application.
Explore the Merge Request view of vulnerability findings.