Skip to content

Commit 65d127e

Browse files
committed
fix: correct formatting and naming conventions in secure code review prompts and instructions
1 parent e4ea402 commit 65d127e

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ These instructions guide GitHub Copilot to suggest secure, intentional code patt
9898
- Do not use insecure hash functions like `md5` or `sha1` for password storage — use a modern password hashing lib.
9999
- Do not commit `.env` files or hardcode secrets — use secrets management infrastructure.
100100

101-
102101
---
103102

104103
## 🧠 4. AI-Generated Code Safety

.github/prompts/secure-code-review.prompt.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1+
# 🛡️ Prompt: Secure Code Review
2+
13
You are a senior software engineer performing a **comprehensive secure code review**.
24

35
---
46

5-
**Context Instructions**
7+
## ✅ Context Instructions
8+
69
- Start from a **fresh analysis context**.
710
- Disregard any previously seen reviews, summaries, or cached content.
811
- Re-scan the **entire current codebase** visible in this workspace.
912

1013
---
1114

12-
🔍 **Step 1: Project Mapping**
15+
## 🔍 Step 1: Project Mapping
16+
1317
- List all visible files and folders.
1418
- For each, briefly describe its purpose or domain (e.g., "core logic," "auth," "logging utilities").
1519

1620
---
1721

18-
🧭 **Step 2: Subsystem Discovery**
22+
## 🧭 Step 2: Subsystem Discovery
23+
1924
- Identify the key **subsystems or functional domains** in this project.
2025
- Explain what role each plays (e.g., request routing, encryption, config parsing).
2126

2227
---
2328

2429
🛡️ **Step 3: Deep Review by Subsystem**
2530
For each subsystem:
31+
2632
- Highlight strengths
2733
- Identify security observations
2834
- Show file paths + relevant code
@@ -32,7 +38,8 @@ Quote relevant code snippets or describe logic where needed.
3238

3339
---
3440

35-
📄 **Final Output Format**
41+
## 📄 Final Output Format
42+
3643
Generate a single Markdown file named `REVIEW.MD` with the following structure:
3744

3845
```markdown
@@ -54,13 +61,14 @@ Generate a single Markdown file named `REVIEW.MD` with the following structure:
5461
- ...
5562
```
5663

57-
⚠️ **Important**
64+
## ⚠️ Important
65+
5866
Pay close attention to logic around:
5967

60-
- input validation
61-
- secrets or config handling
62-
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
63-
- access control
64-
- environment-specific behavior
68+
- input validation
69+
- secrets or config handling
70+
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
71+
- access control
72+
- environment-specific behavior
6573

6674
Respond only after completing a fresh read of the codebase.

copilot-instructions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ These instructions guide GitHub Copilot to suggest secure, intentional code patt
9898
- Do not use insecure hash functions like `md5` or `sha1` for password storage — use a modern password hashing lib.
9999
- Do not commit `.env` files or hardcode secrets — use secrets management infrastructure.
100100

101-
102101
---
103102

104103
## 🧠 4. AI-Generated Code Safety

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prompts/secure-code-review.prompt.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1+
# 🛡️ Prompt: Secure Code Review
2+
13
You are a senior software engineer performing a **comprehensive secure code review**.
24

35
---
46

5-
**Context Instructions**
7+
## ✅ Context Instructions
8+
69
- Start from a **fresh analysis context**.
710
- Disregard any previously seen reviews, summaries, or cached content.
811
- Re-scan the **entire current codebase** visible in this workspace.
912

1013
---
1114

12-
🔍 **Step 1: Project Mapping**
15+
## 🔍 Step 1: Project Mapping
16+
1317
- List all visible files and folders.
1418
- For each, briefly describe its purpose or domain (e.g., "core logic," "auth," "logging utilities").
1519

1620
---
1721

18-
🧭 **Step 2: Subsystem Discovery**
22+
## 🧭 Step 2: Subsystem Discovery
23+
1924
- Identify the key **subsystems or functional domains** in this project.
2025
- Explain what role each plays (e.g., request routing, encryption, config parsing).
2126

2227
---
2328

2429
🛡️ **Step 3: Deep Review by Subsystem**
2530
For each subsystem:
31+
2632
- Highlight strengths
2733
- Identify security observations
2834
- Show file paths + relevant code
@@ -32,7 +38,8 @@ Quote relevant code snippets or describe logic where needed.
3238

3339
---
3440

35-
📄 **Final Output Format**
41+
## 📄 Final Output Format
42+
3643
Generate a single Markdown file named `REVIEW.MD` with the following structure:
3744

3845
```markdown
@@ -54,13 +61,14 @@ Generate a single Markdown file named `REVIEW.MD` with the following structure:
5461
- ...
5562
```
5663

57-
⚠️ **Important**
64+
## ⚠️ Important
65+
5866
Pay close attention to logic around:
5967

60-
- input validation
61-
- secrets or config handling
62-
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
63-
- access control
64-
- environment-specific behavior
68+
- input validation
69+
- secrets or config handling
70+
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
71+
- access control
72+
- environment-specific behavior
6573

6674
Respond only after completing a fresh read of the codebase.

0 commit comments

Comments
 (0)