elastic / elastic/cloudbeat

Parse process config file based on the real file's type and not the extension

Open
#681 0 comments 0 reactions 0 assignees View on GitHub
bug cloudbeat good first issue Team:Cloud Security
Dominant language
Go
Stars
58
Forks
55
Avg merge
9h 9m
Merged PRs (30d)
424

Description

**Describe the bug**
Cloudbeat failed to parse a Kubelet process config file as it lacks the supported extensions (JSON/YAML), even though the file is indeed a yaml file.

```
09:33:10.542 elastic_agent.cloudbeat [elastic_agent.cloudbeat][info] Using etc/eks/ecr-credential-provider/ecr-credential-provider-config as a configuration file for process kubelet
09:33:10.548 elastic_agent.cloudbeat [elastic_agent.cloudbeat][error] Failed to parse file configuration for process kubelet, error - type is not supported
```

**Preconditions**
8.7.0-SNAPSHOT
Install the KSPM - EKS integration

**To Reproduce**
Write the exact actions one should perform in order to reproduce the bug.
Steps to reproduce the behavior:
1. Install agents and observe fleet UI logs, the error should appear.

**Expected behavior**
Cloudbeat should be able to parse YAML/JSON files even if the file's name lacks the proper extension, which can be handled by detecting the actual mime type of the file.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.