Skip to content

Commit b9d9aad

Browse files
authored
Add security overview and custom patterns extra credit
1 parent 87fea5c commit b9d9aad

File tree

4 files changed

+89
-1
lines changed

4 files changed

+89
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,28 @@ This lab will have you utilize Secret Scanning with Push Protection to prevent s
5959

6060
---
6161

62+
### Lab 6 - Hands-on with Security Overview
63+
64+
This lab will teach you how to effectively use the Security Overview to review and alerts and coverage in an organization.
65+
66+
- Get started here - [Lab 6](./_labs/lab6.md)
67+
68+
---
69+
70+
6271
### Extra Credit: Advanced CodeQL Setup
6372

6473
This open-ended extra credit lab will have you switch to the advanced CodeQL setup.
6574

66-
- Get started here - [Extra Credit Lab 1](./_labs/lab6-ec.md)
75+
- Get started here - [Extra Credit Lab 1](./_labs/lab7-ec.md)
76+
77+
---
78+
79+
### Extra Credit: Custom Patterns for Secret Scanning
80+
81+
This open-ended extra credit lab will have you create a custom secret scanning pattern.
82+
83+
- Get started here - [Extra Credit Lab 2](./_labs/lab8-ec.md)
6784

6885
---
6986

_labs/lab6.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Lab 6 - 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+
- Domain 6: Describe GitHub Advanced Security best practices
8+
9+
## Exercise 1: Navigating to Security Overview
10+
11+
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.
12+
13+
> [!NOTE]
14+
> 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.
15+
1. Navigate to the organization. You can do so by **clicking on the org name** (`Ignite24-Labs`) in the repository breadcrumbs in the upper left hand corner.
16+
- You can also navigate to your orgs by clicking on your profile picture and "**Your organizations**"
17+
2. Click on the **Security** tab.
18+
3. Review (and click on!) the different views on the left-hand side:
19+
- 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))
20+
- 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))
21+
- 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))
22+
- Enablement trends: see how quickly different teams are adopting security features
23+
- 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))
24+
- 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))
25+
26+
> [!TIP]
27+
> You can export a CSV of nearly from most of these views using the **Export CSV** button in the upper right.
28+
4. Under the **Overview** view, navigate the sub-views, specifically **Detection** and **Remediation**.
29+
- Note the trends - this is useful information to evaluate the security posture of your organization. Are we getting better over time?
30+
- Being secure requires "constant vigilance"
31+
5. Navigate to the **Risk** view.
32+
6. On the right-hand side, click the **Teams ▾** button/dropdown.
33+
7. Click on the **all users** team - this team is only added to a different sample repo, so note how the total alerts changes.
34+
- 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.
35+
8. At the bottom of the options on the left, you will see **Security Campaigns**.
36+
- Security campaigns are a new feature designed to help administrators and security managers create targeted campaigns and track remediation progress effectively.
37+
9. ⚠️ Please don't create a new security campaign as to not introduce noise to your fellow attendees ⚠️, but click on the existing campaign here (**SQL injection (CWE-89)**) to check it out!
38+
- How are we doing on our goal?
39+
40+
## Summary
41+
42+
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.
43+
44+
If you want to learn more about the security overview or about what a particular view shows, check out the [docs](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/about-security-overview)!
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.
File renamed without changes.

_labs/lab8-ec.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Extra Credit - Lab 8 - Custom Patterns for Secret Scanning
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+
6+
## Exercise
7+
8+
Your assignment here is to implement a secret scanning custom pattern. You can start under the **Settings** --> **Code Security and Analysis** page.
9+
10+
If you are looking for an example of what to search for, we suggest creating a pattern for finding a credit card! A developer may or may not have accidentally committed customer credit card numbers to the repository and we need to alert on this.
11+
12+
Create a pattern, run a dry-run, and hopefully you find the pattern! If so, save the custom secret scanning pattern to implement.
13+
14+
15+
> [!TIP]
16+
> AI can help you get started generating those pesky regular expressions using natural language. Look for the **Generate with AI** button in the top right corner.
17+
> For increased precision, you can check out [examples for custom patterns for secret scanning](https://github.com/advanced-security/secret-scanning-custom-patterns/tree/main?tab=readme-ov-file#personally-identifiable-information-pii), including a credit card example (under PII), in the [advanced-security/secret-scanning-custom-patterns](https://github.com/advanced-security/secret-scanning-custom-patterns/tree/main?tab=readme-ov-file#personally-identifiable-information-pii) repo!
18+
19+
## Summary
20+
21+
In this lab, you should have identified the credit card number that was accidentally committed. Custom secret scanning patterns offer an excellent way to implement additional scanning patterns that are crucial for your organization!
22+
23+
➡️ Head back to the [labs](README.md) page.

0 commit comments

Comments
 (0)