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:

Impact / Risk

Rollback

Reviewer Focus

}

if (existingAssignment._count.questions > 0) {
this.logger.warn(
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 2)

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:2094

12025-11-19 10:46pm
Vulnerable Code

if (!existingAssignment) {
throw new NotFoundException(`Assignment with Id ${id} not found.`);
}
if (existingAssignment._count.questions > 0) {
this.logger.warn(

1 Data Flow/s detected

addContentToAssignment(

return this.adminService.addContentToAssignment(

async addContentToAssignment(

const { assignment, config, gradingCriteria, questions } =

const result = await this.prisma.$transaction(async (tx) => {

`Assignment ${id} already has ${existingAssignment._count.questions} questions. Adding ${questions.length} more.`,

this.logger.warn(

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

});
createdQuestions.push(...fetchedQuestions);

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 2)

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:2141

12025-11-19 10:46pm
Vulnerable Code

where: { assignmentId: id },
orderBy: { id: "asc" },
});
createdQuestions.push(...fetchedQuestions);
this.logger.log(

1 Data Flow/s detected

addContentToAssignment(

return this.adminService.addContentToAssignment(

async addContentToAssignment(

const { assignment, config, gradingCriteria, questions } =

const result = await this.prisma.$transaction(async (tx) => {

`Successfully added ${questions.length} questions to assignment ${id}`,

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