Skip to content

Commit 4e4541e

Browse files
Antigravityclaude
andcommitted
docs: Update README for v1.1.0 features
Rewrite README to cover all v1.1.x features: setup wizard, Docker local runner, multi-CI platform support, severity thresholds, waiver CLI, HTML reporting, and updated repository structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fa63d8c commit 4e4541e

File tree

1 file changed

+187
-79
lines changed

1 file changed

+187
-79
lines changed

README.md

Lines changed: 187 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# FortressCI: The DevSecOps Platform
22

3-
FortressCI is a secure-by-default DevSecOps platform blueprint designed to implement "Shift Left" security, automated pipelines, and infrastructure protection. It integrates best-in-class open source security tools to ensure your code and infrastructure are secure from day one.
3+
FortressCI is a secure-by-default DevSecOps platform blueprint designed to implement "Shift Left" security, automated pipelines, and infrastructure protection. It integrates best-in-class open-source security tools to ensure your code and infrastructure are secure from day one.
44

55
> **[View our Roadmap](ROADMAP.md)** for upcoming features and long-term vision.
66
7-
## 🚀 Features
7+
## Features
88

99
### Phase 1: Shift Left (Local Development)
1010

@@ -16,126 +16,234 @@ Catch issues before they are committed.
1616

1717
### Phase 2: Automated Pipeline (CI/CD)
1818

19-
Automated checks on every push and pull request via GitHub Actions.
19+
Automated checks on every push and pull request across **6 CI platforms**.
2020

