-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
55 lines (48 loc) · 1.96 KB
/
justfile
File metadata and controls
55 lines (48 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Capabilities repo — local development recipes
# https://github.com/casey/just
set dotenv-load := false
default:
@just --list
# Validate all capabilities (pass strict="true" for CI-level checks)
validate strict="false":
#!/usr/bin/env bash
set -euo pipefail
cmd=(uv run --with dreadnode dreadnode capability validate capabilities)
[[ "{{ strict }}" == "true" ]] && cmd+=(--strict)
"${cmd[@]}"
# Security scan all skills (pass capability to scan one, behavioral="true" for deep analysis)
security-scan capability="" behavioral="false":
#!/usr/bin/env bash
set -euo pipefail
cmd=(./scripts/security-scan.sh)
[[ "{{ behavioral }}" == "true" ]] && cmd+=(--behavioral)
[[ -n "{{ capability }}" ]] && cmd+=("{{ capability }}")
"${cmd[@]}"
# Run security scan tests
test-security-scan:
./scripts/test_security_scan.sh -v
# Sync all capabilities to local platform (requires running API + SDK profile)
sync-local force="false":
#!/usr/bin/env bash
set -euo pipefail
server="${DREADNODE_LOCAL_API_URL:-http://localhost:8000}"
cmd=(uv run --with dreadnode dreadnode capability sync capabilities --server "${server}" --organization dreadnode)
[[ -n "${DREADNODE_API_KEY:-}" ]] && cmd+=(--api-key "${DREADNODE_API_KEY}")
[[ "{{ force }}" == "true" ]] && cmd+=(--force)
"${cmd[@]}"
# Mirror repo capabilities into ~/.dreadnode/capabilities
sync-dreadnode-files:
#!/usr/bin/env bash
set -euo pipefail
target="${HOME}/.dreadnode/capabilities"
mkdir -p "${target}"
for d in capabilities/*/capability.yaml; do
[[ -f "${d}" ]] || continue
cap=$(basename "$(dirname "${d}")")
rsync -a --delete --delete-excluded --exclude '.DS_Store' "capabilities/${cap}/" "${target}/${cap}/"
done
for existing in "${target}"/*/; do
[[ -d "${existing}" ]] || continue
cap=$(basename "${existing}")
[[ -f "capabilities/${cap}/capability.yaml" ]] || rm -rf "${existing}"
done