Skip to content

Remove unintended log injection from CWE-352 - #3

Merged
StackOverflowIsBetterThanAnyAI merged 1 commit into
mainfrom
fix-cwe-352-log-injection
Oct 30, 2026
Merged

StackOverflowIsBetterThanAnyAI merged 1 commit into
mainfrom
fix-cwe-352-log-injection

Conversation

@StackOverflowIsBetterThanAnyAI

Copy link
Copy Markdown
Owner

What changed

updateEmail in CWE-352/main.js no longer logs req.body.email. It now stores the email in a Map instead.

Why

Each snippet should contain exactly one intended weakness. The console.log added an unintended second weakness (CWE-117, log injection), which CodeQL reported as js/log-injection and which would skew the benchmark result.

Notes for reviewers

  • The CSRF weakness itself is unchanged: the state-changing POST route still relies on cookies without a CSRF token.
  • After merging, CodeQL should close the js/log-injection alert in CWE-352.

🤖 Generated with Claude Code

updateEmail logged req.body.email unsanitized, which added a second
weakness (CWE-117) to a snippet meant to contain only CSRF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f2bc882-85c0-4786-8cde-1ea8abb39aa6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@StackOverflowIsBetterThanAnyAI
StackOverflowIsBetterThanAnyAI merged commit 25be66f into main Oct 30, 2026
2 checks passed
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