Skip to content

fix: clarify absolute path validation warning - #2201

Merged
TerryHowe merged 1 commit into
oras-project:mainfrom
KKamJi98:fix/1744-absolute-path-warning
Sep 29, 2026
Merged

TerryHowe merged 1 commit into
oras-project:mainfrom
KKamJi98:fix/1744-absolute-path-warning

Conversation

@KKamJi98

Copy link
Copy Markdown

What this PR does / why we need it:

Say that absolute file paths are insecure and not recommended before suggesting --disable-path-validation. The same check covers push and attach; validation behavior stays unchanged. The pull-side message was updated in #1773.

Which issue(s) this PR fixes:

Fixes #1744

Tests:

  • go test -race ./... -count=1
  • golangci-lint run ./...
  • Confirmed the CLI rejects an absolute path with the new message.

AI-assisted; reviewed and tested locally.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.80%. Comparing base (7c53cbf) to head (6a55b09).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2201   +/-   ##
=======================================
  Coverage   87.80%   87.80%           
=======================================
  Files         139      139           
  Lines        5756     5756           
=======================================
  Hits         5054     5054           
  Misses        419      419           
  Partials      283      283           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe
TerryHowe merged commit a826d9a into oras-project:main Sep 29, 2026
10 checks passed
@KKamJi98
KKamJi98 deleted the fix/1744-absolute-path-warning branch September 29, 2026 16:04
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.

Improve error message for pushing/pulling files with absolute paths

2 participants