Skip to content

Implement OAuth flow for provisioning API key - #32

Open
lavicosa wants to merge 5 commits into
mainfrom
feat/eng-1709-oauth-client
Open

lavicosa wants to merge 5 commits into
mainfrom
feat/eng-1709-oauth-client

Conversation

@lavicosa

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown

AI Cost

No spend detected for branch feat/eng-1709-oauth-client in the last 30 days.

Updated 2026-09-23T13:47Z · last 30 days · data from Requesty

@github-actions github-actions Bot added the cost:$0.00 AI cost for this branch label Sep 21, 2026
Comment thread internal/oauth/browser.go
var cmd *exec.Cmd
switch runtime.GOOS {
case "darwin":
cmd = exec.Command("open", url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible command injection via shell script - medium severity
Your code spawns a subprocess via a shell script. User input could be abused to inject extra commands.

Show fix

Remediation: This issue can be mitigated or ignored if you verified or sanitized the user input used in the shell command.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Comment thread internal/oauth/browser.go
case "darwin":
cmd = exec.Command("open", url)
case "windows":
cmd = exec.Command("rundll32", "url.dll,FileProtocolHandler", url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible command injection via shell script - medium severity
Your code spawns a subprocess via a shell script. User input could be abused to inject extra commands.

Show fix

Remediation: This issue can be mitigated or ignored if you verified or sanitized the user input used in the shell command.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Comment thread internal/oauth/browser.go
case "windows":
cmd = exec.Command("rundll32", "url.dll,FileProtocolHandler", url)
default:
cmd = exec.Command("xdg-open", url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible command injection via shell script - medium severity
Your code spawns a subprocess via a shell script. User input could be abused to inject extra commands.

Show fix

Remediation: This issue can be mitigated or ignored if you verified or sanitized the user input used in the shell command.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Comment on lines +7 to +15
"os"
"os/exec"
)

// execProcess runs the harness as a child with our terminal and exits with
// its status once it finishes. Windows has no exec(2), so this is the closest
// equivalent. It is a variable so tests can capture the launch instead.
var execProcess = func(path string, argv []string, env []string) error {
cmd := exec.Command(path, argv[1:]...)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible command injection via shell script - medium severity
Your code spawns a subprocess via a shell script. User input could be abused to inject extra commands.

Show fix
Suggested change
"os"
"os/exec"
)
// execProcess runs the harness as a child with our terminal and exits with
// its status once it finishes. Windows has no exec(2), so this is the closest
// equivalent. It is a variable so tests can capture the launch instead.
var execProcess = func(path string, argv []string, env []string) error {
cmd := exec.Command(path, argv[1:]...)
"fmt"
"os"
"os/exec"
"regexp"
)
// execProcess runs the harness as a child with our terminal and exits with
// its status once it finishes. Windows has no exec(2), so this is the closest
// equivalent. It is a variable so tests can capture the launch instead.
var execProcess = func(path string, argv []string, env []string) error {
validPath := regexp.MustCompile(`^[a-zA-Z0-9_\-\.\/\\\: ]+$`)
if !validPath.MatchString(path) {
return fmt.Errorf("invalid input")
}
cmd := exec.Command(path, argv[1:]...)

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cost:$0.00 AI cost for this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant