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

asset {*} returns multiple rpc errors when connected to Terraform Plan #5251

Open
scottford-io opened this issue Feb 20, 2025 · 0 comments
Open

Comments

@scottford-io
Copy link
Contributor

Describe the bug
I don't think this is limited to terraform-plan assets in the cnspec shell, if you connect to a tfplan.json and run asset {*}, multiple rpc errors are returned:

asset  {*}
2 errors occurred:
	* rpc error: code = Unknown desc = cannot find connection type terraform-plan
	* rpc error: code = Unknown desc = connection type is not supported for vSphere connection: terraform-plan
asset: {
  cpes: rpc error: code = Unknown desc = cannot find connection type terraform-plan
  kind: "code"
  build: ""
  version: ""
  title: "Terraform Plan"
  annotations: {}
  purl: rpc error: code = Unknown desc = cannot find connection type terraform-plan
  arch: ""
  labels: {}
  platform: "terraform-plan"
  vulnerabilityReport: rpc error: code = Unknown desc = connection type is not supported for vSphere connection: terraform-plan
  runtime: "terraform"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/terraform/hash/3465e7b823cc2f0b67b0037f11f36e9ab46e76b75805761f748cbb1ecc1b1aaaa"
  ]
  name: "Terraform Static Analysis tfplan"
  fqdn: ""
  family: [
    0: "terraform"
  ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Create a tfplan.json
  2. cnspec shell terraform plan tfplan.json
  3. asset {*}

Expected behavior
We should handle asset fields that are not applicable without erroring out when connected to assets such as TF plan, k8s manifest, etc.

Screenshots or CLI Output
If applicable, add screenshots or the CLI output to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. macOS]
  • OS Version: [e.g. 13.0]
  • Browser if applicable: [e.g. Chrome, Firefox]
  • Browser Version: [e.g. 106]

Additional context
Add any other context about the problem here.

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

1 participant