Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ These instructions guide GitHub Copilot to suggest secure, intentional code patt
- Do not use insecure hash functions like `md5` or `sha1` for password storage — use a modern password hashing lib.
- Do not commit `.env` files or hardcode secrets — use secrets management infrastructure.


---

## 🧠 4. AI-Generated Code Safety
Expand Down
74 changes: 74 additions & 0 deletions .github/prompts/secure-code-review.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 🛡️ Prompt: Secure Code Review

You are a senior software engineer performing a **comprehensive secure code review**.

---

## ✅ Context Instructions

- Start from a **fresh analysis context**.
- Disregard any previously seen reviews, summaries, or cached content.
- Re-scan the **entire current codebase** visible in this workspace.

---

## 🔍 Step 1: Project Mapping

- List all visible files and folders.
- For each, briefly describe its purpose or domain (e.g., "core logic," "auth," "logging utilities").

---

## 🧭 Step 2: Subsystem Discovery

- Identify the key **subsystems or functional domains** in this project.
- Explain what role each plays (e.g., request routing, encryption, config parsing).

---

🛡️ **Step 3: Deep Review by Subsystem**
For each subsystem:

- Highlight strengths
- Identify security observations
- Show file paths + relevant code
- Note code quality or maintainability issues

Quote relevant code snippets or describe logic where needed.

---

## 📄 Final Output Format

Generate a single Markdown file named `REVIEW.MD` with the following structure:

```markdown
# 📋 Project Secure Code Review

## ✅ Strengths
- ...

## 🛡️ Security Observations
### [filename/path]
- **Issue**: ...
- **Impact**: ...
- **Recommendation**: ...

## 🔍 Code Quality Notes
- ...

## 🧭 Suggested Next Steps
- ...
```

## ⚠️ Important

Pay close attention to logic around:

- input validation
- secrets or config handling
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
- access control
- environment-specific behavior

Respond only after completing a fresh read of the codebase.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ Copilot will scan the file using the selected prompt and return flagged issues,

The `tests/` folder contains small, focused files designed to trigger specific security prompts:

| File | Targets |
|--------------------------------|------------------------------------------|
| `secret-hardcode.js` | check-for-secrets.md |
| `unvalidated-input.java` | validate-input-handling.md |
| `insecure-api.cs` | scan-for-insecure-apis.md |
| `logs-sensitive-data.go` | assess-logging.md |
| `weak-auth-flow.ts` | review-auth-flows.md |
| `overtrusted-genai-snippet.js` | unvalidated-genai-acceptances.md |
| File | Targets |
|--------------------------------|-----------------------------------|
| `secret-hardcode.js` | check-for-secrets.md |
| `unvalidated-input.java` | validate-input-handling.md |
| `insecure-api.cs` | scan-for-insecure-apis.md |
| `logs-sensitive-data.go` | assess-logging.md |
| `weak-auth-flow.ts` | review-auth-flows.md |
| `overtrusted-genai-snippet.js` | unvalidated-genai-acceptances.md |

To run a test:

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


---

## 🧠 4. AI-Generated Code Safety
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions prompts/secure-code-review.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 🛡️ Prompt: Secure Code Review

You are a senior software engineer performing a **comprehensive secure code review**.

---

## ✅ Context Instructions

- Start from a **fresh analysis context**.
- Disregard any previously seen reviews, summaries, or cached content.
- Re-scan the **entire current codebase** visible in this workspace.

---

## 🔍 Step 1: Project Mapping

- List all visible files and folders.
- For each, briefly describe its purpose or domain (e.g., "core logic," "auth," "logging utilities").

---

## 🧭 Step 2: Subsystem Discovery

- Identify the key **subsystems or functional domains** in this project.
- Explain what role each plays (e.g., request routing, encryption, config parsing).

---

🛡️ **Step 3: Deep Review by Subsystem**
For each subsystem:

- Highlight strengths
- Identify security observations
- Show file paths + relevant code
- Note code quality or maintainability issues

Quote relevant code snippets or describe logic where needed.

---

## 📄 Final Output Format

Generate a single Markdown file named `REVIEW.MD` with the following structure:

```markdown
# 📋 Project Secure Code Review

## ✅ Strengths
- ...

## 🛡️ Security Observations
### [filename/path]
- **Issue**: ...
- **Impact**: ...
- **Recommendation**: ...

## 🔍 Code Quality Notes
- ...

## 🧭 Suggested Next Steps
- ...
```

## ⚠️ Important

Pay close attention to logic around:

- input validation
- secrets or config handling
- logger redaction (e.g. loggerENVCheck, loggerStackCheck)
- access control
- environment-specific behavior

Respond only after completing a fresh read of the codebase.