Create custom user package to obtain host user data#152
Merged
uri-weisman merged 11 commits intoelastic:mainfrom May 22, 2022
Merged
Create custom user package to obtain host user data#152uri-weisman merged 11 commits intoelastic:mainfrom
uri-weisman merged 11 commits intoelastic:mainfrom
Conversation
Cloudbeat CI 🤖Integration tests passed! 💚 =========================== short test summary info ============================
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[file]
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[process]
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[k8s_object]
PASSED product/tests/test_cloudbeat.py::test_cloudbeat_pod_exist
PASSED product/tests/test_cloudbeat.py::test_cloudbeat_pods_running
================= 5 passed, 63 deselected, 6 warnings in 1.17s =================Link to detailed report: https://elastic.github.io/cloudbeat/567 |
uri-weisman
commented
May 16, 2022
Collaborator
Author
|
fixes #118 |
eyalkraft
reviewed
May 16, 2022
uri-weisman
commented
May 17, 2022
eyalkraft
suggested changes
May 17, 2022
Contributor
eyalkraft
left a comment
There was a problem hiding this comment.
Nice tests! small changes required
| func GetUserNameFromID(uid uint32, userFilePath string) string { | ||
| u := strconv.FormatUint(uint64(uid), 10) | ||
| usr, err := lookupUserId(u, userFilePath) | ||
| if err != nil || usr == nil { |
Contributor
There was a problem hiding this comment.
errors are completely silenced here. Let's return an error from both these functions and then on the consuming package log these errors and decide what to do (use empty string?)
| @@ -0,0 +1,2 @@ | |||
| wheel:*:0:root | |||
Contributor
There was a problem hiding this comment.
nice, let's move both mocks into resources/utils/mock/
| FileMode: mod, | ||
| Uid: usr.Name, | ||
| Gid: group.Name, | ||
| Uid: utils.GetUserNameFromID(uid, UserFile), |
Contributor
There was a problem hiding this comment.
That's good for now, let's open an issue for it as we discussed (as there are not uid/gid) and link it in a comment
Collaborator
Author
There was a problem hiding this comment.
orouz
pushed a commit
to orouz/cloudbeat
that referenced
this pull request
Sep 6, 2023
…c#152) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
orestisfl
pushed a commit
to orestisfl/cloudbeat
that referenced
this pull request
Oct 11, 2023
…es_generator (elastic#152) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.