aws / aws/aws-codedeploy-agent

[Feature Request]Appspec.yml validation

Open
#369 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
337
Forks
195
Avg merge
10h 54m
Merged PRs (30d)
4

Description

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:

```yaml
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

```yaml
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
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the appspec.yml parsing and permissions handling, then reproduce the malformed `type: file` case described in the issue. Done means incorrectly formatted values are rejected with a clear diagnostic instead of causing the agent to crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, yaml
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.