Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]Appspec.yml validation #369

Open
t0shiii opened this issue Apr 28, 2023 · 0 comments
Open

[Feature Request]Appspec.yml validation #369

t0shiii opened this issue Apr 28, 2023 · 0 comments

Comments

@t0shiii
Copy link
Contributor

t0shiii commented Apr 28, 2023

There is a gap where the appspec.yml can be a valid yaml but incorrectly formatted which can cause the Ruby interpreter to crash.

An example is the permissions section:

permissions:
  - object: /tmp/my-app
    pattern: "*-3.txt"
    owner: adm
    group: wheel
    mode: 464
    type:
      - file

where type is expecting an array. If a str is given

type: file

this will crash the agent with a message similar to the following:

put_host_command_complete(command_status:"Failed",diagnostics:{format:"JSON",payload:"{\"error_code\":5,\"script_name\":\"\",\"message\":\"undefined method `each' for \\\"file\\\":String\",\"log
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

No branches or pull requests

1 participant