-
Notifications
You must be signed in to change notification settings - Fork 3
WIP: 1/26 sprint #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP: 1/26 sprint #171
Conversation
ef62632 to
bb1367f
Compare
3e09a13 to
5b3c70e
Compare
9010bc8 to
6de7ebe
Compare
130e81b to
169fc50
Compare
| await client.updateLxcConfig(node.name, node.placeholderCtId, { | ||
| [nextMp]: `${proxmoxVolume},mp=${placeholderMountPath}` | ||
| }); | ||
| console.log(`Attached volume to placeholder at ${nextMp} with mount path ${placeholderMountPath}`); |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
an access to apiKeys
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 15 hours ago
In general, the problem is that sensitive or user-derived information (req.session.user included in placeholderMountPath) is being logged in clear text. To fix this without changing existing functionality, we should avoid logging the sensitive portion while still retaining useful operational information. That means either removing placeholderMountPath from the log message or replacing it with a non-sensitive surrogate (e.g., just the mount point key nextMp or a static description).
The best minimal fix is to adjust the console.log on line 155 in create-a-container/routers/volumes.js so that it does not include placeholderMountPath. We can still log that the attachment succeeded and possibly which Proxmox volume and mount point index were used, which is sufficient for debugging without disclosing user-specific paths. No additional imports or helpers are required; we only change the log string.
Concretely:
- In
create-a-container/routers/volumes.js, locate theconsole.logat line 155. - Replace the message template so it omits
placeholderMountPath, e.g.,console.log(\Attached volume to placeholder at ${nextMp}`);` or a similarly informative but non-sensitive message. - Leave all other code, including construction and use of
placeholderMountPath, unchanged so functionality is preserved.
-
Copy modified line R155
| @@ -152,7 +152,7 @@ | ||
| [nextMp]: `${proxmoxVolume},mp=${placeholderMountPath}` | ||
| }); | ||
| await client.updateLxcConfig(node.name, node.placeholderCtId, { protection: 1 }); | ||
| console.log(`Attached volume to placeholder at ${nextMp} with mount path ${placeholderMountPath}`); | ||
| console.log(`Attached volume ${proxmoxVolume} to placeholder at mount point ${nextMp}`); | ||
|
|
||
| // Create database record | ||
| await Volume.create({ |
85300f0 to
10ff000
Compare
No description provided.