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

Sanity check: CNVM resources must have a host section #2138

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

kubasobon
Copy link
Member

@kubasobon kubasobon commented Apr 15, 2024

Summary of your changes

CNVM sanity checks ensure vulnerabilities have host section.

Successful run of the workflow (manually triggered with this branch): https://github.com/elastic/cloudbeat/actions/runs/8692286012

Related Issues

Follow-up to #2126
Related to #2081

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary README/documentation (if appropriate)

Introducing a new rule?

No

@kubasobon kubasobon self-assigned this Apr 15, 2024
@kubasobon kubasobon changed the title TEST: check if CNVM resources have host section WIP: check if CNVM resources have host section Apr 15, 2024
Copy link

mergify bot commented Apr 15, 2024

This pull request does not have a backport label. Could you fix it @kubasobon? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

Copy link

github-actions bot commented Apr 15, 2024

📊 Allure Report - 💚 No failures were reported.

Result Count
🟥 Failed 0
🟩 Passed 359
⬜ Skipped 33

@kubasobon kubasobon changed the title WIP: check if CNVM resources have host section Sanity test: CNVM resources must have a host section Apr 16, 2024
@kubasobon kubasobon linked an issue Apr 16, 2024 that may be closed by this pull request
5 tasks
@kubasobon kubasobon changed the title Sanity test: CNVM resources must have a host section Sanity check: CNVM resources must have a host section Apr 16, 2024
@kubasobon kubasobon mentioned this pull request Apr 16, 2024
5 tasks
@kubasobon kubasobon marked this pull request as ready for review April 16, 2024 12:28
@kubasobon kubasobon requested a review from a team as a code owner April 16, 2024 12:28
Copy link
Collaborator

@oren-zohar oren-zohar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to ensure it's different than the agent's host?

@kubasobon
Copy link
Member Author

kubasobon commented Apr 18, 2024

@oren-zohar Possibly, but there is a "but". If it's either a test account or real account, Cloudbeat still scans the whole thing. That means there always will be at least one VM/EC2 Instance/Cloud Compute Instance where host.name == agent.name. The one with Agent and Cloudbeat running on them. This is why I chose not to check this.

@kubasobon kubasobon merged commit fc702a3 into main Apr 22, 2024
24 checks passed
@kubasobon kubasobon deleted the kuba-sanity branch April 22, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host information is incorrect
3 participants