Conversation
|
|
||
| std::ifstream file; | ||
| if (!config_path.empty()) { | ||
| file.open(config_path); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Copilot Autofix
AI 23 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| throw std::runtime_error("Invalid HOME environment variable: " + std::string(e.what())); | ||
| } | ||
|
|
||
| std::ifstream file(config_path); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Copilot Autofix
AI 23 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
Description
In
config.cppandclient.cpp, there are path manipulation variables that allow users to maliciously inject strings that point to local env files. Through this PR, the SDK now sanitizes the variables prior to their usage.Closes #
Type of Change
Changes
config.cppandclient.cppnow utilizepath.utils.hTesting
make test)Checklist
make format)Breaking Changes
Screenshots
By submitting this PR, I confirm my contribution is made under the MIT License.