Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@

func HasWorkspaceBusyFile(folder string) bool {
filePath := filepath.Join(folder, config.WorkspaceBusyFile)
_, err := os.Stat(filePath)
_, err := os.Stat(filePath) // #nosec G703 -- folder is the agent-resolved workspace dir, not user input

Check failure on line 314 in pkg/agent/agent.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (golines)
return err == nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/dockerless.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

func ImageConfigExists(path string) bool {
_, err := os.Stat(path)
_, err := os.Stat(path) // #nosec G703 -- path is the agent-written image config output, not user input

Check failure on line 51 in pkg/agent/dockerless.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (golines)
return err == nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/devcontainer/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
filepath.Dir(markerName),
0o755,
) // #nosec G301 -- Standard directory permissions
err = os.WriteFile(markerName, []byte(markerContent), 0o600)
err = os.WriteFile(markerName, []byte(markerContent), 0o600) // #nosec G703 -- fixed caller-defined marker name under ContainerDataDir

Check failure on line 607 in pkg/devcontainer/setup/setup.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (golines)
if err != nil {
return false, fmt.Errorf("write marker: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/dockercredentials/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func (h *Helper) getFromWorkspaceServer(serverURL string) (string, string, error

client := &http.Client{Timeout: credentialsTimeout}
endpoint := fmt.Sprintf("http://localhost:%s/docker-credentials", workspacePort)
// #nosec G704 -- endpoint is localhost with the workspace credentials port injected by the agent
resp, err := client.Post(endpoint, "application/json", bytes.NewReader(requestBody))
if err != nil {
return "", "", err
Expand Down
2 changes: 1 addition & 1 deletion pkg/gpg/gpg_forwarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (g *GPGConf) SetupRemoteSocketLink(ctx context.Context) error {
if err := os.MkdirAll(filepath.Dir(link), 0o700); err != nil {
return err
}
_ = os.Remove(link)
_ = os.Remove(link) // #nosec G703 -- link derives from $HOME and the current uid, not user input
if err := os.Symlink(g.SocketPath, link); err != nil {
return err
}
Expand Down
Loading