Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prevent using paths outside of the project directory #8

@qzb

Description

@qzb

Steps to reproduce the issue

  1. Create ./project-dir/project.yaml:

    apiVersion: g2a-cli/v2.0
    kind: Project
    name: example-project
    files:
      - '../*.yaml'
  2. Create ./service.yaml:

    apiVersion: g2a-cli/v2.0
    kind: Service
    name: example-service
  3. Go to ./project-dir and run build command.

What's the expected result?

Loading file: /Users/qzb/Workspace/g2a-com/klio-lifecycle/examples/project-dir/project.yaml
Loading file: /Users/qzb/Workspace/g2a-com/klio-lifecycle/examples/service.yaml
File "/Users/qzb/Workspace/g2a-com/klio-lifecycle/examples/service.yaml" cannot be loaded, it is placed outside of the project directory

What's the actual result?

Loading file: /Users/qzb/Workspace/g2a-com/klio-lifecycle/examples/project-dir/project.yaml
Loading file: /Users/qzb/Workspace/g2a-com/klio-lifecycle/examples/service.yaml
No artifacts to build
Successfully built 1 service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions