-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_ghostcoder.py
More file actions
25 lines (20 loc) · 1.02 KB
/
Copy pathtest_ghostcoder.py
File metadata and controls
25 lines (20 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# GhostCoder Testing Script
# Open this file in VS Code with the GhostCoder extension enabled.
# Test Case 1: Vulnerable Plaintext Password Verification
# Placing your cursor or editing this block will trigger the Application Security Engineer agent.
# Action: Hover over the suggestion and click "[⚡ Apply Fix]" or hit Ctrl+. to apply the fix.
def login(password):
if password == 'admin':
return True
return False
# Test Case 2: ReferenceError / Undefined Variable
# Placing your cursor or editing this line will trigger the Reality Checker agent.
# Action: Click "[⚡ Apply Fix]" on hover or select the lightbulb quick fix action.
def check_status():
print(undefinedVariable)
# Test Case 3: Terminal Command Failure Execution
# Run this file in your terminal: `python test_ghostcoder.py`
# This will raise a NameError, and the shell hook will capture the stderr trace,
# classify the compiler crash, and dispatch the Senior Developer agent to output a fix in the IDE.
if __name__ == "__main__":
check_status()