elastic / elastic/elastic-agent
Elastic Agent docker user should be numeric
- Dominant language
- Go
- Stars
- 275
- Forks
- 264
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 303
Description
- Relates https://github.com/elastic/beats/pull/41197
Make the same change that was done for Beats in https://github.com/elastic/beats/pull/41197 for Elastic Agent, for example the user below should be numeric instead.
https://github.com/elastic/elastic-agent/blob/f32807c8af3abb08d211948bfe63e04af44d8ef3/dev-tools/packaging/packages.yml#L521
This makes the container with more restricted security contexts using `runAsNonRoot` set to `true` which requires a numeric user to verify the user is not the root user.
## Acceptance Criteria
Add a test that proves the agent containers can run as unprivileged in security contexts that set `runAsNonRoot` to `true`
Contributor guide
Research direction
Start with dev-tools/packaging/packages.yml at the referenced user entry and compare the equivalent change in Beats PR 41197. Add the Elastic Agent container test requested in the acceptance criteria, then verify that the container runs in a security context with runAsNonRoot set to true and that the configured user is numeric.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100