Skip to content

Conversation

MmagdyHafezZ
Copy link
Collaborator

@MmagdyHafezZ MmagdyHafezZ commented Oct 6, 2025

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.

Testing & Validation:

  • Unit Tests: Added/updated to cover new logic or edge cases.
  • Integration Tests: Updated to verify interactions between components.
  • E2E Tests: Performed end-to-end testing in staging or development environment.
  • Manual Testing: The changes were manually tested and validated.
  • No Regressions: Verified that no existing functionality is broken.

Purpose:

Maintain connectivity with production database and backend server

* @returns {Promise<Object>} Cleanup results
*/
async manualCleanupOldDrafts(daysOld?: number) {
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 (4 of 5)

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

scheduled-tasks.service.ts:462

12025-10-06 06:28pm
Vulnerable Code

*
* @param {number} daysOld - Age of drafts to delete
* @returns {Promise<Object>} Cleanup results
*/
async manualCleanupOldDrafts(daysOld?: number) {
this.logger.log(

1 Data Flow/s detected

await this.scheduledTasksService.manualCleanupOldDrafts(daysOld);

async manualCleanupOldDrafts(daysOld?: number) {

daysOld === undefined ? "" : ` (${daysOld} days old)`

`Manual cleanup of old drafts requested${

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 merged commit 2f57609 into master Oct 19, 2025
13 checks passed
@MmagdyHafezZ MmagdyHafezZ deleted the chore/improve-db-connectivity branch October 19, 2025 23:21
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