@oneie/claude 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/do-auto.sh +11 -0
package/package.json
CHANGED
package/scripts/do-auto.sh
CHANGED
|
@@ -29,6 +29,17 @@ done
|
|
|
29
29
|
|
|
30
30
|
[ -z "$SLUG" ] && { echo "usage: do-auto.sh <slug> [--max-cycles N] [--dry-run]" >&2; exit 1; }
|
|
31
31
|
|
|
32
|
+
# Validate slug is safe (kebab-case only) before it touches any shell string.
|
|
33
|
+
# Prevents command injection if the slug ever contains metacharacters.
|
|
34
|
+
if ! printf '%s' "$SLUG" | grep -qE '^[a-zA-Z0-9][a-zA-Z0-9_-]*$'; then
|
|
35
|
+
echo "[do-auto] unsafe slug (must be alphanumeric + hyphens/underscores): $SLUG" >&2; exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Trust boundary: this script runs in the developer's own workspace, invoked by /do
|
|
39
|
+
# which resolves the slug from a plans/ file the developer controls. The spawned
|
|
40
|
+
# claude subprocess uses --dangerously-skip-permissions because it is non-interactive
|
|
41
|
+
# — it cannot prompt the human for tool approvals. The workspace is the isolation
|
|
42
|
+
# boundary. Do not expose this script to untrusted input or run it in shared environments.
|
|
32
43
|
TODO="plans/${SLUG}-todo.md"
|
|
33
44
|
TRUST=".do-trust.json"
|
|
34
45
|
|