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

Improve the GitLab policy description #262

Merged
merged 8 commits into from
Sep 19, 2023
Merged
Changes from 1 commit
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
47 changes: 46 additions & 1 deletion core/mondoo-gitlab-security.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,52 @@ policies:
- name: Mondoo, Inc
email: [email protected]
docs:
desc: "## Overview\n\nThe GitLab Security by Mondoo policy bundle provides guidance for establishing minimum recommended security and operational best practices for GitLab groups and projects. This policy is early access.\n\n## Remote scan\n\nRemote scans use native transports in `cnspec` to provide on demand scan results without the need to install any agents, or integration. \n\nFor a complete list of native transports run: \n\n```bash\ncnspec scan --help\n``` \n\n### Prerequisites\n\nRemote scans of GitLab requires a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with access to the group.\n\n### Run a scan of a GitLab group\n\nOpen a terminal and configure an environment variable with your GitLab personal access token:\n\n```bash\nexport GITLAB_TOKEN=<your personal access token> \n```\n\nRun a remote scan of your GitLab group: \n\n```bash\ncnspec scan gitlab --group <group_name>\n``` \n \n## Join the community!\n\nOur goal is to build policies that are simple to deploy, accurate, and actionable. \n\nIf you have any suggestions on how to improve this policy, or if you need support, [join the community](https://github.com/orgs/mondoohq/discussions) in GitHub Discussions."
desc: |
## Overview

The GitLab Security policy by Mondoo offers guidance on establishing minimum recommended security best practices for GitLab groups and projects.

## Remote scan

Remote scans of GitLab groups and projects use native transports in `cnspec` to provide on demand scan results without the need to install agents or configure integrations.
tas50 marked this conversation as resolved.
Show resolved Hide resolved

### Prerequisites

Remote scans of GitLab requires a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with access to the group and projects you plan to scan.
tas50 marked this conversation as resolved.
Show resolved Hide resolved

### Run a scan of a GitLab group and projects
tas50 marked this conversation as resolved.
Show resolved Hide resolved

Open a terminal and configure an environment variable with your GitLab personal access token:

```bash
export GITLAB_TOKEN=<your personal access token>
```

Run a remote scan of your GitLab group:

```bash
cnspec scan gitlab --group <group_name>
```

### Run a scan of a single GitLab project
tas50 marked this conversation as resolved.
Show resolved Hide resolved

Open a terminal and configure an environment variable with your GitLab personal access token:

```bash
export GITLAB_TOKEN=<your personal access token>
```

Run a remote scan of your GitLab group:
tas50 marked this conversation as resolved.
Show resolved Hide resolved

```bash
cnspec scan gitlab --group <group_name> --project <project_name>
```

## Join the community!

Our goal is to build policies that are simple to deploy, accurate, and actionable.

If you have any suggestions on how to improve this policy, or if you need support, [join the community](https://github.com/orgs/mondoohq/discussions) in GitHub Discussions."
groups:
- title: GitLab Group
filters: asset.platform == "gitlab" || asset.platform == "gitlab-group"
Expand Down