2121
- **Secret Scanning**: TruffleHog deep scan on git history.
22-
- **SAST (Static Application Security Testing)**: [Semgrep](https://semgrep.dev/) scans source code for vulnerabilities (OWASP Top 10).
23-
- **SCA (Software Composition Analysis)**: [Snyk](https://snyk.io/) checks dependencies for known CVEs.
22+
- **SAST**: [Semgrep](https://semgrep.dev/) scans source code for vulnerabilities (OWASP Top 10).
23+
- **SCA**: [Snyk](https://snyk.io/) checks dependencies for known CVEs.
24+
- **IaC Scanning**: Checkov scans Terraform, CloudFormation, and Kubernetes manifests.
25+
- **Container Security**: [Trivy](https://github.com/aquasecurity/trivy) scans Docker images for OS and library vulnerabilities.
26+
- **DAST**: [OWASP ZAP](https://www.zaproxy.org/) baseline scan for runtime attack surface.
27+
- **Signing**: [Cosign](https://github.com/sigstore/cosign) signs container images with SBOM generation.
2428

2529
### Phase 3: Infrastructure Security
2630

27-
Secure your infrastructure and containers.
28-
29-
- **IaC Scanning**: Checkov scans Terraform, CloudFormation, and Kubernetes manifests.
30-
- **Container Security**: [Trivy](https://github.com/aquasecurity/trivy) scans Docker images for OS and library vulnerabilities.
31+
- Container registry signing and attestation
32+
- SBOM generation via Trivy
33+
- Compliance audit artifacts
3134

3235
---
3336

34-
## 🛠️ Getting Started
37+
## Quick Start
38+
39+
### Option 1: Setup Wizard (Recommended)
3540

36-
### Prerequisites
41+
```bash
42+
git clone https://github.com/mackeh/FortressCI.git
43+
cd FortressCI
3744

38-
- [pre-commit](https://pre-commit.com/#install) installed.
39-
- [trufflehog](https://github.com/trufflesecurity/trufflehog) installed locally.
40-
- GitHub Repository with Actions enabled.
45+
# Run the interactive wizard — detects your project type and CI platform
46+
./scripts/fortressci-init.sh
4147

42-
### Local Setup (Shift Left)
48+
# Or skip prompts by specifying the CI platform
49+
./scripts/fortressci-init.sh --ci github-actions
50+
```
4351

44-
1. **Clone the repository:**
52+
The wizard generates:
53+
- CI/CD workflow file for your platform
54+
- `.pre-commit-config.yaml` (local hooks)
55+
- `.security/waivers.yml` (finding exceptions)
56+
- `.fortressci.yml` (severity thresholds and scanner config)
4557

46-
```bash
47-
git clone https://github.com/your-org/FortressCI.git
48-
cd FortressCI
49-
```
58+
Then install the hooks:
5059

51-
2. **Install Git Hooks:**
60+
```bash
61+
pre-commit install
62+
```
5263

53-
```bash
54-
pre-commit install
55-
```
64+
### Option 2: Docker Local Scan
5665

57-
3. **Test Locally:**
58-
Try committing a dummy secret (e.g., `AWS_ACCESS_KEY_ID=AKIA...`) and watch TruffleHog block it.
66+
Run all security scans locally in a single container:
5967

60-
### CI/CD Setup
68+
```bash
69+
# Build the all-in-one scanner image
70+
docker build -t fortressci/scan .
6171

62-
1. **Secrets Configuration:**
63-
Go to your GitHub Repository > Settings > Secrets and variables > Actions.
64-
Add the following secrets:
65-
- `SNYK_TOKEN`: Your Snyk API token (get it from [snyk.io](https://app.snyk.io/account)).
72+
# Scan your project (results output to ./results/)
73+
docker run --rm \
74+
-v $(pwd):/workspace \
75+
-v $(pwd)/results:/results \
76+
fortressci/scan /workspace
77+
```
6678

67-
2. **Run the Pipeline:**
68-
Push code to the `main` branch or open a Pull Request. The `DevSecOps Pipeline` workflow will automatically run.
79+
This runs TruffleHog, Semgrep, Snyk, Checkov, and Trivy in sequence, then generates an interactive HTML report and checks severity thresholds.
6980

7081
---
7182

72-
## 📂 Repository Structure
83+
## Supported CI Platforms
7384

85+
| Platform | Template | Generated File |
86+
|----------|----------|----------------|
87+
| **GitHub Actions** | `templates/github-actions/devsecops.yml` | `.github/workflows/devsecops.yml` |
88+
| **GitLab CI** | `templates/gitlab-ci/devsecops.yml` | `.gitlab-ci.yml` |
89+
| **Bitbucket Pipelines** | `templates/bitbucket/bitbucket-pipelines.yml` | `bitbucket-pipelines.yml` |
90+
| **Azure Pipelines** | `templates/azure/azure-pipelines.yml` | `azure-pipelines.yml` |
91+
| **Jenkins** | `templates/jenkins/Jenkinsfile` | `Jenkinsfile` |
92+
| **CircleCI** | `templates/circleci/config.yml` | `.circleci/config.yml` |
93+
94+
All templates implement the same 5 scan stages with platform-specific syntax.
95+
96+
---
97+
98+
## Severity Thresholds
99+
100+
Configure when your pipeline should fail or warn in `.fortressci.yml`:
101+
102+
```yaml
103+
thresholds:
104+
fail_on: critical # critical | high | medium | low | none
105+
warn_on: high
74106
```
75-
.
76-
├── .github/workflows/
77-
│ └── devsecops.yml # Main CI/CD Pipeline definition
78-
├── terraform/
79-
│ └── main.tf # Sample Terraform file (for testing Checkov)
80-
├── Dockerfile # Sample Dockerfile (for testing Trivy)
81-
├── .pre-commit-config.yaml # Local hook configuration
82-
└── README.md # This documentation
107+
108+
Run the gating check manually:
109+
110+
```bash
111+
./scripts/check-thresholds.sh <results_dir> [.fortressci.yml]
83112
```
84113

85-
## 🛡️ Tools & Configuration
114+
---
86115

87-
| Tool | Type | Configuration Context |
88-
| :------------- | :--------- | :------------------------------------------ |
89-
| **TruffleHog** | Secrets | `.pre-commit-config.yaml` / `devsecops.yml` |
90-
| **Semgrep** | SAST | `devsecops.yml` (auto-config) |
91-
| **Snyk** | SCA | `devsecops.yml` (Node/Python/etc.) |
92-
| **Checkov** | IaC | `.pre-commit-config.yaml` / `devsecops.yml` |
93-
| **Trivy** | Containers | `devsecops.yml` |
116+
## Waiver Management
94117

95-
## ⚙️ Operational Reality
118+
Manage security finding exceptions with the waiver CLI:
96119

97-
To maximize the effectiveness of this platform, we recommend the following operational configurations:
120+
```bash
121+
# Add a waiver
122+
./scripts/fortressci-waiver.sh add \
123+
--id "CVE-2024-1234" \
124+
--scanner snyk \
125+
--severity high \
126+
--reason "Dev-dependency only, not used in production" \
127+
--expires 2026-06-01 \
128+
--author "@your-name"
98129

99-
### 1. Branch Protection
130+
# List active waivers
131+
./scripts/fortressci-waiver.sh list
100132

101-
Enable [Branch Protection Rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) on `main`:
133+
# List including expired
134+
./scripts/fortressci-waiver.sh list --expired
135+
136+
# Remove expired waivers
137+
./scripts/fortressci-waiver.sh expire
138+
139+
# Remove a specific waiver
140+
./scripts/fortressci-waiver.sh remove --id "CVE-2024-1234"
141+
```
102142

103-
- **Require status checks to pass before merging**: Select `Secret Scan`, `SAST`, `SCA`, `IaC Scan`, and `Container Scan`.
104-
- **Require pull request reviews before merging**.
105-
- **Do not allow bypassing the above settings**.
143+
Waivers are stored in `.security/waivers.yml` with required fields: `id`, `scanner`, `severity`, `justification`, `expires_on`, `approved_by`.
106144

107-
### 2. Scheduled Scans
145+
---
146+
147+
## HTML Reporting
148+
149+
After scans complete, an interactive HTML report is generated with:
108150

109-
The pipeline is configured to run a **Baseline Secret Scan** weekly (Sundays at 00:00 UTC). This catches any new vulnerabilities types or historical secrets that might have been added to the scanner rulesets.
151+
- Severity breakdown cards (critical, high, medium, low)
152+
- Findings by tool (doughnut chart)
153+
- Severity distribution (bar chart)
154+
- Filterable, searchable findings table
155+
156+
Generate manually:
157+
158+
```bash
159+
python3 scripts/generate-report.py <results_dir>
160+
```
110161

111-
### 3. Incident Triage
162+
---
112163

113-
- **Findings**: All findings are output as SARIF and will appear in the **GitHub Security > Code Scanning** tab (if GitHub Advanced Security is enabled) or as downloadable Artifacts.
114-
- **Waivers**: If a finding is a false positive, verify it locally, then add an entry to [.security/waivers.yml](.security/waivers.yml) with a justification and expiry date, and submit it for review.
164+
## CI/CD Secrets
115165

116-
## 🔐 V3: Trust & Runtime Security
166+
Add these to your CI platform's secret store:
117167

118-
### 1. Supply Chain Trust (Cosign)
168+
| Secret | Required | Purpose |
169+
|--------|----------|---------|
170+
| `SNYK_TOKEN` | For SCA scans | [Get token](https://app.snyk.io/account) |
171+
| `COSIGN_KEY` | For image signing | Generate with `./scripts/generate_keys.sh` |
172+
| `COSIGN_PASSWORD` | For image signing | Passphrase for Cosign key |
173+
| `INFRACOST_API_KEY` | For cost estimation | [Get token](https://www.infracost.io/) |
119174

120-
We use [Cosign](https://github.com/sigstore/cosign) to sign container images, proving they were built by this trusted pipeline.
175+
---
121176

122-
**Setup:**
177+
## Tools & Configuration
123178

124-
1. Run the helper script locally to generate keys:
125-
```bash
126-
./scripts/generate_keys.sh
127-
```
128-
2. Add the output of `cosign.key` to GitHub Secrets as `COSIGN_PRIVATE_KEY`.
129-
3. (Optional) Add `COSIGN_PASSWORD` if you used a passphrase.
179+
| Tool | Type | Configuration |
180+
|------|------|---------------|
181+
| **TruffleHog** | Secrets | `.pre-commit-config.yaml` / CI workflow |
182+
| **Semgrep** | SAST | CI workflow (auto-config, OWASP Top 10) |
183+
| **Snyk** | SCA | CI workflow (Node/Python/Go/Java) |
184+
| **Checkov** | IaC | `.pre-commit-config.yaml` / CI workflow |
185+
| **Trivy** | Containers | CI workflow |
186+
| **OWASP ZAP** | DAST | CI workflow (baseline scan) |
187+
| **Cosign** | Signing | CI workflow (image signing + SBOM) |
130188

131-
### 2. Dynamic Analysis (OWASP ZAP)
189+
---
132190

133-
A DAST scan attempts to attack the running application in the CI environment.
191+
## Repository Structure
134192

135-
- **Job**: `dast-scan`
136-
- **Tools**: OWASP ZAP Baseline Scan.
137-
- **Artifacts**: HTML Report attached to the workflow run.
193+
```
194+
.
195+
├── .github/
196+
│ ├── workflows/devsecops.yml # Primary GitHub Actions pipeline
197+
│ └── scripts/post_summary.js # PR comment posting script
198+
├── .security/
199+
│ └── waivers.yml # Security finding exceptions
200+
├── scripts/
201+
│ ├── fortressci-init.sh # Setup wizard CLI
202+
│ ├── run-all.sh # Docker scan orchestrator
203+
│ ├── generate-report.py # HTML report generator
204+
│ ├── summarize.py # Summary JSON generator
205+
│ ├── check-thresholds.sh # Severity threshold gating
206+
│ ├── fortressci-waiver.sh # Waiver management CLI
207+
│ └── generate_keys.sh # Cosign key generation
208+
├── templates/ # CI/CD configs for all 6 platforms
209+
│ ├── github-actions/
210+
│ ├── gitlab-ci/
211+
│ ├── bitbucket/
212+
│ ├── azure/
213+
│ ├── jenkins/
214+
│ ├── circleci/
215+
│ ├── report.html.j2 # Jinja2 HTML report template
216+
│ ├── fortressci.yml # Default threshold config
217+
│ ├── pre-commit-config.yaml
218+
│ └── waivers.yml
219+
├── terraform/main.tf # Sample (intentionally vulnerable) IaC
220+
├── .fortressci.yml # Threshold & scanner configuration
221+
├── .pre-commit-config.yaml # Local Git hooks
222+
├── Dockerfile # All-in-one scanner image
223+
└── Dockerfile.example # Sample vulnerable Dockerfile
224+
```
225+
226+
## Operational Recommendations
227+
228+
### Branch Protection
229+
230+
Enable [Branch Protection Rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) on `main`:
231+
232+
- Require status checks to pass before merging (select all scan jobs).
233+
- Require pull request reviews before merging.
234+
- Do not allow bypassing the above settings.
235+
236+
### Scheduled Scans
237+
238+
The GitHub Actions pipeline runs a baseline secret scan weekly (Sundays at 00:00 UTC) to catch newly-identified vulnerability patterns.
239+
240+
### Incident Triage
241+
242+
- **Findings**: All SARIF results appear in GitHub's **Security > Code Scanning** tab (if Advanced Security is enabled) or as downloadable artifacts.
243+
- **Waivers**: For false positives, use the waiver CLI to document the exception with a justification and expiry date.
244+
245+
---
138246

139-
## 🤝 Contributing
247+
## Contributing
140248

141-
This is a blueprint repository. Fork it and adapt the `devsecops.yml` to fit your specific build requirements (e.g., usually you would build your application before running the container scan).
249+
This is a blueprint repository. Fork it and adapt to your needs. Changes to scan logic should be reflected across all 6 CI platform templates.

0 commit comments

Comments
 (0)