Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
Former maintainers are listed here.
Thanks for your contributions to Scorecard!

-
-
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ by default, also the default `log` action won't produce visible results. A
simple way to enable all policies is to create a yaml file for each policy with
the contents:

```
```yaml
optConfig:
optOutStrategy: true
action: issue
Expand Down
4 changes: 2 additions & 2 deletions deploy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash

export KO_DOCKER_REPO="gcr.io/allstar-ossf"
cont=$(ko publish ./cmd/allstar)
gcloud app deploy --image-url ${cont}
gcloud app deploy --image-url "${cont}"
222 changes: 128 additions & 94 deletions manual-install.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# **Manual Installation**

These directions walk you through manually installing Allstar on your organization or repository.
These directions walk you through manually installing Allstar on your organization or repository.
For a faster setup that installs Allstar on all your repositories, see the [Quickstart Installation](README.md#quickstart-installation).

To choose the installation strategy that's best for your situation, consult the decision tree and then follow the appropriate link below:

![Installation Decision Tree](install-decision.jpg)


[Opt Out Strategy Installation Directions](#opt-out-strategy-installation-directions)

[Opt In Strategy Installation Directions](#opt-in-strategy-installation-directions)
Expand All @@ -19,147 +18,182 @@ To install Allstar on your Organization using the **Opt Out Strategy** (Recommen

1. Create a repository named `.allstar`.
2. Create a file named `allstar.yaml` with the contents:
```
optConfig:
optOutStrategy: true
```

3. Optional: Opt Out Repositories

```yaml
optConfig:
optOutStrategy: true
```

3. Optional: Opt Out Repositories

To opt some repositories out, change `allstar.yaml` to look like this:
```
optConfig:
optOutStrategy: true
optOutRepos:
- repo-one
- repo-two
```

```yaml
optConfig:
optOutStrategy: true
optOutRepos:
- repo-one
- repo-two
```

To opt-out all private/public repositories, add `optOutPrivateRepos` or `optOutPublicRepos`. For example:
```
optConfig:
optOutStrategy: true
optOutPrivateRepos: true
optOutPublicRepos: false
```
4. Optional: Disable Repository Override

The repository override setting gives repositories the ability to opt themselves in or out of Allstar settings independent of configurations at the org level.
If you prefer to strictly enforce your org-level settings on your repositories, you can disable repository override. Repositories will not be able to change Allstar settings that affect them without filing a PR to request org-level changes.

```yaml
optConfig:
optOutStrategy: true
optOutPrivateRepos: true
optOutPublicRepos: false
```

4. Optional: Disable Repository Override

The repository override setting gives repositories the ability to opt themselves in or out of Allstar settings independent of configurations at the org level.
If you prefer to strictly enforce your org-level settings on your repositories, you can disable repository override. Repositories will not be able to change Allstar settings that affect them without filing a PR to request org-level changes.
To disable repository override, add the following to `allstar.yaml`:
```
optConfig:
disableRepoOverride: true
```

```yaml
optConfig:
disableRepoOverride: true
```

5. Required: To enable your policies, create four files with the names:

- `branch_protection.yaml`
- `binary_artifacts.yaml`
- `binary_artifacts.yaml`
- `outside.yaml`
- `security.yaml`
- `security.yaml`

In each of these four files, add the following contents:
```
optConfig:
optOutStrategy: true
action: [choose action]
```

```yaml
optConfig:
optOutStrategy: true
action: [choose action]
```

You will need to choose the action you would like Allstar to take when a policy is violated: `log`, `issue`, or `fix`. See [Actions](README.md#actions) for more information about each policy. If you are unsure, we suggest using `issue` as a sensible default that can be changed later. For example:
```
optConfig:
optOutStrategy: true
action: issue
```

```yaml
optConfig:
optOutStrategy: true
action: issue
```

Allstar is now configured on your organization. See [Policies](README.md#policies) for more details on all the additional configuration
options available for each policy.

## Opt In Strategy Installation Directions

```yaml
optConfig:
optOutStrategy: true
action: issue
```

Allstar is now configured on your organization. See [Policies](README.md#policies) for more details on all the additional configuration
options available for each policy.
options available for each policy.

## Opt In Strategy Installation Directions

To install Allstar on your Organization using the **Opt In Strategy**:

1. Create a repository named `.allstar`.
2. Create a file named `allstar.yaml` with the contents:
```
optConfig:
optOutStrategy: false
```
3. Required: Opt In Repositories

```yaml
optConfig:
optOutStrategy: false
```

3. Required: Opt In Repositories

Important! Allstar will not run on any repositories if you do not complete this step. You must add the repositories you want to run Allstar enforcements on.

To opt in repositories, change `allstar.yaml` to look like this:
```
optConfig:
optInRepos:
- repo-one
- repo-two
```

4. Optional: Disable Resitory Override
```yaml
optConfig:
optInRepos:
- repo-one
- repo-two
```

The repository override setting gives repositories the ability to opt themselves in or out of Allstar settings independent of configurations at the org level.
If you prefer to strictly enforce your org-level settings on your repositories, you can disable repository override. Repositories will not be able to change Allstar settings that affect them without filing a PR to request org-level changes.
4. Optional: Disable Resitory Override

The repository override setting gives repositories the ability to opt themselves in or out of Allstar settings independent of configurations at the org level.
If you prefer to strictly enforce your org-level settings on your repositories, you can disable repository override. Repositories will not be able to change Allstar settings that affect them without filing a PR to request org-level changes.
To disable repository override, add the following to `allstar.yaml`:
```
optConfig:
disableRepoOverride: true
```


```yaml
optConfig:
disableRepoOverride: true
```

5. Required: To enable your policies, create four files with the names:

- `branch_protection.yaml`
- `binary_artifacts.yaml`
- `binary_artifacts.yaml`
- `outside.yaml`
- `security.yaml`
- `security.yaml`

In each of these four files, add the following contents:
```
optConfig:
optOutStrategy: true
action: [choose action]
```

```yaml
optConfig:
optOutStrategy: true
action: [choose action]
```

You will need to choose the action you would like Allstar to take when a policy is violated: `log`, `issue`, or `fix`. See [Actions](README.md#actions) for more information about each policy. If you are unsure, we suggest using `issue` as a sensible default that can be changed later. For example:
```
optConfig:
optOutStrategy: true
action: issue
```

```yaml
optConfig:
optOutStrategy: true
action: issue
```

Allstar is now configured on your organization. See [Policies](README.md#policies) for more details on all the additional configuration
options available for each policy.
options available for each policy.

## Repository Installation Directions
## Repository Installation Directions

If you don't wish to create an org-level `.allstar` repository, Allstar can still be
used. All the defaults at the org-level config will be assumed. One of those is
the `disableRepoOverride` setting, which will be `false`. This allows individual
repositories to opt-in when the org-level setting is at the default opt-in strategy.
repositories to opt-in when the org-level setting is at the default opt-in strategy.

To enable Allstar on a single repository:

1. In the repository, create a directory named `.allstar/`.
2. Create a file named `allstar.yaml` with the contents:
```
optConfig:
optIn: true
```


```yaml
optConfig:
optIn: true
```

3. To enable your policies, create four files with the names:

- `branch_protection.yaml`
- `binary_artifacts.yaml`
- `binary_artifacts.yaml`
- `outside.yaml`
- `security.yaml`
- `security.yaml`

In each of these four files, add the following contents:
```
optConfig:
optIn: true
action: [choose action]
```

```yaml
optConfig:
optIn: true
action: [choose action]
```

You will need to choose the action you would like Allstar to take when a policy is violated: `log`, `issue`, or `fix`. See [Actions](README.md#actions) for more information about each policy. If you are unsure, we suggest using `issue` as a sensible default that can be changed later. For example:
```
optConfig:
optIn: true
action: issue
```

```yaml
optConfig:
optIn: true
action: issue
```

Allstar is now configured on your repository. See [Policies](README.md#policies) for more details on all the additional configuration
options available for each policy.
options available for each policy.
4 changes: 2 additions & 2 deletions operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ Allstar supports various operator configuration options which can be set via env
In case you want to operate Allstar with a self-hosted GitHub Enterprise instance, you need to set the `ALLSTAR_GHE_URL` environment variable to the URL of your GitHub Enterprise instance URL.
The different API endpoints for API and upload are appended automatically.

Example:
Example:

Given, your GHE instance URL is "https://my-ghe.example.com", you need to set the following environment variables:

```shell
export ALLSTAR_GHE_URL="https://my-ghe.example.com"
export GH_HOST="my-ghe.example.com" # This is used by the Scorecard dependency. Might result in errors if not set.
export GH_HOST="my-ghe.example.com" # This is used by the Scorecard dependency. Might result in errors if not set.
```
Loading