Skip to content

Commit

Permalink
Merge pull request #4 from OpenPathfinder/docs/website
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon authored Dec 22, 2024
2 parents 421e35a + 50bf37b commit 14092cb
Showing 1 changed file with 25 additions and 124 deletions.
149 changes: 25 additions & 124 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,131 +6,32 @@ Fortify your Digital Sphere, once command at a time

---


## Table of Contents

- [Introduction](#introduction)
- [Demo](#demo)
- [Installation](#installation)
- [npm](#npm)
- [Docker Container](#docker-container)
- [Source Code](#source-code)
- [Usage](#usage)
- [Version Command](#version-command)
- [Policy Management Command](#policy-management-command)
- [GitHub Tokens](#github-tokens)
- [Policies](#policies)
- [Contributing](#contributing)
- [License](#license)

## Introduction

fortSphere is a CLI tool designed to help you manage and fortify your digital sphere by applying various policies to your GitHub organization(s) and repositories.

## Demo

### Scenario: While the Setup is fine using `restrictRepoCreationGitHub`

**GitHub UI (before)**
![Screenshot from 2024-12-19 02-54-57](https://github.com/user-attachments/assets/c85cad6b-7fc9-4060-a723-8f48be10861a)

**fortSphere run and logs**
![Screenshot from 2024-12-19 02-39-04](https://github.com/user-attachments/assets/fe483669-0228-46b4-8517-091f5f49b558)
**fortSphere** is a community-driven, open-source CLI tool crafted with love by maintainers for maintainers. It empowers you to secure and streamline your GitHub organizations and repositories, ensuring you’re always in control. Built with a secure-by-default philosophy, fortSphere guarantees that:
- **Your Tokens and Data Stay Local:** All operations are performed locally—your sensitive information never leaves your machine.
- **No Blind Trust Required:** As an open-source project, you don’t need to trust others—just the transparent and collaborative efforts of its contributors.

---

### Scenario: When the setup requires changes using `restrictRepoCreationGitHub`

**GitHub UI (before)**
![Screenshot from 2024-12-19 02-55-14](https://github.com/user-attachments/assets/8c92af79-ca25-473c-ad32-45e08157e6a6)

**fortSphere run and logs**
![Screenshot from 2024-12-19 02-41-00](https://github.com/user-attachments/assets/59470423-2fad-4963-bf49-8d86118501ed)

---

## Installation

### npm

You can install it globally:

```bash
npm i -g fortsphere
fortsphere version
```

You can use it as `npx`:

```bash
npx fortsphere version
```

### Docker container

You can use Docker:

```bash
docker pull ghcr.io/openpathfinder/fortsphere:latest
docker run --rm ghcr.io/openpathfinder/fortsphere:latest version
```

You can create an alias like `alias fortsphere="docker run --rm ghcr.io/openpathfinder/fortsphere:latest"`

### Source Code
To install fortSphere, clone the repository and install the dependencies:

```sh
git clone https://github.com/OpenPathfinder/fortSphere.git
cd fortsphere
npm install
```

You can create an alias like `alias fortsphere="node fortsphere.js"`

## Usage


### Version Command

Display the current version of fortSphere:

```bash
fortsphere version
```

### Policy Management Command

Manage policies for your GitHub organization:

- List all available policies:
```bash
fortsphere policy --list
```
- Apply a policy to a GitHub organization:
```bash
fortsphere policy --apply <policy> --github-org <githubOrg>
```

### GitHub Tokens

To run this application, you need a GitHub token with `admin:write` permissions.

#### Injecting the Token

- Use an environment variable named `GITHUB_TOKEN` to supply the token.
- Alternatively, you can use a `.env` file and load it with the command `node --env-file=.env fortsphere.js policy --apply <policy> --github-org <githubOrg>` when doing local development
- While using docker images you can use `docker run --rm -e GITHUB_TOKEN=mytoken ghcr.io/openpathfinder/fortsphere:latest policy --apply <policy> --github-org <githubOrg>`

## Policies

fortSphere includes the following policies:

- **restrictRepoCreationGitHub**: This policy is designed to prevent members of a GitHub organization from creating new repositories. This includes public and private repositories. This policy will set the following values for the organization(`members_allowed_repository_creation_type=none`, `members_can_create_public_repositories=false`, `members_can_create_private_repositories=false`) at the organization level.

## Contributing

Contributions are welcome! Please read the contributing guidelines first.
## Key Features:

- **Centralized Policy Management:** Apply security and operational policies across all your GitHub organizations with one command.
- **Real-Time Checks and Updates:** Detect non-compliant configurations and resolve them automatically.
- **Customizable Policies:** Choose from a suite of predefined policies or create your own.

## Documentation

- [About](https://openpathfinder.com/docs/fortSphere)
- [Key Features](https://openpathfinder.com/docs/fortSphere#key-features)
- [Demo Walkthrough](https://openpathfinder.com/docs/fortSphere#demo-walkthrough)
- [Why fortSphere?](https://openpathfinder.com/docs/fortSphere#why-fortsphere)
- [Installation](https://openpathfinder.com/docs/fortSphere/installation)
- [npm](https://openpathfinder.com/docs/fortSphere/installation#npm)
- [Docker Container](https://openpathfinder.com/docs/fortSphere/installation#docker-container)
- [Source Code](https://openpathfinder.com/docs/fortSphere/installation#source-code)
- [Usage](https://openpathfinder.com/docs/fortSphere/usage)
- [Version Command](https://openpathfinder.com/docs/fortSphere/usage#version-command)
- [Policy Management Command](https://openpathfinder.com/docs/fortSphere/usage#policy-management-command)
- [GitHub Tokens](https://openpathfinder.com/docs/fortSphere/usage#github-tokens)
- [Policies](https://openpathfinder.com/docs/fortSphere/policies)
- Contributing (_Soon_)

## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

0 comments on commit 14092cb

Please # to comment.