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

Add GitLab long-form help #4966

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions providers/gitlab/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ var Config = plugin.Provider{
Name: "gitlab",
Use: "gitlab",
Short: "a GitLab group or project",
Long: `Use the gitlab provider to query resources within GitLab groups and projects.

Available commands:
group GitLab group
project GitLab project

Examples:
cnspec scan gitlab --group <GROUP_NAME> --token <YOUR_TOKEN>
cnspec scan gitlab --discover projects --token <YOUR_TOKEN>
cnspec scan gitlab --group <GROUP_NAME> --project <PROJECT_NAME> --token <YOUR_TOKEN>
cnspec scan gitlab --group <GROUP_NAME> --discover projects --token <YOUR_TOKEN>
cnspec scan gitlab --discover terraform --token <YOUR_TOKEN>
cnquery shell gitlab --group <GROUP_NAME> --token <YOUR_TOKEN>
cnquery shell gitlab --group <GROUP_NAME> --project <PROJECT_NAME> --token <YOUR_TOKEN>

Notes:
Mondoo needs a personal access token to scan a GitHub group or project. The token's level of access determines how much information Mondoo can retrieve. Instead of providing a token with every command, you can supply your personal access token to Mondoo by setting the GITLAB_TOKEN environment variable. To learn how, read https://mondoo.com/docs/cnspec/saas/gitlab/.
`,
Discovery: []string{
provider.DiscoveryGroup,
provider.DiscoveryProject,
Expand Down
Loading