-
Notifications
You must be signed in to change notification settings - Fork 1
Resolve security review findings #60
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?
Changes from all commits
c24ea79
6b3ac71
19422ba
1e5fda8
b1d2a99
9891a86
f21bd43
5b23652
1848fc4
d1b3ccf
50a6464
3026d3d
4c10c7a
65ce88a
5fdaa4b
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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| kind: BUG FIXES | ||
| body: Disallow api commands containing non-profile hostname URL argument and non-https schemes. | ||
| time: 2026-06-16T15:05:18.528781-06:00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| kind: BUG FIXES | ||
| body: Profile configuration files are now created with owner-rw permissions only. | ||
| time: 2026-06-16T15:05:38.766655-06:00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| kind: BUG FIXES | ||
| body: hostname telemetry is anonymized when not HCP Terraform. | ||
| time: 2026-06-16T15:06:04.201058-06:00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -252,11 +252,16 @@ func NewCmdAPI(inv *cmd.Invocation) *cmd.Command { | |
| path = resolvedPath | ||
| } | ||
|
|
||
| // URL safety validation | ||
| resolvedURL, err := client.ResolveURL(*apiClient.BaseURL, path) | ||
| if err != nil { | ||
| return fmt.Errorf("invalid input path/URL %q", path) | ||
| } | ||
|
|
||
| if resolvedURL.Scheme != "https" { | ||
|
Collaborator
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. Hostnames are stored exactly as the user entered them (including any scheme), and the client only prepends
Collaborator
Author
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. I think this is a bug in how profile hostnames are parsed and created. "hostname" should not contain a scheme.
Collaborator
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. Agree this was a real bug. But the
Collaborator
Author
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. Got it
Collaborator
Author
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. |
||
| return fmt.Errorf("invalid input path/URL %q: must use https scheme", path) | ||
| } | ||
|
|
||
| opts.URL = resolvedURL | ||
| opts.Client = apiClient | ||
| opts.Quiet = inv.GetGlobalFlags().Quiet | ||
|
|
||
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.
should we delete the
hero.pngfile