-
Notifications
You must be signed in to change notification settings - Fork 1
feat(chore/windows): move socket path #482
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,9 +22,9 @@ import ( | |
| ) | ||
|
|
||
| func DaemonSocketPath() string { | ||
| base := os.Getenv("ProgramData") | ||
| base := os.Getenv("LOCALAPPDATA") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM SEVERITY - Security model change without justification This changes the security model from system-wide ( Potential issues:
Recommendation: Document the intended security model and deployment scenario. If this change is intentional, add comments explaining:
|
||
| if base == "" { | ||
| base = `C:\ProgramData` | ||
| base = filepath.Join(os.Getenv("USERPROFILE"), "AppData", "Local") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 HIGH SEVERITY - Missing validation for USERPROFILE environment variable If both This could cause:
The old code had a hardcoded absolute fallback ( Recommendation: Add validation for if base == "" {
userProfile := os.Getenv("USERPROFILE")
if userProfile == "" {
base = `C:\Users\Default\AppData\Local` // or another safe default
} else {
base = filepath.Join(userProfile, "AppData", "Local")
}
} |
||
| } | ||
| return filepath.Join(base, "DockerSecretsEngine", "service", "daemon.sock") | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 HIGH SEVERITY - Breaking change without migration path
This change moves the socket from
ProgramData(typicallyC:\ProgramData) toLOCALAPPDATA(typicallyC:\Users\<username>\AppData\Local). This breaks backward compatibility:Impact: Systems will be left in an inconsistent state during upgrades.
Recommendations: