Skip to content

--disable-path-validation not working for oras push and oras attach #983

Closed

Description

@qweeah

What happened in your environment?

I can still push files with absolute path even if --disable-path-validation is set to false

$ oras push localhost:5000/test:path /my/test/file --disable-path-validation=false
Uploading e3b0c44298fc /my/test/file
Uploaded  e3b0c44298fc /my/test/file
Pushed [registry] localhost:5000/test:path
Digest: sha256:c925e33e51a8ff03e378e2956fdd4aa3a28203ed9aaa778d634c5e647c65bc54

What did you expect to happen?

The operation should fail with warning mentioning that using absolute paths in artifacts is generally insecure and not friendly to cross-platform scenarios.

How can we reproduce it?

Use absolute path to specify files in oras push or oras attach

What is the version of your ORAS CLI?

1.0.0

What is your OS environment?

20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    on Jun 21, 2023
  2. qweeah commented on Jun 26, 2023

    @qweeah
    ContributorAuthor

    @suganyas Do you want to work on this?

  3. suganyas commented on Jun 26, 2023

    @suganyas
    Contributor

    @qweeah my fix will fix this one too.

  4. added this to the v2.0.0 milestone on Jun 28, 2023
  5. modified the milestones: v2.0.0, v1.1.0 on Jun 29, 2023
  6. qweeah commented on Jun 29, 2023

    @qweeah
    ContributorAuthor

    completed in #988

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions