security: implement prompt injection defense and credential encryption#816
Open
notsointresting wants to merge 2 commits intosipeed:mainfrom
Open
security: implement prompt injection defense and credential encryption#816notsointresting wants to merge 2 commits intosipeed:mainfrom
notsointresting wants to merge 2 commits intosipeed:mainfrom
Conversation
- Add SecurityConfig struct with SSRF, Audit Logging, Rate Limiting, Credential Encryption, and Prompt Injection configs - Add environment variable support for all security settings - Add default security settings in defaults.go - Foundation for comprehensive security framework
Prompt Injection Defense (pkg/injection/defender.go): - Detection of 40+ injection patterns - Role manipulation detection - Delimiter injection detection - Special token detection - Input sanitization with XML escaping - Structured boundary wrapping for user content Credential Encryption (pkg/auth/encryption.go, keychain.go, secure_store.go): - ChaCha20-Poly1305 (default) and AES-256-GCM encryption algorithms - OS keychain integration (Windows Credential Manager, macOS Keychain, Linux Secret Service) - Automatic fallback to encrypted file storage - Backward compatible with existing plain-text credentials - Migration support from plain-text to secure storage - Added zalando/go-keyring dependency
10 tasks
3 tasks
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 Description
This PR implements prompt injection defense and credential encryption with OS keychain integration.
Prompt Injection Defense (
pkg/injection/defender.go):Credential Encryption (
pkg/auth/encryption.go,keychain.go,secure_store.go):zalando/go-keyringdependency🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
Part of #782
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view Test Results
☑️ Checklist
Summary Table
security-configsecurity-ssrf-redactionsecurity-audit-ratelimitsecurity-injection-credentials