Skip to content
Open
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
20 changes: 20 additions & 0 deletions test-review-me.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Missing await on async call
async function fetchUser(id: string) {
const result = fetch(`https://api.example.com/users/${id}`);
return result;
}

// Hardcoded secret
const API_KEY = "sk-prod-abc123supersecretkey";

// SQL injection risk
function getUser(db: any, userId: string) {
return db.query("SELECT * FROM users WHERE id = " + userId);
}

// Empty catch
async function riskyOp() {
try {
await fetchUser("123");
} catch (e) {}
}
Loading