CI / CI configuration security checks (pull_request) Successful in 2s
CI / Capabilities and shell quality (pull_request) Successful in 15s
CI / Python tests and compilation (pull_request) Successful in 36s
CI / QMD unit tests (pull_request) Successful in 7s
CI / Build and inspect generated packages (pull_request) Successful in 16s
CI / Bash integration and installation guards (pull_request) Failing after 51s
CI / PowerShell tests on Ubuntu (pull_request) Failing after 1m45s
CI / Installed client configuration smoke tests (pull_request) Canceled after 1m24s
- Resolve contradictions: authorization is never a skipped "boundary check"; one browser token policy (BFF/HttpOnly cookies first, RFC 10017); one sanitizer-bypass rule; Angular responses are unknown until validated. - Add security rules for AI/LLM integration and Java XXE, concrete crypto and password-hashing parameters, and RFC 8725 JWT validation. - Update version-dependent guidance after checking official sources: Angular 22, TypeScript 6/7, Node 24+, .NET 10/C# 14, JDK 21-25, Spring Boot 4; add a Spring Boot and Spring Security topic. - Give every rule a unique level-1 title and scope line, keep language security files to language specifics, and fix routing for inbound vs outbound HTTP, XML parsing, and WPF/Angular parent rules. - Validate rule structure and routing in validate-config.py, with tests. - Fix CI issues found by a local run: shellcheck directive order, pinned ruff rule set, Invoke-Python test mock, CRLF-tolerant package checks, Windows-only credential test, and refreshed prompt-budget baselines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
2.4 KiB
Bash
62 lines
2.4 KiB
Bash
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2154
|
|
# shellcheck source=../../shared/hooks/scripts/resolve-python.sh
|
|
. "$(dirname -- "${BASH_SOURCE[0]}")/../../shared/hooks/scripts/resolve-python.sh"
|
|
resolve_python || true
|
|
|
|
read_install_boolean() {
|
|
local prompt=$1 default=$2 hint=y/N answer
|
|
[ "$default" = false ] || hint=Y/n
|
|
while :; do
|
|
printf '%s [%s] ' "$prompt" "$hint" >&2
|
|
IFS= read -r answer || { printf 'Input ended before install options were confirmed.\n' >&2; return 1; }
|
|
answer=${answer%$'\r'}
|
|
case "$answer" in
|
|
'') printf '%s\n' "$default"; return ;;
|
|
y|Y|yes|Yes|YES) printf 'true\n'; return ;;
|
|
n|N|no|No|NO) printf 'false\n'; return ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
read_install_options() {
|
|
flashbang=true
|
|
statusline=true
|
|
semantic_retrieval=false
|
|
local saved key value
|
|
if [ -f "$home_path/.my-ai-configuration/selection.json" ]; then
|
|
if saved=$(run_python "$root/scripts/lib/selection-state.py" read --home "$home_path" --manifest "$root/adapters/plugins.tsv" --format tsv --allow-legacy); then
|
|
while IFS=$'\t' read -r key value; do
|
|
value=${value%$'\r'}
|
|
case "$key" in flashbang) flashbang=$value ;; statusline) statusline=$value ;; semantic_retrieval) semantic_retrieval=$value ;; esac
|
|
done <<< "$saved"
|
|
else
|
|
printf 'WARN Saved options could not be read; confirm new options below.\n' >&2
|
|
fi
|
|
fi
|
|
[ "$dry_run" = false ] || return 0
|
|
flashbang=$(read_install_boolean 'Enable the Flashbang notification hook?' "$flashbang") || return
|
|
statusline=$(read_install_boolean 'Apply the custom status line?' "$statusline") || return
|
|
semantic_retrieval=$(read_semantic_retrieval_option "$semantic_retrieval") || return
|
|
}
|
|
|
|
read_semantic_retrieval_option() {
|
|
local default=$1 hint=y/N/a answer
|
|
[ "$default" = false ] || hint=Y/n/a
|
|
while :; do
|
|
printf 'Enable local QMD search models (Qwen3 embedding, Qwen3 reranker, QMD query expansion)? [%s] ' "$hint" >&2
|
|
IFS= read -r answer || { printf 'Input ended before semantic retrieval was confirmed.\n' >&2; return 1; }
|
|
answer=${answer%$'\r'}
|
|
case "$answer" in
|
|
'') printf '%s\n' "$default"; return ;;
|
|
y|Y|yes|Yes|YES) printf 'true\n'; return ;;
|
|
n|N|no|No|NO) printf 'false\n'; return ;;
|
|
a|A|auto|Auto|AUTO)
|
|
if test_qmd_device "$root" "$home_path"; then printf 'true\n'; return; else status=$?; fi
|
|
[ "$status" -eq 1 ] && { printf 'false\n'; return; }
|
|
return "$status"
|
|
;;
|
|
esac
|
|
done
|
|
}
|