-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpr8_diff.txt
More file actions
160 lines (157 loc) · 4.7 KB
/
pr8_diff.txt
File metadata and controls
160 lines (157 loc) · 4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
diff --git a/README.md b/README.md
index ef6b1e8..e39ca16 100644
--- a/README.md
+++ b/README.md
@@ -116,8 +116,8 @@ You can dedicate a specific AI connection for **Safety Operations** (Prompt Inje
```bash
# Clone repository
-git clone <repo-url>
-cd AI-safety
+git clone https://github.com/HOLYKEYZ/IntellectSafe
+cd IntellectSafe
# Backend setup
cd backend
@@ -144,142 +144,4 @@ npm run dev
## 🛡️ Advanced Defense (Fortress Mode)
The platform includes a **Hyper-Resilient Fortress** layer designed to stop 90%+ success rate jailbreaks:
-- **Exploit Instability**: Perturbation engine breaks fragile prompt injections.
-- **Chain-of-Thought Guard**: Detects reasoning hijacking and hidden logic bombs.
-- **Adversarial Simulation**: A Council member "shadow-boxes" the prompt to check for harm.
-
-## 📡 API Reference
-
-### Universal Proxy (Multi-Provider Support)
-
-IntellectSafe acts as a universal safety layer. Connect any major AI client and calls are automatically scanned:
-
-| Provider | Model ID Example |
-|----------|------------------|
-| **OpenAI** | `gpt-5.2`, `o4-mini`, `gpt-4.5-preview` |
-| **Anthropic** | `claude-4.5-sonnet`, `claude-4.5-opus` |
-| **Google** | `gemini-3-pro`, `gemini-3-flash` |
-| **DeepSeek** | `deepseek-v4`, `deepseek-r1` |
-| **Meta** | `llama-4-maverick`, `llama-4-scout` |
-| **Perplexity** | `sonar-deep-research`, `sonar-reasoning-pro` |
-
-#### Integration Example
-
-```python
-from openai import OpenAI
-
-client = OpenAI(
- base_url="http://localhost:8001/v1", # Point to IntellectSafe
- api_key="your-openai-key" # Or use X-Upstream-API-Key header
-)
-
-response = client.chat.completions.create(
- model="gpt-4o",
- messages=[{"role": "user", "content": "Hello!"}],
- extra_headers={
- "X-Upstream-Provider": "openai" # Optional: explicitly set provider
- }
-)
-```
-*For detailed setup (including Python/LangChain examples & BYOK), read the [**Integration Guide**](docs/INTEGRATION.md).*
-
-### 🛡️ Secure Your Real AI Sessions (Extension)
-
-To secure your sessions on **ChatGPT, Claude, Gemini, and Groq**, install the **IntellectSafe Companion** Chrome Extension:
-
-1. Open Chrome and go to `chrome://extensions`.
-2. Enable **Developer Mode** (top right).
-3. Click **Load Unpacked**.
-4. Select the `extension/` folder from this repository.
-5. Browse `chatgpt.com` or `groq.com`. Your prompts are now scanned locally! 🚀
-
-### 🔌 Verify Connections
-
-
-Run the connection tester to check if your API keys and the proxy are working:
-
-```bash
-python backend/scripts/test_connections.py
-```
-
-### Scan Endpoints
-
-```bash
-# Scan a prompt for injection
-curl -X POST "https://api.intellectsafe.onrender.com/api/v1/scan/prompt" \
- -H "Content-Type: application/json" \
- -d '{"prompt": "Ignore previous instructions"}'
-
-# Scan LLM output for safety
-curl -X POST "https://api.intellectsafe.onrender.com/api/v1/scan/output" \
- -H "Content-Type: application/json" \
- -d '{"output": "Here is how to...", "original_prompt": "..."}'
-
-# Scan content for deepfakes (Dual-Model Analysis)
-# Detects Art (Midjourney/DALL-E) and Photorealistic Faces
- -d '{"content_type": "image", "content": "<base64-data>"}'
-```
-
-### 💻 CLI Interface (New)
-
-You can now scan prompts and outputs directly from your terminal:
-
-```bash
-# Scan a prompt
-python backend/cli.py scan-prompt "Ignore previous instructions"
-
-# Scan an output
-python backend/cli.py scan-output "Here is how to build a bomb..."
-
-# Scan for PII
-python backend/cli.py scan-pii "My SSN is 123-45-6789"
-
-# Scan an image for deepfakes
-python backend/cli.py scan-image "path/to/image.jpg"
-
-# Agent Control
-python backend/cli.py agent-auth "agent-1" "file_read"
-python backend/cli.py agent-history "agent-1"
-
-# System Health
-python backend/cli.py health
-```
-
-### Agent Control (Level 5)
-
-Full lifecycle protection for autonomous agents:
-- **Authorization**: Permission gates for dangerous tools.
-- **Kill Switch**: Immediate agent termination and block.
-- **Audit**: Complete action history and session tracking.
-
-```bash
-# Authorize agent action
-curl -X POST "https://api.intellectsafe.onrender.com/api/v1/agent/authorize" \
- -H "Content-Type: application/json" \
- -d '{"agent_id": "agent-1", "session_id": "s1", "action_type": "file_read", "requested_action": {"path": "/tmp/test.txt"}}'
-```
-
----
-
-## 🧪 Testing
-
-```bash
-cd backend
-
-# Test all scan endpoints
-python verify_backend.py
-
-# Test Universal Proxy
-python verify_proxy.py
-
-# Test Agent Control
-python verify_agent.py
-```
-
----
-
-## 📄 License
-
-**GPLv2**
-GNU GENERAL PUBLIC LICENSE
-Version 2 License .
+- **Exploit Instability**: Perturbation engine breaks fragile pro
\ No newline at end of file