You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're executing unreviewed code with your user privileges. scurl downloads the script, sends it to an AI for security analysis, shows you the findings, and lets you decide whether to execute.
11
+
You're executing unreviewed code with your user privileges. scurl downloads the script, runs static analysis for dangerous patterns and prompt injection, sends it to an AI for security analysis, shows you the findings, and lets you decide whether to execute.
Choose your AI provider, enter credentials (or skip for Ollama), done. Config is saved to `~/.scurl/config.toml` with `0600` permissions.
37
+
Choose your AI provider, enter credentials (or skip for Ollama), done. Config is saved to `~/.scurl/config.toml` with `0600` permissions in a `0700` directory.
38
+
39
+
For maximum security, use the `SCURL_API_KEY` environment variable instead of storing the key in the config file.
38
40
39
41
### Providers
40
42
@@ -43,8 +45,12 @@ Choose your AI provider, enter credentials (or skip for Ollama), done. Config is
Azure OpenAI requires an endpoint URL and deployment name during setup. These can also be set via `AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_DEPLOYMENT` environment variables.
53
+
48
54
## Usage
49
55
50
56
```bash
@@ -63,6 +69,8 @@ scurl login # Reconfigure
63
69
⠋ Downloading script...
64
70
✓ Downloaded 1247 bytes
65
71
72
+
✓ Static analysis: No suspicious patterns detected
73
+
66
74
⠋ Analyzing script with xAI (Grok) AI...
67
75
✓ Analysis complete!
68
76
@@ -94,16 +102,18 @@ Execute this script? [y/N]:
94
102
| HIGH | No | Significant security risks |
95
103
| CRITICAL | No | Severe threats, do not execute |
96
104
105
+
Auto-execute is also blocked when static analysis finds critical issues, regardless of the AI risk level.
Environment variables `HTTPS_PROXY` and `HTTP_PROXY` are respected automatically. See [NETWORK.md](NETWORK.md) for full proxy and enterprise configuration.
116
+
Environment variables `HTTPS_PROXY` and `HTTP_PROXY` are respected automatically. Proxy URLs must use `http`, `https`, `socks5`, or `socks5h` schemes. See [NETWORK.md](NETWORK.md) for full proxy and enterprise configuration.
107
117
108
118
### Flags
109
119
@@ -112,54 +122,92 @@ Environment variables `HTTPS_PROXY` and `HTTP_PROXY` are respected automatically
scurl uses separate HTTP clients for script downloads and API calls. The `--insecure` flag only affects script downloads -- API calls to your AI provider always enforce TLS certificate verification.
182
+
183
+
### Atomic Config Writes
184
+
185
+
Configuration files are written atomically using temp-file-then-rename to prevent TOCTOU race conditions. Directory permissions are set to `0700` and file permissions to `0600` before any secrets are written.
186
+
187
+
### Content-Type Validation
188
+
189
+
Downloads are rejected if the content type indicates a non-script file (images, videos, PDFs, executables, archives). Ambiguous types produce a warning.
190
+
191
+
### Retry with Backoff
192
+
193
+
Network retries use exponential backoff with jitter (1s, 2s, 4s... capped at 30s) to avoid thundering herd issues. Client errors (4xx) are not retried.
194
+
195
+
### Limitations
196
+
197
+
AI analysis is helpful but not infallible. Always review the findings, especially for HIGH and CRITICAL risk scripts. The `--yolo` flag bypasses AI review but still runs static analysis and requires confirmation.
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
159
-
160
-
## Safety
208
+
The pre-commit hook detects Anthropic, OpenAI, xAI, and AWS keys in staged files.
161
209
162
-
AI analysis is helpful but not infallible. Always review the findings, especially for HIGH and CRITICAL risk scripts. The `--yolo` flag bypasses all review -- use it only with sources you fully trust.
210
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
0 commit comments