claude-flow-novice 2.10.6 → 2.10.7

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.
@@ -0,0 +1,70 @@
1
+ #!/bin/bash
2
+ # Security Validation Hook for Docker Hybrid Routing
3
+
4
+ set -euo pipefail
5
+
6
+ # Validate secret management configurations
7
+ validate_secret_management() {
8
+ local file_path="$1"
9
+
10
+ # Check for hardcoded secrets
11
+ if grep -qE '(sk-ant-|token-|api_key=)' "$file_path"; then
12
+ echo "❌ SECURITY RISK: Potential secret exposure in $file_path"
13
+ return 1
14
+ fi
15
+
16
+ # Check for proper environment variable naming
17
+ if grep -qE 'API_KEY=|SECRET=|TOKEN=' "$file_path"; then
18
+ echo "⚠️ NAMING RISK: Inconsistent secret variable names in $file_path"
19
+ return 2
20
+ fi
21
+
22
+ return 0
23
+ }
24
+
25
+ # Validate Docker network configurations
26
+ validate_docker_network() {
27
+ local compose_file="$1"
28
+
29
+ # Check for overly permissive network configurations
30
+ if ! grep -qE 'driver_opts:\n\s*encrypted:\s*"true"' "$compose_file"; then
31
+ echo "❌ NETWORK RISK: Network encryption not enabled"
32
+ return 1
33
+ fi
34
+
35
+ if ! grep -qE 'driver:\s*overlay' "$compose_file"; then
36
+ echo "⚠️ NETWORK CONFIG: Recommended to use overlay network for better isolation"
37
+ return 2
38
+ fi
39
+
40
+ return 0
41
+ }
42
+
43
+ # Main validation function
44
+ main() {
45
+ local file_path="$1"
46
+ local file_name=$(basename "$file_path")
47
+ local exit_code=0
48
+
49
+ echo "🔒 Running security validation for $file_name"
50
+
51
+ case "$file_name" in
52
+ docker-compose.yml|docker-compose.*.yml)
53
+ validate_docker_network "$file_path" || exit_code=$?
54
+ ;;
55
+ .env|*.env)
56
+ validate_secret_management "$file_path" || exit_code=$?
57
+ ;;
58
+ esac
59
+
60
+ if [ $exit_code -eq 0 ]; then
61
+ echo "✅ Security validation passed for $file_name"
62
+ else
63
+ echo "🚨 Security validation failed for $file_name (Error code: $exit_code)"
64
+ fi
65
+
66
+ return $exit_code
67
+ }
68
+
69
+ # Execute main validation
70
+ main "$@"
@@ -1,44 +1,44 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- # Hybrid Routing Worker Spawner
5
- # Dynamically configures and launches routing workers
6
-
7
- CONFIG_PATH="$(dirname "$0")/config.json"
8
-
9
- # Load configuration
10
- SKILL_NAME=$(jq -r '.skill_name' "$CONFIG_PATH")
11
- PRIMARY_CHANNEL=$(jq -r '.routing_strategies.primary.type' "$CONFIG_PATH")
12
- SECONDARY_CHANNEL=$(jq -r '.routing_strategies.secondary.type' "$CONFIG_PATH")
13
-
14
- # Worker spawning function
15
- spawn_routing_worker() {
16
- local channel_type="$1"
17
- local worker_id="$2"
18
-
19
- case "$channel_type" in
20
- "redis-pubsub")
21
- ./.claude/skills/cfn-redis-coordination/spawn-agent.sh \
22
- --skill-id "$SKILL_NAME" \
23
- --agent-id "routing-worker-$worker_id" \
24
- --strategy "$channel_type"
25
- ;;
26
- "websocket")
27
- ./.claude/skills/cfn-agent-spawning/spawn-agent.sh \
28
- --skill-id "$SKILL_NAME" \
29
- --agent-id "routing-worker-$worker_id" \
30
- --strategy "$channel_type"
31
- ;;
32
- *)
33
- echo "Unsupported channel type: $channel_type"
34
- exit 1
35
- ;;
36
- esac
37
- }
38
-
39
- # Spawn primary and secondary workers
40
- spawn_routing_worker "$PRIMARY_CHANNEL" "primary"
41
- spawn_routing_worker "$SECONDARY_CHANNEL" "secondary"
42
-
43
- # Final status report
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Hybrid Routing Worker Spawner
5
+ # Dynamically configures and launches routing workers
6
+
7
+ CONFIG_PATH="$(dirname "$0")/config.json"
8
+
9
+ # Load configuration
10
+ SKILL_NAME=$(jq -r '.skill_name' "$CONFIG_PATH")
11
+ PRIMARY_CHANNEL=$(jq -r '.routing_strategies.primary.type' "$CONFIG_PATH")
12
+ SECONDARY_CHANNEL=$(jq -r '.routing_strategies.secondary.type' "$CONFIG_PATH")
13
+
14
+ # Worker spawning function
15
+ spawn_routing_worker() {
16
+ local channel_type="$1"
17
+ local worker_id="$2"
18
+
19
+ case "$channel_type" in
20
+ "redis-pubsub")
21
+ ./.claude/skills/cfn-redis-coordination/spawn-agent.sh \
22
+ --skill-id "$SKILL_NAME" \
23
+ --agent-id "routing-worker-$worker_id" \
24
+ --strategy "$channel_type"
25
+ ;;
26
+ "websocket")
27
+ ./.claude/skills/cfn-agent-spawning/spawn-agent.sh \
28
+ --skill-id "$SKILL_NAME" \
29
+ --agent-id "routing-worker-$worker_id" \
30
+ --strategy "$channel_type"
31
+ ;;
32
+ *)
33
+ echo "Unsupported channel type: $channel_type"
34
+ exit 1
35
+ ;;
36
+ esac
37
+ }
38
+
39
+ # Spawn primary and secondary workers
40
+ spawn_routing_worker "$PRIMARY_CHANNEL" "primary"
41
+ spawn_routing_worker "$SECONDARY_CHANNEL" "secondary"
42
+
43
+ # Final status report
44
44
  echo "Hybrid Routing Workers Spawned Successfully"