Skip to content

Support Path Traversals in Vendoring #888

Closed

Description

@goruha

Describe the Bug

When there are traverse path in vendor URI atmos vendor pull fail with error
FatalError{Underlying: error while running command: exit status 1; URI cannot contain path traversal sequences}

The regression introduced in version 1.130.0

Expected Behavior

atmos vendor pull should finis successfully

Steps to Reproduce

  1. Use atmos version 1.130.0
  2. Create vendor.yaml with following content
apiVersion: atmos/v1
kind: AtmosVendorConfig
metadata:
  name: fixtures
  description: Atmos vendoring manifest
spec:
  sources:
    - component: "account-map"
      source: github.com/cloudposse/terraform-aws-components.git//modules/account-map?ref={{.Version}}
      version: 1.520.0
      targets:
        - "components/terraform/account-map"
      included_paths:
        - "**/*.tf"
        - "**/*.md"
        - "**/*.tftmpl"
        - "**/modules/**"
      excluded_paths: []

    - component: "vpc"
      source: "../../src"
      targets:
        - "components/terraform/vpc"
      included_paths:
        - "**/*.tf"
        - "**/*.md"
        - "**/*.tftmpl"
        - "**/modules/**"
      excluded_paths: []
  1. Run atmos vendor pull

Screenshots

No response

Environment

No response

Additional Context

No response

Activity

  1. added
    bug
    on Dec 23, 2024
  2. changed the title [-]Vendor pul regression[/-] [+]Vendor pull regression[/+] on Dec 24, 2024
  3. jamengual commented on Dec 24, 2024

    @jamengual
    Contributor

    I'm having the same issue

    looks like this broke the parsing:

    Run cd atmos/
    Vendoring from 'vendor.yaml'
    unsupported URI scheme: git::https
    Error: Process completed with exit code 1.
    

    when

    sources:
          - source: 'git::https://x-access-token:{{env "GITHUB_TOKEN"}}@github.com......
  4. osterman commented on Dec 24, 2024

    @osterman
    Member

    PePe Amengual (@jamengual) your error is related to the new vendoring, but unrelated to the error above.

    Igor Rodionov (@goruha) We can remove the check for path traversals. Makes sense in the use-case above.

  5. changed the title [-]Vendor pull regression[/-] [+]Support Path Traversals in Vendoring[/+] on Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions