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

cnspec showing failures in bool data queries as if they're assertions #891

Open
tas50 opened this issue Oct 25, 2023 · 1 comment
Open
Milestone

Comments

@tas50
Copy link
Member

tas50 commented Oct 25, 2023

Describe the bug
This one is a bit weird. We have some data queries in the asset inventory pack that return bool values. The CLI is showing these as assertions that have failed.

 ~/dev  cnspec scan github repo lunalectric/k8s-base --token FOO
→ loaded configuration from /Users/tsmith/.config/mondoo/mondoo.yml using source default
→ using service account credentials
→ discover related assets for 1 asset(s)
→ synchronize assets

 lunalectric/k8s-base ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  n/a score


Asset: lunalectric/k8s-base
---------------------------

Data queries:
github.repository.owner.name: "Lunalectric"
[failed] github.repository.archived
  expected: == true
  actual:   false

github.repository.fullName: "Lunalectric/k8s-base"
[failed] github.repository.private
  expected: == true
  actual:   false

[failed] github.repository.isFork
  expected: == true
  actual:   false

asset.title: "GitHub Repository"
mondoo.version: "9.3.3"
github.repository.createdAt: 2022-10-20 17:05:37 -0700 PDT
github.repository.description: "Base K8s manifests"



Scanned 1 asset

GitHub Repository
    U lunalectric/k8s-base

@arlimus
Copy link
Member

arlimus commented Oct 26, 2023

Yeah that's a confirmed bug! We should add a control into the compiler to let it know if we want these assessments of boolean values (in checks) or not (in regular queries).

@arlimus arlimus added this to the v9 milestone Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants