Skip to content

Conversation

@jmgasper
Copy link
Contributor

No description provided.

challengeIds = options.challengeIds.slice();
} else {
const rows = await reviewClient.$queryRaw`
SELECT DISTINCT "challengeId" AS id

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Using raw SQL queries with template literals can lead to SQL injection vulnerabilities. Consider using parameterized queries or Prisma's query builder methods to ensure safety.


const rows = isMarathonMatch
? await reviewClient.$queryRaw`
SELECT

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Using raw SQL queries with template literals can lead to SQL injection vulnerabilities. Consider using parameterized queries or Prisma's query builder methods to ensure safety.

GROUP BY s.id, s."challengeId", s."memberId", s."submittedDate", s."createdAt"
`
: await reviewClient.$queryRaw`
SELECT

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Using raw SQL queries with template literals can lead to SQL injection vulnerabilities. Consider using parameterized queries or Prisma's query builder methods to ensure safety.

}

const rows = await reviewClient.$queryRaw`
SELECT id, "minScore", "minimumPassingScore"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Using raw SQL queries with template literals can lead to SQL injection vulnerabilities. Consider using parameterized queries or Prisma's query builder methods to ensure safety.

);
}

main().catch((error) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Consider adding more specific error handling or logging to provide better insights into what went wrong during execution.

@jmgasper jmgasper merged commit 23f301b into master Jan 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants