You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ By the end of the mandatory track you will have: detected hardcoded secrets with
73
73
74
74
| Feature | Description |
75
75
|---------|-------------|
76
-
|**Secret Scanning (`#secret-scanning`)**| Scans code for exposed credentials using GitHub's detection patterns |
76
+
|**Secret Scanning (`plugins`)**| Scans code for exposed credentials using GitHub's detection patterns |
77
77
|**VS Code Code Review**| Reviews a selection or uncommitted changes with inline suggestions and one-click fixes |
78
78
|**Copilot Agent (Inline `Ctrl+I`)**| Applies fix patterns across entire files in one agentic step |
79
79
|**Copilot CLI `/review`**| Agentic CLI code review of git changes — no browser required |
@@ -85,12 +85,12 @@ By the end of the mandatory track you will have: detected hardcoded secrets with
85
85
86
86
## Getting Started
87
87
88
-
1. Select use this template to create a new repository
89
-
1.clone and open it in VS Code
88
+
1. Select **use this template** to create a new repository
89
+
1.Clone the repository and open it in VS Code
90
90
1. Ensure **GitHub Copilot** and **GitHub Copilot Chat** extensions are installed and signed in
91
91
1. Open the Copilot Chat panel (`Ctrl+Alt+I`)
92
92
1. Start with [Exercise 01](workshop/exercise-01-setup.md)
93
93
94
94
---
95
95
96
-
> **Instructor Note**: Each exercise has `<!-- Instructor Guide -->` comments visible only in markdown source. Exercises are designed so attendees never need to copy code — they copy **prompts** and let Copilot generate the output. The [`securetrails-vulnerable/VULNERABILITIES.md`](securetrails-vulnerable/VULNERABILITIES.md) file contains exact file paths and line numbers — do not share with attendees before they attempt the exercises.
96
+
> **Instructor Note**: Each exercise has `<!-- Instructor Guide -->` comments visible only in markdown source. Exercises are designed so attendees never need to copy code — they copy **prompts** and let Copilot generate the output.
Copy file name to clipboardExpand all lines: workshop/exercise-02-discover-review.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,15 @@ These are different from Copilot Chat: they use specialised models focused on su
17
17
---
18
18
19
19
## Step 1 — Scan for Hardcoded Secrets
20
+
Open copilot chat (`Ctrl+Alt+I`) and use the `/plugin`, from marketplace select `advanced-security` to activate the secret scanning skill.
20
21
21
22
Open `config.py` in VS Code. In Copilot Chat (`Ctrl+Alt+I`), type `#secret-scanning` to activate the skill, then paste the prompt below:
22
23
23
24
```
24
25
Scan config.py for any hardcoded secrets, API keys, passwords, tokens, or credentials. Use the secret scanning skill to check each value against known secret patterns. List every finding with: variable name | value type | risk level | recommended fix.
25
26
```
26
27
27
-
Then repeat for `app.py`:
28
+
Then repeat for `app.py` (optional):
28
29
29
30
```
30
31
Scan app.py for hardcoded secrets, JWT tokens, and API keys. List every finding with file, variable name, line number, and the os.environ.get() replacement needed.
@@ -34,7 +35,7 @@ Scan app.py for hardcoded secrets, JWT tokens, and API keys. List every finding
34
35
35
36
## Step 2 — Review a Function with VS Code Code Review (Selection Mode)
36
37
37
-
Open `app.py`. Select the entire `login()` function (lines 23–40).
38
+
Open `app.py`. Select the entire `login()` function (lines 24–41).
38
39
39
40
**Right-click** the selection → **Copilot** → **Review and Comment**.
40
41
@@ -70,9 +71,10 @@ Do not commit any changes yet — you will fix them properly in Exercises 03 and
70
71
71
72
## Step 5 — Customise Reviews with OWASP Instructions *(Optional)*
72
73
73
-
To focus every future review on OWASP Top 10 checks, add to `.github/copilot-instructions.md`:
74
+
To focus every future review on OWASP Top 10 checks, create `.github/copilot-instructions.md`, select it as context in chat and then use `/create-instruction` with the following prompt:
74
75
75
76
```markdown
77
+
Update the copilot-instructions.md file with the following content:
76
78
When performing a code review, apply the OWASP Top 10 2021 checklist.
-[ ] You understand the difference between selection review and uncommitted changes review
91
+
-[ ] You understand how to create copilot-instructions for customising reviews
89
92
90
93
---
91
94
92
95
## Key Takeaway
93
96
94
-
> Secret scanning finds committed credentials using GitHub's detection engine; VS Code Code Review surfaces broader code quality and security issues inline — both without leaving the editor.
97
+
> Secret scanning finds committed credentials using GitHub's detection engine; VS Code Code Review surfaces broader code quality and security issues inline — both without leaving the editor; Copilot instructions allow you to customise the review focus.
Copy file name to clipboardExpand all lines: workshop/exercise-03-fix-core.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@
9
9
## Background
10
10
11
11
These are the most dangerous vulnerabilities in SecureTrails:
12
-
-**SQL Injection** (OWASP A03) — user input is directly concatenated into SQL strings at `app.py` lines 30, 52, 132. Fix: parameterized queries.
13
-
-**Broken Authentication** (OWASP A01) — the `/admin` route accepts any URL parameter as `user_id` with no role check (lines 43–46). Fix: session role validation.
14
-
-**IDOR** (OWASP A01) — `/trail/<trail_id>` has no ownership check and a second SQL injection (line 52). Fix: parameterized query + auth check.
12
+
-**SQL Injection** (OWASP A03) — user input is directly concatenated into SQL strings at `app.py`. Fix: parameterized queries.
13
+
-**Broken Authentication** (OWASP A01) — the `/admin` route accepts any URL parameter as `user_id` with no role check. Fix: session role validation.
14
+
-**IDOR** (OWASP A01) — `/trail/<trail_id>` has no ownership check and a second SQL injection. Fix: parameterized query + auth check.
15
15
16
16
---
17
17
@@ -24,7 +24,7 @@ Find every place in app.py where user input from request.args, request.form, or
24
24
List each as: function name | line number | the vulnerable line of code.
25
25
```
26
26
27
-
Expected findings: `login()` line 30, `view_trail()` line 52, `search()` line 132.
27
+
Expected findings: `login()` line 30, `view_trail()` line 53, `search()` line 107.
28
28
29
29
---
30
30
@@ -56,7 +56,7 @@ Rewrite the admin() function so it:
56
56
Show the corrected function.
57
57
```
58
58
59
-
Apply the suggested code with `Ctrl+I` on the `admin()` function.
59
+
Apply the suggested code with `Ctrl+enter` on the `admin()` function.
60
60
61
61
---
62
62
@@ -72,7 +72,7 @@ Rewrite it to:
72
72
Return 403 if not authenticated.
73
73
```
74
74
75
-
Apply with `Ctrl+I`.
75
+
Apply with `Ctrl+enter`.
76
76
77
77
---
78
78
@@ -88,7 +88,7 @@ Replace it so it:
88
88
Show the corrected block.
89
89
```
90
90
91
-
Apply with `Ctrl+I`.
91
+
Apply with `Ctrl+enter`.
92
92
93
93
---
94
94
@@ -103,15 +103,15 @@ Review the updated app.py. Confirm:
Copy file name to clipboardExpand all lines: workshop/exercise-05-cli-review-agents.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
11
11
After applying IDE fixes in Exercises 03–04, the CLI provides a second verification layer:
12
12
-**`/review`** — Copilot's built-in `code-review` agent analyses changes directly in the terminal, without a browser tab
13
+
14
+
!note:"Ensure there are local uncommitted changes before running /review; make a small test edit first if needed."
13
15
-**Custom agents** — `.agent.md` files in `.github/agents/` package specialist security expertise that any developer can invoke by name, reducing dependency on dedicated security team members
0 commit comments