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
1 change: 1 addition & 0 deletions cmd/internal/git_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func doRequest(
credentials *gitcredentials.GitCredentials,
url string,
) (*gitcredentials.GitCredentials, error) {
// #nosec G117 -- credentials request legitimately carries the password.
rawJSON, err := json.Marshal(credentials)
if err != nil {
return nil, fmt.Errorf("error marshalling credentials: %w", err)
Expand Down
2 changes: 2 additions & 0 deletions pkg/agent/tunnelserver/tunnelserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func (t *tunnelServer) DockerCredentials(
return nil, err
}

// #nosec G117 -- docker credential response legitimately carries the secret.
out, err := json.Marshal(credentials)
if err != nil {
return nil, err
Expand Down Expand Up @@ -299,6 +300,7 @@ func (t *tunnelServer) GitCredentials(
return nil, err
}

// #nosec G117 -- git credential response legitimately carries the password.
out, err := json.Marshal(credentials)
if err != nil {
return nil, err
Expand Down
2 changes: 2 additions & 0 deletions pkg/dockercredentials/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (s *HelperTestSuite) TestGet_Success() {
s.NoError(err)
s.Equal("docker.io", request.ServerURL)

// #nosec G117 -- test fixture credentials.
_ = json.NewEncoder(w).Encode(&Credentials{
ServerURL: "docker.io",
Username: "testuser",
Expand Down Expand Up @@ -92,6 +93,7 @@ func (s *HelperTestSuite) TestGet_WorkspaceServerFallback() {
s.NoError(err)
s.Equal("docker.io", request.ServerURL)

// #nosec G117 -- test fixture credentials.
_ = json.NewEncoder(w).Encode(&Credentials{
ServerURL: "docker.io",
Username: "workspaceuser",
Expand Down
1 change: 1 addition & 0 deletions pkg/platform/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (c *client) Save() error {
return err
}

// #nosec G117 -- persisted client config legitimately carries the access key.
out, err := json.Marshal(c.config)
if err != nil {
return err
Expand Down
Loading