Skip to content

Commit 50aa9f4

Browse files
docs: add AI automation security documentation and safeguards
- Add AI-driven remediation safeguards section to README.md with example config for workspace allowlists, command limits, and policy signing - Document AI automation hardening and supply-chain verification in SECURITY.md - Add Windsurf-specific flags (skip-connectivity-check, cleanup-ide-servers, no-client-config) to create code command - Implement data sharing consent prompts before sending environment context to AI providers - Add action
1 parent 324407f commit 50aa9f4

19 files changed

Lines changed: 1914 additions & 195 deletions

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,32 @@ eos create wazuh # SIEM and threat detection
102102
eos create bionicgpt # Private AI assistant with RAG
103103
eos create ollama # Local LLM runtime
104104

105+
## AI-driven remediation safeguards
106+
107+
- Environment analysis now sanitizes outputs, redacts credential-like tokens, and prompts for operator consent before sharing summaries with Anthropic/OpenAI.
108+
- Action execution is constrained by a local policy that enforces workspace allowlists, command/argument limits, and records every action in `.eos-ai-audit/actions.log`.
109+
- `--auto-fix` requires a signed policy file unless you confirm each action interactively.
110+
111+
Example `~/.config/eos/ai-config.yaml` fragment:
112+
113+
```yaml
114+
action_security:
115+
workspace_allowlist:
116+
- /opt/eos
117+
allowed_commands:
118+
- docker
119+
- systemctl
120+
- terraform
121+
data_sharing:
122+
include_secret_files: false
123+
redact_sensitive: true
124+
require_consent: true
125+
policy_secrets:
126+
- deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
127+
```
128+
129+
Auto-fix policies are JSON documents signed with one of the `policy_secrets`. Point `--auto-fix-policy` at the signed file when using `--auto-fix` to enable unattended remediation.
130+
105131
# Web Services
106132
eos create mattermost # Team collaboration
107133
eos create hecate # Reverse proxy (Caddy-based)

SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,15 @@ Use this section to tell people how to report a vulnerability.
1919
Tell them where to go, how often they can expect to get an update on a
2020
reported vulnerability, what to expect if the vulnerability is accepted or
2121
declined, etc.
22+
23+
## AI automation hardening
24+
25+
- Every AI action is validated against a canonical workspace allowlist, command deny-list, and size/argument limits before execution. All actions (success or failure) are recorded with timestamps in `.eos-ai-audit/actions.log` for post-incident forensics.
26+
- Environment analysis now skips `.env`, `*.pem`, kubeconfig and other high-risk files unless the operator explicitly opts in. Sanitized summaries replace raw contents and the CLI displays a consent banner before sharing any context with Anthropic/OpenAI.
27+
- Auto-remediation requires an HMAC-signed policy (`--auto-fix-policy`) to bypass per-action confirmation even when `--auto-fix` is provided.
28+
29+
## Supply-chain verification
30+
31+
- `pkg/remotecode/install.go` downloads installers to a temporary file, enforces a pinned SHA-256 (override via `ClaudeInstallerSHA256`/`CLAUDE_INSTALLER_SHA256`), and provides offline/manual fallback instructions when HTTPS fails.
32+
- `install.sh` now maintains explicit checksum tables for every artifact (Go toolchains, GitHub CLI GPG key, etc.) and refuses to proceed if a checksum mismatches or is missing.
33+
- `test/install_checksum_table_test.go` keeps the checksum map honest by ensuring every entry is a 64-character hex digest.

cmd/create/code.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ func init() {
7676
// Network flags
7777
CreateCodeCmd.Flags().StringSlice("allowed-networks", []string{},
7878
"Additional CIDR ranges to allow SSH from (e.g., 203.0.113.0/24)")
79+
80+
// Windsurf-specific flags
81+
CreateCodeCmd.Flags().Bool("skip-connectivity-check", false,
82+
"Skip Windsurf domain connectivity check (use if you know connectivity works)")
83+
CreateCodeCmd.Flags().Bool("cleanup-ide-servers", false,
84+
"Clean up old IDE server versions to recover disk space")
85+
CreateCodeCmd.Flags().Bool("no-client-config", false,
86+
"Skip generating SSH config for client machine")
7987
}
8088

8189
func runCreateCode(rc *eos_io.RuntimeContext, cmd *cobra.Command, args []string) error {
@@ -134,6 +142,19 @@ func runCreateCode(rc *eos_io.RuntimeContext, cmd *cobra.Command, args []string)
134142
config.SkipCodex = skipCodex
135143
}
136144

145+
// Windsurf-specific flags
146+
if skipConnCheck, err := cmd.Flags().GetBool("skip-connectivity-check"); err == nil {
147+
config.SkipConnectivityCheck = skipConnCheck
148+
}
149+
150+
if cleanupServers, err := cmd.Flags().GetBool("cleanup-ide-servers"); err == nil {
151+
config.CleanupIDEServers = cleanupServers
152+
}
153+
154+
if noClientConfig, err := cmd.Flags().GetBool("no-client-config"); err == nil && noClientConfig {
155+
config.GenerateClientConfig = false
156+
}
157+
137158
logger.Info("Starting remote IDE development setup",
138159
zap.String("user", config.User),
139160
zap.Int("max_sessions", config.MaxSessions),

0 commit comments

Comments
 (0)