Skip to content

Conversation

@MmagdyHafezZ
Copy link
Collaborator

PR Description

Overview:

Type of Issue:

  • Feature (feat): New functionality or feature added.
  • Bug Fix (bug): Issue or bug resolved.
  • Chore (chore): Maintenance, refactoring, or non-functional changes.
  • Documentation Update (doc): Documentation improvements or additions.

Change Type:

  • Major: Significant changes that introduce new features, large refactoring, or breaking changes. Requires thorough review and testing.
  • Minor: Small to medium changes, such as adding new functionality that is backward-compatible or minor refactoring. Moderate review needed.
  • Patch: Bug fixes, small tweaks, or documentation updates. Light review is sufficient.

Test Coverage

  • Unit tests updated
  • Manual verification done

Evidence:

Screenshot 2025-11-04 at 3 00 22 AM image Screenshot 2025-11-04 at 3 05 30 AM

Impact / Risk

email service, mark chatbot

const result = await this.emailService.sendEmail(emailOptions);

if (!result) {
this.logger.error(`Failed to send verification code to ${email}`);
Copy link
Contributor

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.

SeverityVulnerability TypeCWEFileData FlowsDetected
LowLog Forging

CWE-117

admin-email.service.ts:36

12025-11-04 10:09am
Vulnerable Code

};
const result = await this.emailService.sendEmail(emailOptions);
if (!result) {
this.logger.error(`Failed to send verification code to ${email}`);

1 Data Flow/s detected

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

   ▪ OWASP Log Forging

🏴 Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

}

const oldGrade = request.assignmentAttempt.grade || 0;
this.logger.log(
Copy link
Contributor

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.

SeverityVulnerability TypeCWEFileData FlowsDetected
LowLog Forging

CWE-117

admin.service.ts:887

12025-11-04 10:09am
Vulnerable Code

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

return this.adminService.approveRegradingRequest(

async approveRegradingRequest(

`[ApproveRegrading] Attempt ID: ${request.attemptId}, Old Grade: ${oldGrade}, New Grade: ${newGrade}`,

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Log Forging Training

● Videos

   ▪ Secure Code Warrior Log Forging Video

● Further Reading

   ▪ OWASP Log Forging

🏴 Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

newGrade: number,
authorEmail?: string,
) {
this.logger.log(
Copy link
Contributor

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.

SeverityVulnerability TypeCWEFileData FlowsDetected
LowLog Forging

CWE-117

admin.service.ts:870

12025-11-04 10:09am
Vulnerable Code

async approveRegradingRequest(
id: number,
newGrade: number,
authorEmail?: string,
) {
this.logger.log(

1 Data Flow/s detected

return this.adminService.approveRegradingRequest(

async approveRegradingRequest(

`[ApproveRegrading] Request ID: ${id}, New Grade: ${newGrade}, Author: ${authorEmail}`,

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Log Forging Training

● Videos

   ▪ Secure Code Warrior Log Forging Video

● Further Reading

   ▪ OWASP Log Forging

🏴 Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

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.

1 participant