-
Notifications
You must be signed in to change notification settings - Fork 0
Sync OpenSWE Documentation Files #143
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6888f1f
Sync OpenSWE documentation files
196ceb6
cr
bracesproul 521de71
Merge branch 'main' into sync-openswe-docs-20250809-003517
lnhsingh 90430a6
Update src/labs/swe/index.mdx
lnhsingh 1b47430
Merge branch 'main' into sync-openswe-docs-20250809-003517
lnhsingh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: "Secrets" | ||
description: "Environment variables & secrets access in dev environments" | ||
--- | ||
|
||
Open-SWE securely manages your API keys and environment variables with AES-256-GCM encryption. | ||
|
||
## How Your API Keys Are Protected | ||
|
||
Your API keys are encrypted both in transit and at rest: | ||
|
||
1. **Frontend**: Temporarily stored in browser localStorage | ||
2. **Transit**: Encrypted before sending to backend | ||
3. **Backend**: Stored encrypted in database | ||
4. **Runtime**: Decrypted only when needed | ||
|
||
<Accordion title="Technical Encryption Details"> | ||
- **Algorithm**: [AES-256-GCM](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf) (authenticated encryption) | ||
- **Key Derivation**: SHA-256 hash of system `SECRETS_ENCRYPTION_KEY` | ||
- **IV Generation**: Random 12-byte initialization vector per encryption | ||
- **Authentication**: 16-byte authentication tag prevents tampering | ||
</Accordion> | ||
|
||
## Types of Environment Variables | ||
|
||
**System Variables** (for self-hosting): | ||
- Examples: `DAYTONA_API_KEY`, `SECRETS_ENCRYPTION_KEY`, `GITHUB_APP_PRIVATE_KEY` | ||
- Access: Server-side only, never exposed to users or sandboxes | ||
|
||
**User Variables** (your personal keys): | ||
- Examples: `ANTHROPIC_API_KEY`, `MY_DATABASE_URL`, `STRIPE_TEST_KEY` | ||
- Access: Controlled via settings page, encrypted storage | ||
|
||
## Sandbox Access Control | ||
|
||
**By default, your API keys are never exposed to sandbox environments.** They're only used for LLM initialization and system setup. | ||
|
||
To enable keys in development servers (for testing LangGraph agents, Next.js apps, etc.): | ||
|
||
1. Manually toggle "Include in Dev Server" for each key | ||
2. Key becomes available as environment variable in sandbox | ||
3. You control which keys are exposed | ||
|
||
<Note> | ||
Use separate development API keys with limited permissions instead of production keys when enabling sandbox access. | ||
</Note> | ||
|
||
## Security & Isolation | ||
|
||
Each session runs in an isolated Daytona container that: | ||
- Cannot access other user sessions | ||
- Automatically deletes after 15 minutes of inactivity | ||
- Has no persistent storage across sessions | ||
|
||
<Accordion title="Detailed Isolation Features"> | ||
- **Container**: Separate container per user session | ||
- **File System**: No shared file systems between containers | ||
- **Process**: Sandboxed processes cannot access host system | ||
- **Network**: Containers cannot communicate with each other | ||
- **Temporal**: Fresh environment for each session | ||
</Accordion> | ||
|
||
<Warning> | ||
When enabling "Include in Dev Server", the AI agent may inadvertently expose environment variables in generated code or logs. Only enable when necessary. | ||
</Warning> | ||
|
||
## Best Practices | ||
|
||
- Use minimum required permissions for each API key | ||
- Regularly rotate your API keys | ||
- Use separate development keys instead of production keys for sandbox access | ||
- Only enable "Include in Dev Server" when necessary | ||
- Never enable sandbox access for production database credentials | ||
- Review generated code for exposed environment variables before deploying | ||
- Monitor "Last Used" timestamps in settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.