Skip to content

Merge MVP sample apps to main to trigger copy utility#37

Merged
dacharyc merged 136 commits intomainfrom
development
Nov 7, 2025
Merged

Merge MVP sample apps to main to trigger copy utility#37
dacharyc merged 136 commits intomainfrom
development

Conversation

@dacharyc
Copy link
Copy Markdown
Collaborator

@dacharyc dacharyc commented Nov 7, 2025

When we merge this PR, it should trigger the copy utility that automatically copies the apps out to their respective repos.

@dacharyc dacharyc merged commit d14404f into main Nov 7, 2025
1 check passed
Comment on lines +43 to +49
console.error("Error occurred:", {
message: err.message,
stack: err.stack,
url: req.url,
method: req.method,
timestamp: new Date().toISOString(),
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:
Detected a logger that logs user input without properly neutralizing the output. The log message could contain characters like and and cause an attacker to forge log entries or include malicious content into the logs. Use proper input validation and/or output encoding to prevent log entries from being forged.

Dataflow graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>mflix/server/js-express/src/utils/errorHandler.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/mongodb/docs-sample-apps/blob/dde6b3a5c57332a2ab91299b713f5e5665378119/mflix/server/js-express/src/utils/errorHandler.ts#L46 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 46] req</a>"]
        end
        %% Intermediate

        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/mongodb/docs-sample-apps/blob/dde6b3a5c57332a2ab91299b713f5e5665378119/mflix/server/js-express/src/utils/errorHandler.ts#L43 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 43] console.error(&quot;Error occurred:&quot;, {<br>      message: err.message,<br>      stack: err.stack,<br>      url: req.url,<br>      method: req.method,<br>      timestamp: new Date().toISOString(),<br>    })</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    File0:::invis

    %% Connections

    Source --> Sink


Loading

To resolve this comment:

🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by console-log-express.

Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

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.

5 participants