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

⭐ Framework cmd #1355

Merged
merged 14 commits into from
Jul 8, 2024
Merged

⭐ Framework cmd #1355

merged 14 commits into from
Jul 8, 2024

Conversation

slntopp
Copy link
Member

@slntopp slntopp commented Jul 3, 2024

No description provided.

@slntopp slntopp self-assigned this Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 2024

Test Results

  1 files  ±0   24 suites  ±0   17s ⏱️ -2s
384 tests ±0  383 ✅ ±0  1 💤 ±0  0 ❌ ±0 
385 runs  ±0  384 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 81d6f93. ± Comparison against base commit 1b2061b.

♻️ This comment has been updated with latest results.

@slntopp slntopp marked this pull request as ready for review July 4, 2024 11:46
@slntopp slntopp requested a review from tas50 July 4, 2024 14:12
Copy link
Member

@imilchev imilchev left a comment

Choose a reason for hiding this comment

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

the code looks good. @tas50 perhaps you want to try it out before releasing?

apps/cnspec/cmd/framework.go Outdated Show resolved Hide resolved
test/cli/testdata/cnspec.ct Outdated Show resolved Hide resolved
@slntopp slntopp requested a review from tas50 July 5, 2024 00:23
@tas50
Copy link
Member

tas50 commented Jul 5, 2024

Is it possible for us to give a better error message when the user does not have the correct permissions to list this data?

cnspec framework list
→ loaded configuration from /Users/tsmith/.config/mondoo/mondoo.yml using source default
Error: rpc error: code = PermissionDenied desc = no valid permissions to access the resource
Usage:
  cnspec framework list [flags]

Flags:
  -a, --all           list all frameworks, not only the active ones (applicable only for upstream)
  -f, --file string   a local bundle file
  -h, --help          help for list

Global Flags:
      --api-proxy string   Set proxy for communications with Mondoo API
      --auto-update        Enable automatic provider installation and update (default true)
      --config string      Set config file path (default $HOME/.config/mondoo/mondoo.yml)
      --log-level string   Set log level: error, warn, info, debug, trace (default "info")
  -v, --verbose            Enable verbose output

x rpc error: code = PermissionDenied desc = no valid permissions to access the resource

@slntopp
Copy link
Member Author

slntopp commented Jul 5, 2024

@tas50 updated it, is that what you expect, or should we make more elaborate error message, like "minimal required permission is X"?

@imilchev imilchev merged commit b419bbc into main Jul 8, 2024
13 checks passed
@imilchev imilchev deleted the mik/framework-cmd branch July 8, 2024 08:03
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 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.

3 participants