@lennaertds/cardine-lab 0.0.0-stage → 0.5.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +192 -2
  3. package/bin/cardine-lab +52 -0
  4. package/cardine-bwrap +215 -0
  5. package/cardine-secrets-guard/index.js +196 -0
  6. package/cardine-secrets-guard/index.test.js +188 -0
  7. package/cardine-secrets-guard/package.json +9 -0
  8. package/cardine-slice-check/index.js +74 -0
  9. package/cardine-slice-check/package.json +9 -0
  10. package/cardine-status.sh +541 -0
  11. package/docs/VERSIONING.md +86 -0
  12. package/docs/cardine-lab.md +94 -0
  13. package/install-lab.sh +655 -0
  14. package/package.json +31 -4
  15. package/scripts/check-bwrap-secrets.sh +188 -0
  16. package/scripts/check-links.sh +81 -0
  17. package/scripts/check-sandbox.sh +129 -0
  18. package/scripts/check-secrets-repo.sh +100 -0
  19. package/scripts/check-secrets.sh +124 -0
  20. package/scripts/deps-audit.sh +145 -0
  21. package/scripts/digest-check.sh +36 -0
  22. package/scripts/digest-fetch.sh +114 -0
  23. package/scripts/digest-propose.sh +94 -0
  24. package/scripts/digest-reminder.sh +27 -0
  25. package/scripts/digest-rss.py +223 -0
  26. package/scripts/digest-week.sh +184 -0
  27. package/scripts/install-digest-timers.sh +12 -0
  28. package/scripts/native-ffi.sh +113 -0
  29. package/scripts/perf-check.sh +31 -0
  30. package/scripts/polyglot-check.sh +32 -0
  31. package/scripts/radar-check.sh +44 -0
  32. package/scripts/radar-reminder.sh +46 -0
  33. package/scripts/secrets-apply.sh +144 -0
  34. package/scripts/secrets-init.sh +31 -0
  35. package/scripts/security-scan.sh +57 -0
  36. package/systemd/digest-fetch.service +13 -0
  37. package/systemd/digest-fetch.timer +9 -0
  38. package/systemd/digest-week.service +13 -0
  39. package/systemd/digest-week.timer +9 -0
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env bash
2
+ # Strix-wrapper: eigen targets only. Nooit in make check.
3
+ set -euo pipefail
4
+
5
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
6
+ cd "$ROOT"
7
+
8
+ mode=full
9
+ target="."
10
+ extra=()
11
+ while [[ $# -gt 0 ]]; do
12
+ case "$1" in
13
+ --quick) mode=quick; shift ;;
14
+ --target) target="${2:?}"; shift 2 ;;
15
+ *) extra+=("$1"); shift ;;
16
+ esac
17
+ done
18
+
19
+ die() { echo "security-scan: $*" >&2; exit 1; }
20
+
21
+ command -v docker >/dev/null || die "Docker ontbreekt of staat niet in PATH. Start de daemon en installeer Docker."
22
+ docker info >/dev/null 2>&1 || die "Docker draait niet. Start de daemon en probeer opnieuw."
23
+
24
+ if ! command -v strix >/dev/null; then
25
+ cat >&2 <<'EOF'
26
+ security-scan: `strix` staat niet in PATH.
27
+
28
+ Installeer (één van beide):
29
+ curl -sSL https://strix.ai/install | bash
30
+ pipx install strix-agent
31
+
32
+ Zet daarna een LLM-provider, bv.:
33
+ export STRIX_LLM="openrouter/z-ai/glm-5.3"
34
+ export LLM_API_KEY="…"
35
+
36
+ Skill voor coding agents (optioneel):
37
+ npx skills add usestrix/strix
38
+
39
+ Uitleg: docs/architecture/security.md · docs/how-to/security-scan.md
40
+ EOF
41
+ exit 1
42
+ fi
43
+
44
+ if [[ -z "${LLM_API_KEY:-}${ANTHROPIC_API_KEY:-}${OPENAI_API_KEY:-}" && -z "${STRIX_LLM:-}" ]]; then
45
+ echo "security-scan: waarschuwing — geen LLM_API_KEY / STRIX_LLM zichtbaar in de omgeving." >&2
46
+ fi
47
+
48
+ echo "security-scan: alleen targets waar je toestemming voor hebt (eigen code / staging)."
49
+ args=(--target "$target")
50
+ if [[ "$mode" == quick ]]; then
51
+ args+=(--scan-mode quick)
52
+ fi
53
+ if [[ ${#extra[@]} -gt 0 ]]; then
54
+ args+=("${extra[@]}")
55
+ fi
56
+
57
+ exec strix "${args[@]}"
@@ -0,0 +1,13 @@
1
+ [Unit]
2
+ Description=Cardine digest-fetch (arXiv RSS)
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=oneshot
8
+ # Pas WorkingDirectory aan naar de lokale clone, bv. /home/jouwgebruiker/cardine
9
+ WorkingDirectory=/home/_jouwgebruiker_/cardine
10
+ ExecStart=/usr/bin/make digest-fetch
11
+ # Pas log-pad aan naar de lokale clone
12
+ StandardOutput=append:/home/_jouwgebruiker_/cardine/data/external/digest/cron.log
13
+ StandardError=append:/home/_jouwgebruiker_/cardine/data/external/digest/cron.log
@@ -0,0 +1,9 @@
1
+ [Unit]
2
+ Description=Weekdays 07:00 digest-fetch (arXiv is daily)
3
+
4
+ [Timer]
5
+ OnCalendar=Mon..Fri *-*-* 07:00:00
6
+ Persistent=true
7
+
8
+ [Install]
9
+ WantedBy=timers.target
@@ -0,0 +1,13 @@
1
+ [Unit]
2
+ Description=Cardine digest-week (propose + AE bron/weken)
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=oneshot
8
+ # Pas WorkingDirectory aan naar de lokale clone, bv. /home/jouwgebruiker/cardine
9
+ WorkingDirectory=/home/_jouwgebruiker_/cardine
10
+ ExecStart=/usr/bin/make digest-week
11
+ # Pas log-pad aan naar de lokale clone
12
+ StandardOutput=append:/home/_jouwgebruiker_/cardine/data/external/digest/cron.log
13
+ StandardError=append:/home/_jouwgebruiker_/cardine/data/external/digest/cron.log
@@ -0,0 +1,9 @@
1
+ [Unit]
2
+ Description=Monday 07:30 digest-week → AE bron/weken
3
+
4
+ [Timer]
5
+ OnCalendar=Mon *-*-* 07:30:00
6
+ Persistent=true
7
+
8
+ [Install]
9
+ WantedBy=timers.target