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

🐛 fix reporting when policies are fetched from public registry #1107

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

chris-rock
Copy link
Member

@chris-rock chris-rock commented Feb 9, 2024

fixes #1071

When we run scans we have 3 different cases we need to handle:

  1. use local bundle
  2. public registry, which is default when not authenticated with Mondoo platoform and no local bundle was provided
  3. authenticated with Mondoo platform with upstream reporting
  4. authenticated with Mondoo platform in incognito mode but with upstream policies

Before this PR we did different ways of handling. We harmonize the fetching of the bundles for the reported now. We always use the services.GetBundle() independently of the cases above. This simplifies the code base.

It is also important to note that having a configuration does not mean that it includes upstream config. A simple config could be:

auto_update: true
log-level: info

TODO:

  • For reporting we want to fetch the bundle only once when we are authenticated

@chris-rock chris-rock changed the title 🐛 fix reporting 🐛 fix reporting when policies are fetched from public registry Feb 9, 2024
@imilchev imilchev marked this pull request as draft February 9, 2024 11:23
@chris-rock chris-rock marked this pull request as ready for review February 9, 2024 16:49
Copy link
Contributor

github-actions bot commented Feb 9, 2024

Test Results

  1 files  ±0   24 suites  ±0   17s ⏱️ ±0s
290 tests +1  289 ✅ +1  1 💤 ±0  0 ❌ ±0 
291 runs  +1  290 ✅ +1  1 💤 ±0  0 ❌ ±0 

Results for commit 6f31b3a. ± Comparison against base commit a8defa1.

♻️ This comment has been updated with latest results.

@chris-rock chris-rock merged commit 4767d11 into main Feb 9, 2024
12 checks passed
@chris-rock chris-rock deleted the chris-rock/fix-reporting branch February 9, 2024 18:56
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incognito scan failing to pull policy
2 participants