Skip to content

Conversation

@MmagdyHafezZ
Copy link
Collaborator

@MmagdyHafezZ MmagdyHafezZ commented Oct 22, 2025

Learner bug fixes, urget hot fixes for timers, attempts

`Found ${ongoingAttempts.length} ongoing attempts for user ${userSession.userId} on assignment ${assignment.id}`,
);
if (ongoingAttempts.length > 0) {
console.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 (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

attempt.service.ts:1530

12025-10-22 10:37pm
Vulnerable Code

);
console.log(
`Found ${ongoingAttempts.length} ongoing attempts for user ${userSession.userId} on assignment ${assignment.id}`,
);
if (ongoingAttempts.length > 0) {
console.log(

1 Data Flow/s detected

return this.attemptService.createAssignmentAttempt(

async createAssignmentAttempt(

await this.validateNewAttempt(assignment, userSession);

private async validateNewAttempt(

`User ${userSession.userId} has ongoing attempts for assignment ${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

const ongoingAttempts = attempts.filter(
(sub) => !sub.submitted && (!sub.expiresAt || sub.expiresAt >= now),
);
console.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

attempt.service.ts:1526

12025-10-22 10:37pm
Vulnerable Code

orderBy: { createdAt: "desc" },
});
const ongoingAttempts = attempts.filter(
(sub) => !sub.submitted && (!sub.expiresAt || sub.expiresAt >= now),
);
console.log(

1 Data Flow/s detected

return this.attemptService.createAssignmentAttempt(

async createAssignmentAttempt(

await this.validateNewAttempt(assignment, userSession);

private async validateNewAttempt(

`Found ${ongoingAttempts.length} ongoing attempts for user ${userSession.userId} on assignment ${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

@MmagdyHafezZ MmagdyHafezZ marked this pull request as ready for review October 23, 2025 00:56
@MmagdyHafezZ MmagdyHafezZ merged commit d8d3540 into master Oct 23, 2025
9 checks passed
@MmagdyHafezZ MmagdyHafezZ deleted the fix/decoding branch October 23, 2025 00:56
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