Skip to content

Support Path Traversals in Vendoring #888

@goruha

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions