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
Copy file name to clipboardExpand all lines: docs/guide/security.md
+7-130Lines changed: 7 additions & 130 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,28 +66,13 @@ This project uses [NPM trusted publishers](https://docs.npmjs.com/trusted-publis
66
66
67
67
## Operational Security: Safety Mode
68
68
69
-
The CLI includes a **Safety Mode** feature that prevents accidental or unwanted destructive operations. This is particularly important when:
69
+
The CLI includes a **Safety Mode** feature via CLI checks and HTTP middleware that prevents accidental or unwanted destructive operations. This is particularly important when:
70
70
71
-
- Using the CLI in automated environments (CI/CD pipelines)
72
71
- Providing the CLI as a tool to AI agents/LLMs
73
72
- Working in production environments
74
73
- Training new team members
75
74
- Running commands from untrusted scripts
76
75
77
-
### How It Works
78
-
79
-
Safety Mode uses a **hybrid protection approach**:
80
-
81
-
1. **HTTP Middleware Layer** (Primary Protection)
82
-
- Intercepts ALL HTTP requests before they're sent
83
-
- Cannot be bypassed by command-line flags
84
-
- Works automatically for all commands
85
-
- LLM-proof: controlled via environment variable
86
-
87
-
2. **Command-Level Checks** (Better UX)
88
-
- Provides early, user-friendly error messages
89
-
- Catches operations before HTTP requests
90
-
91
76
### Safety Levels
92
77
93
78
Configure via the `SFCC_SAFETY_LEVEL` environment variable:
@@ -99,131 +84,23 @@ Configure via the `SFCC_SAFETY_LEVEL` environment variable:
'Cannot {{operation}}: blocked by safety level {{safetyLevel}}.\n\n{{description}}\n\nTo allow this operation, unset or change the SFCC_SAFETY_LEVEL environment variable.\nSee: https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/security#operational-security-safety-mode',
0 commit comments