Skip to content

Commit d8ee0aa

Browse files
authored
Add early draft docs (#2)
1 parent 248c775 commit d8ee0aa

19 files changed

+381
-467
lines changed

images/codegate-diagram.png

53.7 KB
Loading

public/docs/config.json

+31-14
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,62 @@
11
{
22
"sidebar": [
33
{
4-
"title": "Getting Started",
54
"items": [
65
{
76
"title": "Introduction",
8-
"path": "getting-started.md"
7+
"path": "introduction.md"
8+
}
9+
]
10+
},
11+
{
12+
"title": "Getting Started",
13+
"items": [
14+
{
15+
"title": "Quick Start with VS Code",
16+
"path": "tutorials/quick-start-vscode.md"
17+
}
18+
]
19+
},
20+
{
21+
"title": "Using CodeGate",
22+
"items": [
23+
{
24+
"title": "Install and run CodeGate",
25+
"path": "how-to/install.md"
926
},
1027
{
11-
"title": "Quick Start",
12-
"path": "quick-start.md"
28+
"title": "IDE plugin config: Continue",
29+
"path": "how-to/configure-continue.md"
1330
}
1431
]
1532
},
1633
{
1734
"title": "Features",
1835
"items": [
1936
{
20-
"title": "Secret Filtering",
21-
"path": "features/secret-filtering.md"
37+
"title": "Code security reviews",
38+
"path": "features/security-review.md"
2239
},
2340
{
24-
"title": "Package Security",
41+
"title": "Package security",
2542
"path": "features/package-security.md"
2643
},
2744
{
28-
"title": "IDE Integration",
29-
"path": "features/ide-integration.md"
45+
"title": "Secrets filtering",
46+
"path": "features/secrets-filtering.md"
3047
}
3148
]
3249
},
3350
{
34-
"title": "Configuration",
51+
"title": "Reference",
3552
"items": [
3653
{
37-
"title": "Basic Configuration",
38-
"path": "configuration/basic.md"
54+
"title": "Basic configuration",
55+
"path": "reference/basic-config.md"
3956
},
4057
{
41-
"title": "Advanced Options",
42-
"path": "configuration/advanced.md"
58+
"title": "Advanced options",
59+
"path": "reference/advanced-options.md"
4360
}
4461
]
4562
}

public/docs/configuration/basic.md

-73
This file was deleted.
+23-81
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,34 @@
1-
# Package Security
1+
# Package security
22

3-
CodeGate's package security system helps protect your codebase from malicious or vulnerable dependencies.
3+
## What's the risk?
44

5-
## Features
5+
The large language models (LLMs) that drive AI coding assistants are trained at
6+
a point in time – often months before you use them. But the open source software
7+
ecosystem moves quickly, and so do malicious actors seeking to exploit the
8+
software supply chain. LLMs often suggest outdated, vulnerable, or nonexistent
9+
packages, exposing you and your users to security and privacy risks.
610

7-
- Automatic package scanning
8-
- Vulnerability detection
9-
- License compliance checking
10-
- Supply chain attack prevention
11-
- Version pinning recommendations
11+
## How CodeGate helps
1212

13-
## How It Works
13+
CodeGate's package security system helps protect your codebase from malicious or
14+
vulnerable dependencies. It identifies potentially risky packages and suggests
15+
fixed versions or alternative packages to consider.
1416

15-
The package security system scans:
17+
These insights are powered by [Trusty](https://www.trustypkg.dev), the open
18+
source dependency intelligence service from Stacklok.
1619

17-
- Direct dependencies
18-
- Transitive dependencies
19-
- Development dependencies
20-
- Package lockfiles
21-
- Installation scripts
20+
## How it works
2221

23-
## Configuration
22+
CodeGate scans direct, transitive, and development dependencies from package
23+
definition files and installation scripts in your project.
2424

25-
Enable and configure package security in your `codegate.yaml`:
25+
To invoke this scan, include your dependencies file (`package-lock.json`,
26+
`requirements.txt`, `go.mod`, etc.) as context, or mention a package in your
27+
prompt, and request a dependency security scan using a prompt similar to this:
2628

27-
```yaml
28-
security:
29-
package_scanning:
30-
enabled: true
31-
scan_depth: full # or 'direct' for only direct dependencies
32-
block_high_severity: true
33-
licenses:
34-
allowed: ["MIT", "Apache-2.0", "BSD-3-Clause"]
35-
blocked: ["GPL-3.0"]
29+
```plain
30+
codegate, please scan my dependencies for security risks
3631
```
3732

38-
## Vulnerability Detection
39-
40-
CodeGate checks for:
41-
42-
- Known vulnerabilities (CVEs)
43-
- Malicious code patterns
44-
- Suspicious installation scripts
45-
- Outdated dependencies
46-
- Supply chain risks
47-
48-
## Best Practices
49-
50-
1. Enable automatic scanning
51-
2. Configure severity thresholds
52-
3. Maintain an allowed license list
53-
4. Regular dependency updates
54-
5. Monitor security advisories
55-
56-
## Example Usage
57-
58-
### Package Installation
59-
60-
```bash
61-
# CodeGate will scan before installation
62-
npm install express
63-
64-
# Override for testing
65-
npm install express --no-codegate
66-
```
67-
68-
### CI/CD Integration
69-
70-
```yaml
71-
# GitHub Actions example
72-
steps:
73-
- uses: actions/checkout@v2
74-
- name: Setup CodeGate
75-
uses: codegate/setup-action@v1
76-
- name: Install dependencies
77-
run: npm install
78-
```
79-
80-
## Security Recommendations
81-
82-
1. Use lockfiles
83-
2. Pin dependency versions
84-
3. Regular security audits
85-
4. Monitor dependency updates
86-
5. Review installation scripts
87-
88-
## Related Topics
89-
90-
- [Secret Filtering](/docs/features/secret-filtering)
91-
- [Basic Configuration](/docs/configuration/basic)
92-
- [Advanced Options](/docs/configuration/advanced)
33+
CodeGate responds with analysis, insights, and recommendations about your
34+
package dependencies.

public/docs/features/secret-filtering.md

-86
This file was deleted.
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Secrets filtering
2+
3+
## What's the risk?
4+
5+
As you interact with an AI coding assistant, sensitive data like passwords and
6+
access tokens can be unintentionally exposed to third-party providers via the
7+
code snippets and files you share as context. These secrets may become part of
8+
the training data used to improve the AI model and potentially be exposed to
9+
other users.
10+
11+
## How CodeGate helps
12+
13+
CodeGate's secrets filtering system protects your sensitive information from
14+
being accidentally exposed to AI models and third-party AI provider systems.
15+
16+
## How it works
17+
18+
The secret filtering system automatically scans all prompts for secrets such as:
19+
20+
- API keys and tokens
21+
- Private keys and certificates
22+
- Database credentials
23+
- SSH keys
24+
- Cloud provider credentials
25+
26+
This scan happens transparently without requiring a specific prompt.
27+
28+
When CodeGate detects a secret in a prompt or the related context, it encrypts
29+
the sensitive value before sending the request to the LLM. This way, CodeGate
30+
protects your sensitive data without blocking your development flow. And because
31+
CodeGate runs locally, your secrets never leave your system unprotected.

0 commit comments

Comments
 (0)