Skip to content

Commit 0137b63

Browse files
committed
adding new labs
1 parent 78998e7 commit 0137b63

File tree

6 files changed

+136
-0
lines changed

6 files changed

+136
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ This lab will have you utilize Secret Scanning with Push Protection to prevent s
5555

5656
---
5757

58+
### Lab 6 - Hands-on with Security Overview
59+
60+
This lab will teach you how to effectively use the Security Overview to review and alerts and coverage in an organization.
61+
62+
- Get started here - [Lab 5](./_labs/lab6.md)
63+
64+
---
65+
66+
### Extra Credit: Advanced CodeQL Setup
67+
68+
This open-ended extra credit lab will have you switch to the advanced CodeQL setup.
69+
70+
- Get started here - [Extra Credit Lab 1](./_labs/lab7-ec.md)
71+
72+
---
73+
74+
### Extra Credit: Custom Secret Scanning Patterns
75+
76+
This open-ended extra credit lab will have you create a custom secret scanning pattern.
77+
78+
- Get started here - [Extra Credit Lab 2](./_labs/lab8-ec.md)
79+
80+
---
81+
5882
## :book: Resources
5983
- [GitHub Docs - About GitHub Advanced Security](https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security)
6084
- [GitHub Security Learning Pathway](https://resources.github.com/learn/pathways/security/)

_labs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
3. [Lab 3 - Hands-on with Code Scanning (blocking vulnerable code from entering codebase and Copilot Autofix)](./lab3.md)
66
4. [Lab 4 - Hands-on with Dependency Review (blocking vulnerable dependencies from entering codebase)](./lab4.md)
77
5. [Lab 5 - Hands-on with Secret Scanning (secret scanning with push protections)](./lab5.md)
8+
6. [Lab 6 - Hands-on with Security Overview]((./lab6.md))
9+
7. [Extra credit: Advanced CodeQL Setup](./lab7-ec.md)
10+
8. [Extra credit: Custom Secret Scanning Patterns](./lab8-ec.md)

_labs/lab5.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ This lab covers parts of the following exam domains:
4242
Celebrate 🎉! We just prevented a secret from entering our codebase!
4343

4444
And there you have it. You should now have a good grasp on what GitHub Advanced Security is, how it works, and how to implement it. So get out there and keep your company secured!
45+
46+
➡️ Head back to the [labs](README.md) page to continue on to the next lab.

_labs/lab6.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Lab 5 - Hands-on with Security Overview
2+
3+
We've covered how to review alerts in a single repository, but how is your org or team doing? Next, we'll check out the Security Overview at the organizational level to see how we can get a high-level view of the security posture of our organization.
4+
5+
This lab covers parts of the following exam domains:
6+
7+
TODO: dunno what domains
8+
9+
- Domain 6: Describe GitHub Advanced Security best practices
10+
11+
## Exercise 1: Navigating to Security Overview
12+
13+
The Security Overview can be used by anyone inside of an organization; it shows repositories that you have access to. If you are an org owner or a security manager, you would see all alerts. If you are a regular org member, you would only see alerts for repositories by default that you have write access to.
14+
15+
> [!NOTE]
16+
> Security alerts for a repository are visible to people with write, maintain, or admin access to the repository and, when the repository is owned by an organization, organization owners. You can give additional teams and people access to the alerts.
17+
18+
1. Navigate to the organization. You can do so by **clicking on the org name** (`ghuwsec1953`) in the repository breadcrumbs in the upper left hand corner.
19+
- You can also navigate to your orgs by clicking on your profile picture and "**Your organizations**"
20+
2. Click on the **Security** tab.
21+
3. Review (and click on!) the different views on the left-hand side:
22+
- Overview: visualize trends in Detection, Remediation, and Prevention of security alerts ([docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/viewing-security-insights#about-security-insights))
23+
- Risk: explore the risk from security alerts of all types or focus on a single alert type and identify your risk from specific vulnerable dependencies, code weaknesses, or leaked secrets ([docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/assessing-code-security-risk))
24+
- Coverage: assess the adoption of code security features across repositories in the organization ([docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/assessing-adoption-code-security))
25+
- Enablement trends: see how quickly different teams are adopting security features
26+
- CodeQL pull request alerts: assess the impact of running CodeQL on pull requests and how development teams are resolving code scanning alerts ([docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/viewing-metrics-for-pull-request-alerts))
27+
- Secret scanning: find out which types of secret are blocked by push protection and which teams are bypassing push protection ([docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/viewing-metrics-for-secret-scanning-push-protection))
28+
29+
> [!TIP]
30+
> You can export a CSV of nearly from most of these views using the **Export CSV** button in the upper right.
31+
32+
4. Under the **Overview** view, navigate the sub-views, specifically **Detection** and **Remediation**.
33+
- Note the trends - this is useful information to evaluate the security posture of your organization. Are we getting better over time?
34+
- Being secure requires "constant vigilance"
35+
5. Navigate to the **Risk** view.
36+
6. On the right-hand side, click the **Teams ▾** button/dropdown.
37+
7. Click on the **all users** team - this team is only added to a different sample repo, so note how the total alerts changes.
38+
- This can be really useful for a manager, architect, or developer to see which repositories assigned to the teams have security features enabled and how many alerts they are generating.
39+
8. At the bottom of the options on the left, click the **+** to the right of security campaigns. Pick whichever option you want!
40+
- Security campaigns are a new feature designed to help administrators and security managers create targeted campaigns and track remediation progress effectively.
41+
42+
## Summary
43+
44+
That's the security overview! Use these views to monitor and manage your security posture effectively. By leveraging the detailed insights provided in each section, you can identify potential threats, take proactive measures, and ensure your systems remain secure.
45+
46+
Congrats, you have finished all of the main labs! 🎉 If you have time or are up for a challenge, try out the extra credit labs!
47+
48+
➡️ Head back to the [labs](README.md) page to try your hand at the extra credit labs.

_labs/lab7-ec.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Extra Credit - Lab 7 - Advanced CodeQL Setup
2+
3+
We set up Code Scanning with CodeQL using the default method. Now, let's try using the **[advanced setup](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)**!
4+
5+
This extra credit lab covers parts of the following exam domains:
6+
7+
- Domain 4: Configure and use code scanning
8+
- Domain 5: Use code scanning with CodeQL
9+
- Domain 6: Describe GitHub Advanced Security best practices
10+
11+
## Exercise
12+
13+
Why might you want to use the advanced setup? Here are some reasons:
14+
15+
- More control over triggers and schedule
16+
- When pulling in packages from a private feed, you may have to provide instructions on authorizing to the NuGet, NPM, Maven, etc. feed.
17+
- For compiled languages, providing more instructions on how to build the code
18+
- Ability to customize your runners TODO: is this true? i think you can use code-scanning label with default workflow but i cannot remember
19+
- Ability to customize the CodeQL configuration (such as query suites used)
20+
- Manage code scanning settings "as code"
21+
- Utilize 3rd party code scanning tooling
22+
23+
### Assignment
24+
25+
Your assignment here is to switch to the **[advanced setup](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)**. You can start under the **Settings** --> **Code Security and Analysis** page.
26+
27+
Your goal is to have a CodeQL workflow committed that successfully scans your code. Pay attention to some of the configuration options for the CodeQL scanning action. Refer to the documentation for more details.
28+
29+
TODO: add link
30+
31+
## Summary
32+
33+
TODO: add content
34+
35+
➡️ Head back to the [labs](README.md) page.

_labs/lab8-ec.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Extra Credit - Lab 8 - Custom Secret Scanning Patterns
2+
3+
We are just using the out of the box secret scanning settings. Perhaps you are interested in finding other patterns, such as credit card patterns, committed in the code.
4+
5+
TODO: we should commit a fake credit card number in the code so they can find it
6+
7+
This lab covers parts of the following exam domains:
8+
9+
- Domain 2: Configure and use secret scanning
10+
- Domain 6: Describe GitHub Advanced Security best practices
11+
12+
## Exercise
13+
14+
Your assignment here is to implement a secret scanning custom pattern. You can start under the **Settings** --> **Code Security and Analysis** page.
15+
16+
If you are looking for an example of what to search for, we suggest creating a pattern for finding a credit card! Mickey may or may not have accidentally committed his credit card to the repository and we need to alert on this.
17+
18+
Create a pattern, run a dry-run, and hopefully you find the pattern! If so, save the custom secret scanning pattern to implement.
19+
20+
## Summary
21+
22+
TODO: add content
23+
24+
➡️ Head back to the [labs](README.md) page.

0 commit comments

Comments
 (0)