Skip to content

Conversation

@ArangoGutierrez
Copy link
Collaborator

Summary

  • Replace silent error discard (_ = client.MkdirAll(remoteDir)) with a warning log so permission-denied or disk-full errors are diagnosable
  • The directory creation is best-effort (it may already exist), so a warning is appropriate rather than a hard error

Audit Finding

Changes

  • cmd/cli/scp/scp.go: Log MkdirAll error as warning instead of discarding with _ =

Test plan

  • gofmt — no formatting issues
  • golangci-lint run ./... — 0 issues
  • go test -coverprofile=coverage.out ./pkg/... — all tests pass
  • go build -o bin/holodeck cmd/cli/main.go — compiles
  • go mod tidy && go mod verify — all modules verified

Copilot AI review requested due to automatic review settings February 12, 2026 19:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses an audit finding in the holodeck scp CLI command by making SFTP remote directory creation failures diagnosable, without changing the operation to be fatal.

Changes:

  • Replaced a silently discarded sftp.Client.MkdirAll error with a warning log.
  • Kept directory creation as best-effort to avoid turning a non-critical failure into a hard error.

@coveralls
Copy link

coveralls commented Feb 12, 2026

Pull Request Test Coverage Report for Build 21960972397

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 47.501%

Totals Coverage Status
Change from base Build 21955389842: 0.0%
Covered Lines: 2500
Relevant Lines: 5263

💛 - Coveralls

The error was silently discarded with '_ ='. Log it as a warning
so permission-denied or disk-full errors are diagnosable.

Audit finding NVIDIA#26 (LOW).

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants