-
Notifications
You must be signed in to change notification settings - Fork 6
feat: regrading request end to end #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| const result = await this.emailService.sendEmail(emailOptions); | ||
|
|
||
| if (!result) { | ||
| this.logger.error(`Failed to send verification code to ${email}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mend Code Security Check
New finding (1 of 3)
The Mend Code Security Check of your branch failed because of a Log Forging finding in this line.
| Severity | Vulnerability Type | CWE | File | Data Flows | Detected | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Log Forging | 1 | 2025-11-04 10:09am | |||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| }; | |
| const result = await this.emailService.sendEmail(emailOptions); | |
| if (!result) { | |
| this.logger.error(`Failed to send verification code to ${email}`); |
1 Data Flow/s detected
| async sendVerificationCode( |
| const { email } = request; |
| const emailSent = await this.adminEmailService.sendVerificationCode( |
| async sendVerificationCode(email: string, code: string): Promise<boolean> { |
| this.logger.error(`Failed to send verification code to ${email}`); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Log Forging Training
● Videos
▪ Secure Code Warrior Log Forging Video
● Further Reading
🏴 Suppress Finding
- ... as False Alarm
- ... as Acceptable Risk
| } | ||
|
|
||
| const oldGrade = request.assignmentAttempt.grade || 0; | ||
| this.logger.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mend Code Security Check
New finding (2 of 3)
The Mend Code Security Check of your branch failed because of a Log Forging finding in this line.
| Severity | Vulnerability Type | CWE | File | Data Flows | Detected | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Log Forging | 1 | 2025-11-04 10:09am | |||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| if (!request) { | |
| throw new Error(`Regrading request with ID ${id} not found`); | |
| } | |
| const oldGrade = request.assignmentAttempt.grade || 0; | |
| this.logger.log( |
1 Data Flow/s detected
| approveRegradingRequest( |
| return this.adminService.approveRegradingRequest( |
mark/apps/api/src/api/admin/admin.service.ts
Line 865 in d4b0240
| async approveRegradingRequest( |
mark/apps/api/src/api/admin/admin.service.ts
Line 888 in d4b0240
| `[ApproveRegrading] Attempt ID: ${request.attemptId}, Old Grade: ${oldGrade}, New Grade: ${newGrade}`, |
mark/apps/api/src/api/admin/admin.service.ts
Line 887 in d4b0240
| this.logger.log( |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Log Forging Training
● Videos
▪ Secure Code Warrior Log Forging Video
● Further Reading
🏴 Suppress Finding
- ... as False Alarm
- ... as Acceptable Risk
| newGrade: number, | ||
| authorEmail?: string, | ||
| ) { | ||
| this.logger.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mend Code Security Check
New finding (3 of 3)
The Mend Code Security Check of your branch failed because of a Log Forging finding in this line.
| Severity | Vulnerability Type | CWE | File | Data Flows | Detected | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Log Forging | 1 | 2025-11-04 10:09am | |||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| async approveRegradingRequest( | |
| id: number, | |
| newGrade: number, | |
| authorEmail?: string, | |
| ) { | |
| this.logger.log( |
1 Data Flow/s detected
| approveRegradingRequest( |
| return this.adminService.approveRegradingRequest( |
mark/apps/api/src/api/admin/admin.service.ts
Line 865 in d4b0240
| async approveRegradingRequest( |
mark/apps/api/src/api/admin/admin.service.ts
Line 871 in d4b0240
| `[ApproveRegrading] Request ID: ${id}, New Grade: ${newGrade}, Author: ${authorEmail}`, |
mark/apps/api/src/api/admin/admin.service.ts
Line 870 in d4b0240
| this.logger.log( |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Log Forging Training
● Videos
▪ Secure Code Warrior Log Forging Video
● Further Reading
🏴 Suppress Finding
- ... as False Alarm
- ... as Acceptable Risk
PR Description
Overview:
Type of Issue:
feat): New functionality or feature added.bug): Issue or bug resolved.chore): Maintenance, refactoring, or non-functional changes.doc): Documentation improvements or additions.Change Type:
Test Coverage
Evidence:
Impact / Risk
email service, mark chatbot