@topy-ai/maggie 0.7.55 → 0.7.56

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 (73) hide show
  1. package/README-zh-TW.md +5 -3
  2. package/README.md +35 -8
  3. package/bin/maggie.js +4 -0
  4. package/bundled-contracts/maggie-deployment/readiness-v1.schema.json +2 -1
  5. package/bundled-contracts/maggie-security/finding-example-v1.json +89 -0
  6. package/bundled-contracts/maggie-security/finding-v1.schema.json +63 -0
  7. package/bundled-contracts/maggie-security/findings-set-example-v1.json +148 -0
  8. package/bundled-contracts/maggie-security/findings-set-v1.schema.json +32 -0
  9. package/bundled-contracts/maggie-security/protect-plan-v1.schema.json +28 -0
  10. package/bundled-contracts/maggie-security/report-v1.schema.json +29 -0
  11. package/bundled-contracts/maggie-security/stack-example-v1.json +66 -0
  12. package/bundled-contracts/maggie-security/stack-upload-v1.schema.json +22 -0
  13. package/bundled-contracts/maggie-security/stack-v1.schema.json +37 -0
  14. package/bundled-contracts/maggie-security/tools-lock-v1.schema.json +36 -0
  15. package/bundled-skills/catalog.json +4 -0
  16. package/bundled-skills/maggie-security/SKILL.md +172 -0
  17. package/bundled-skills/maggie-security/agents/openai.yaml +4 -0
  18. package/bundled-skills/maggie-security/data/LICENSE-NOTICE.md +24 -0
  19. package/bundled-skills/maggie-security/data/asvs-map.json +209 -0
  20. package/bundled-skills/maggie-security/data/fail2ban/filter.d/maggie-wordpress.conf +6 -0
  21. package/bundled-skills/maggie-security/data/semgrep/LICENSE-NOTICE.md +5 -0
  22. package/bundled-skills/maggie-security/data/semgrep/VERSION +1 -0
  23. package/bundled-skills/maggie-security/data/semgrep/rules/dockerfile.yaml +14 -0
  24. package/bundled-skills/maggie-security/data/semgrep/rules/generic.yaml +26 -0
  25. package/bundled-skills/maggie-security/data/semgrep/rules/js.yaml +216 -0
  26. package/bundled-skills/maggie-security/data/semgrep/rules/php-debug-ok.yaml +17 -0
  27. package/bundled-skills/maggie-security/data/semgrep/rules/php-debug.yaml +17 -0
  28. package/bundled-skills/maggie-security/data/semgrep/rules/php.yaml +101 -0
  29. package/bundled-skills/maggie-security/data/semgrep/tests/dockerfile.dockerfile +10 -0
  30. package/bundled-skills/maggie-security/data/semgrep/tests/generic.astro +11 -0
  31. package/bundled-skills/maggie-security/data/semgrep/tests/generic.conf +11 -0
  32. package/bundled-skills/maggie-security/data/semgrep/tests/js.jsx +95 -0
  33. package/bundled-skills/maggie-security/data/semgrep/tests/php-debug-ok.php +5 -0
  34. package/bundled-skills/maggie-security/data/semgrep/tests/php-debug.php +3 -0
  35. package/bundled-skills/maggie-security/data/semgrep/tests/php.php +55 -0
  36. package/bundled-skills/maggie-security/evals/evals.json +97 -0
  37. package/bundled-skills/maggie-security/references/commands.md +111 -0
  38. package/bundled-skills/maggie-security/references/cve-response.md +24 -0
  39. package/bundled-skills/maggie-security/references/explaining-findings.md +57 -0
  40. package/bundled-skills/maggie-security/references/findings.md +39 -0
  41. package/bundled-skills/maggie-security/references/ownership-and-consent.md +29 -0
  42. package/bundled-skills/maggie-security/references/site-types.md +22 -0
  43. package/bundled-skills/maggie-security/references/tools-and-licences.md +16 -0
  44. package/bundled-skills/maggie-security/references/workflows.md +23 -0
  45. package/bundled-skills/maggie-security/registry/security-tools.registry.json +628 -0
  46. package/bundled-skills/maggie-security/routines.example.json +27 -0
  47. package/bundled-tools/clis/maggie_deployment_readiness.py +17 -2
  48. package/bundled-tools/clis/maggie_security.py +342 -0
  49. package/bundled-tools/clis/maggie_security_agent.py +326 -0
  50. package/bundled-tools/clis/maggie_security_code.py +650 -0
  51. package/bundled-tools/clis/maggie_security_core.py +1512 -0
  52. package/bundled-tools/clis/maggie_security_deps.py +560 -0
  53. package/bundled-tools/clis/maggie_security_health.py +415 -0
  54. package/bundled-tools/clis/maggie_security_host.py +511 -0
  55. package/bundled-tools/clis/maggie_security_hosted.py +115 -0
  56. package/bundled-tools/clis/maggie_security_intel.py +1294 -0
  57. package/bundled-tools/clis/maggie_security_inventory.py +1023 -0
  58. package/bundled-tools/clis/maggie_security_logs.py +777 -0
  59. package/bundled-tools/clis/maggie_security_mcp.py +473 -0
  60. package/bundled-tools/clis/maggie_security_mirror.py +122 -0
  61. package/bundled-tools/clis/maggie_security_protect.py +519 -0
  62. package/bundled-tools/clis/maggie_security_report.py +506 -0
  63. package/bundled-tools/clis/maggie_security_standards.py +214 -0
  64. package/bundled-tools/clis/maggie_security_versions.py +381 -0
  65. package/bundled-tools/clis/maggie_security_web.py +936 -0
  66. package/bundled-tools/clis/security_data/eol-snapshot.json +1 -0
  67. package/bundled-tools/clis/security_data/gitleaks-rules.json +3812 -0
  68. package/bundled-tools/clis/security_data/maltrail-lists.json +1 -0
  69. package/bundled-tools/clis/security_data/public-suffix-icann.txt +7374 -0
  70. package/bundled-tools/clis/security_data/retire-extractors.json +695 -0
  71. package/bundled-tools/clis/security_data/sigma-web.json +6514 -0
  72. package/bundled-tools/clis/security_data/tools.lock.json +358 -0
  73. package/package.json +1 -1
package/README-zh-TW.md CHANGED
@@ -29,7 +29,9 @@ npx @topy-ai/maggie init --scope project --agent all
29
29
  npx @topy-ai/maggie doctor --scope project --project .
30
30
  ```
31
31
 
32
- 目前 npm 版本為 `0.7.55`:完成 feedback batch 31,共 16 條,來自一個以排程 AI agent 操作自家行銷產品、同時維護 PHP 主機的團隊,並同步發布 MaggieDash 0.2.15。
32
+ 目前 npm 版本為 `0.7.56`:新增 Maggie Security(`maggie-security` skill 與 `maggie security` 指令,共 46 個指令、29 個 MCP 工具),涵蓋套件、runtime、資料庫、Web server、Linux 發行版與 WordPress 的漏洞公告與 end-of-life 日期,以及 secrets、程式碼、網站與主機檢查、報告、CI gate 與每日監控。
33
+
34
+ 0.7.55 完成 feedback batch 31,共 16 條,來自一個以排程 AI agent 操作自家行銷產品、同時維護 PHP 主機的團隊,並同步發布 MaggieDash 0.2.15。
33
35
 
34
36
  - **排程 agent(`maggie-ops`)**:
35
37
  - Skill 的「Routine mode」範本:何時執行、讀什麼、可確認哪些寫入與每日上限、失敗時怎麼辦,最後一定存一份報告。排程規則:排在伺服器自己的工作之後、避開整點,並留在平台每日執行次數上限內。
@@ -137,7 +139,7 @@ structure drift 或重複 treatment product 時 fail closed。
137
139
  deployment、memory、feedback 和 MaggieDash。內容先 draft/review,外部寫入、
138
140
  publish 與 production deployment 需要明確確認。
139
141
 
140
- 目前 npm 版本為 `0.7.55`,包含 batch 31 排程 agent routines、報告收件匣與無人值守 agent 限制、PHP runtime 盤點與主機鎖、pull 網站改寫、query 點子與社群佇列檢查,batch 30 MaggieDash 先裝核心、release privacy gate、feedback 備援、社群連結與圖片檢查、大量頁面產生與 app 檢查,batch 29 預約規則、部署、app QA、助理與社群功能,以及 batch 28 產品 app、assistant tools、mobile、product release、skills catalog 與 bridge host 功能、batch 26、27 feedback 修正與 idempotent `maggie update`與 Booking email-template 合約/CLI validator 同步。本版完成 2026-09-24 booking feedback batch:Calendar grid/free-slot entry 與 host modal focus-restoration evidence。本版新增 Starter marketplace provisioning plan;本版完成 feedback batches 22、23:加入 declarative browser interaction evidence、design markup/style/content-key gate、compiler source anchoring、entity double-escape protection、`update --help` read-only、noindex hypothetical indexability、可過期 baseline acknowledgement、DOM-only link extraction regression,以及 MaggieDash 0.2.10 的 content override、短期 browser session、CDN-safe public-session cache contracts。authentication 和 isolated dev server 仍由 host 負責。`maggie-booking` workflow、傳統 email/password、Stripe、Resend、public booking flow 及既有安全邊界維持不變;provider-bound video generation 與 transactional delivery 仍記錄在 issue #39,前一批延後功能仍在 issue #38,不會直接成為 active memory。0.7.33 記錄並審查一筆更正回饋;確認 0.7.32 已正確處理 batch index,沒有修改已驗證的 shared behavior。0.7.32 加入 feedback 一基索引支援、MaggieDash panel 的 source/freshness/error evidence、Consent Mode 與實際 write/no-op reconciliation、SEO baseline recapture、sitemap origin rebasing、content-diff scope、migration ledger reconciliation、deployment credential preflight、release provenance/runtime preflight、icon release gate、opt-in blog auto-publish gate,以及 least-privilege VPS deployer。也修復 top-level `maggie feedback` dispatcher parity。0.7.31 加入 update 差異摘要、atomic installer copy、subset install manifest merge,以及 inventory drift 時 doctor non-zero。0.7.30 補上 feedback tracking issue closeout gate 與 batch 14/15 audit ledger。0.7.29 修正 npm package landing page 使用英文 README;0.7.28 加入 versioned Gemini model policy、明確 fallback 與 provenance、bundled-first CLI
142
+ 目前 npm 版本為 `0.7.56`,包含 Maggie Security、batch 31 排程 agent routines、報告收件匣與無人值守 agent 限制、PHP runtime 盤點與主機鎖、pull 網站改寫、query 點子與社群佇列檢查,batch 30 MaggieDash 先裝核心、release privacy gate、feedback 備援、社群連結與圖片檢查、大量頁面產生與 app 檢查,batch 29 預約規則、部署、app QA、助理與社群功能,以及 batch 28 產品 app、assistant tools、mobile、product release、skills catalog 與 bridge host 功能、batch 26、27 feedback 修正與 idempotent `maggie update`與 Booking email-template 合約/CLI validator 同步。本版完成 2026-09-24 booking feedback batch:Calendar grid/free-slot entry 與 host modal focus-restoration evidence。本版新增 Starter marketplace provisioning plan;本版完成 feedback batches 22、23:加入 declarative browser interaction evidence、design markup/style/content-key gate、compiler source anchoring、entity double-escape protection、`update --help` read-only、noindex hypothetical indexability、可過期 baseline acknowledgement、DOM-only link extraction regression,以及 MaggieDash 0.2.10 的 content override、短期 browser session、CDN-safe public-session cache contracts。authentication 和 isolated dev server 仍由 host 負責。`maggie-booking` workflow、傳統 email/password、Stripe、Resend、public booking flow 及既有安全邊界維持不變;provider-bound video generation 與 transactional delivery 仍記錄在 issue #39,前一批延後功能仍在 issue #38,不會直接成為 active memory。0.7.33 記錄並審查一筆更正回饋;確認 0.7.32 已正確處理 batch index,沒有修改已驗證的 shared behavior。0.7.32 加入 feedback 一基索引支援、MaggieDash panel 的 source/freshness/error evidence、Consent Mode 與實際 write/no-op reconciliation、SEO baseline recapture、sitemap origin rebasing、content-diff scope、migration ledger reconciliation、deployment credential preflight、release provenance/runtime preflight、icon release gate、opt-in blog auto-publish gate,以及 least-privilege VPS deployer。也修復 top-level `maggie feedback` dispatcher parity。0.7.31 加入 update 差異摘要、atomic installer copy、subset install manifest merge,以及 inventory drift 時 doctor non-zero。0.7.30 補上 feedback tracking issue closeout gate 與 batch 14/15 audit ledger。0.7.29 修正 npm package landing page 使用英文 README;0.7.28 加入 versioned Gemini model policy、明確 fallback 與 provenance、bundled-first CLI
141
143
  dispatch、`maggie --version`、feedback batch review 聚合與重複偵測、marketplace enrichment evidence、booking
142
144
  worker/resolver evidence,以及 read-only migration preflight。它也包含 host-owned mobile app surface contract、signed-in
143
145
  camera-state QA、直接 Astro route resolution、correlated feedback batch,以及
@@ -289,6 +291,6 @@ maggie service retirement-audit --project . \
289
291
  --evidence .maggie/booking/retirement-evidence.json
290
292
  ```
291
293
 
292
- 完整中文說明、22 個 skills 清單和 roadmap:
294
+ 完整中文說明、23 個 skills 清單和 roadmap:
293
295
  [繁體中文 README](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/README.zh-TW.md)
294
296
  · [Roadmap](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/ROADMAP.md)
package/README.md CHANGED
@@ -87,11 +87,38 @@ Then invoke the installed skills from your coding agent, for example:
87
87
 
88
88
  Maggie keeps the existing project foundation and asks for decisions before
89
89
  shared routes, analytics, or publishing boundaries change. The current
90
- package ships 22 installable skills and a local-first MaggieDash foundation.
91
-
92
- This package is `0.7.55`. It closes feedback batch 31: 16 records from a team that runs scheduled AI
90
+ package ships 23 installable skills and a local-first MaggieDash foundation.
91
+
92
+ This package is `0.7.56`. It adds Maggie Security, a new
93
+ `maggie-security` skill and `maggie security` command family (46 commands, 29
94
+ MCP tools, 7 contracts under `contracts/maggie-security/`).
95
+
96
+ - **Advisories for the whole stack.** Packages (npm, pnpm, Yarn, Bun,
97
+ Composer, pip/Poetry/Pipenv/uv/pdm, Maven/Gradle, Go, RubyGems, Cargo,
98
+ NuGet), runtimes (Node, PHP, Python, Java, Go, Ruby, .NET), databases
99
+ (MySQL, MariaDB, PostgreSQL, Redis, MongoDB), web servers, Debian, Ubuntu,
100
+ Alpine, Rocky and Alma packages, and WordPress core, plugins and themes.
101
+ Sources: OSV, the CVE list, CISA KEV, EPSS, WPVulnerability and
102
+ endoflife.date, cached with an offline mode and a mirror option.
103
+ - **Findings with a ledger.** Each result is a `maggie-security-finding.v1`
104
+ with a stable id, a priority (p0–p4), a status (new, open, fixed, accepted
105
+ risk, false positive) and a fix. Secret values are never stored.
106
+ - **Code and supply chain.** `deps`, `sbom`, `secrets` (gitleaks rules),
107
+ `code-scan` (Semgrep, 22 bundled rules), `preinstall` and `image` checks;
108
+ pinned external tools are refused when their checksum does not match.
109
+ - **Websites and hosts.** Domain ownership by DNS TXT before any scan;
110
+ `headers`, `tls`, `web-scan`, `zap-baseline`; a read-only host collector
111
+ (Linux hardening checks), log review with Sigma rules and threat lists,
112
+ `protect-plan` and `waf-replay` (Coraza + OWASP CRS), uptime checks.
113
+ - **Reports and gates.** Plain-language reports, CVE response plans,
114
+ `incident`, a CI `gate` (template in `templates/ci/`) and a `securityGate`
115
+ check in `maggie deployment readiness`.
116
+ - **Agents.** `skills-scan`, `mcp-self-check`, `github-alerts`, and
117
+ `hosted-job` for a hosted daily watch.
118
+
119
+ 0.7.55 closed feedback batch 31: 16 records from a team that runs scheduled AI
93
120
  agents against its own marketing product and maintains PHP hosts, plus
94
- MaggieDash 0.2.15.
121
+ MaggieDash 0.2.15:
95
122
 
96
123
  - **Scheduled agents (`maggie-ops`).**
97
124
  - A "Routine mode" template for skills: when it runs, what it reads, which
@@ -810,8 +837,8 @@ artifact schemas.
810
837
  Recommended upgrade sequence for the current release:
811
838
 
812
839
  ```bash
813
- npx @topy-ai/maggie@0.7.55 update --scope project --project . --force
814
- npx @topy-ai/maggie@0.7.55 cleanup --scope project --project .
840
+ npx @topy-ai/maggie@0.7.56 update --scope project --project . --force
841
+ npx @topy-ai/maggie@0.7.56 cleanup --scope project --project .
815
842
  ```
816
843
 
817
844
  Maintainers should pass npm credentials through the repository helper, never
@@ -1322,13 +1349,13 @@ repairs with `maggie dash sections validate`, `fanout-validate`,
1322
1349
  `maggie dash inventory` to classify published pages once into disjoint kinds.
1323
1350
  See the [quality contract examples](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/contracts/maggiedash/quality-contracts.md).
1324
1351
 
1325
- The package includes all 22 installable skills: `maggie-blog-bootstrap`,
1352
+ The package includes all 23 installable skills: `maggie-blog-bootstrap`,
1326
1353
  `maggie-dash`, `maggie-clone`, `maggie-clone-to-template`, `maggie-marketplace`,
1327
1354
  `maggie-template`, `maggie-design`, `maggie-ops`, `maggie-deployment`,
1328
1355
  `maggie-project-context`, `maggie-seo-geo`, `maggie-social-share`,
1329
1356
  `maggie-service-booking`, `maggie-memory`, `maggie-content-localization`,
1330
1357
  `maggie-feedback`, `maggie-qa-workflow`, `maggie-auth-reference`,
1331
- `maggie-blog`, `maggie-mobile-app`, and `maggie-assistant-tools`. Use the stable
1358
+ `maggie-blog`, `maggie-mobile-app`, `maggie-assistant-tools`, and `maggie-security`. Use the stable
1332
1359
  commands below after installation:
1333
1360
 
1334
1361
  ```bash
package/bin/maggie.js CHANGED
@@ -227,6 +227,8 @@ Usage:
227
227
  maggie ops preflight --project PATH --write
228
228
  maggie ops routines-check routines.json [--server-jobs FILE] [--plan pro|max|team|enterprise]
229
229
  maggie ops routines-payload routines.json --repo OWNER/NAME [--commit SHA] [--output FILE]
230
+ maggie security doctor|tools|feeds|ledger [--project PATH] [--format json|sarif|md|text] [--offline] [--explain-egress]
231
+ maggie security <command> --help (vuln watch, dependencies, secrets, web surface, logs, host audit, uptime, report, mcp; docs/maggie-security)
230
232
 
231
233
  Examples:
232
234
  npx @topy-ai/maggie init
@@ -865,6 +867,8 @@ try {
865
867
  else if (command === "deployment" && ["runtime-inventory", "host-lock"].includes(args[0])) workflowCli("maggie_host_runtime.py", args);
866
868
  else if (command === "deployment" && args[0] === "runtime-preflight") workflowCli("maggie_runtime_preflight.py", args.slice(1));
867
869
  else if (command === "deployment") workflowCli("maggie_deployment.py", args);
870
+ // The CLI runs with cwd = --project, so pass that path absolute or Python would resolve it twice.
871
+ else if (command === "security") workflowCli("maggie_security.py", args.map((value, index) => (args[index - 1] === "--project" ? resolve(value) : value)));
868
872
  else if (command === "migration") workflowCli("maggie_migration.py", args);
869
873
  else if (command === "schedule") workflowCli("maggie_schedule.py", args);
870
874
  else if (command === "analytics") workflowCli("maggie_analytics.py", args);
@@ -22,7 +22,8 @@
22
22
  "hostHealth": {"$ref": "#/$defs/check"},
23
23
  "releaseIdentity": {"$ref": "#/$defs/check"},
24
24
  "rollbackEvidence": {"$ref": "#/$defs/check"},
25
- "authenticatedCanary": {"$ref": "#/$defs/check"}
25
+ "authenticatedCanary": {"$ref": "#/$defs/check"},
26
+ "securityGate": {"$ref": "#/$defs/check"}
26
27
  }
27
28
  }
28
29
  },
@@ -0,0 +1,89 @@
1
+ {
2
+ "schema": "maggie-security-finding.v1",
3
+ "id": "msf_a6f3541c959e767b53b29ad6",
4
+ "kind": "vulnerability",
5
+ "title": "next 14.2.10: authorization bypass in middleware",
6
+ "severity": "critical",
7
+ "severity_source": "cvss",
8
+ "priority": "p0",
9
+ "confidence": "likely",
10
+ "aliases": [
11
+ "CVE-2025-29927",
12
+ "GHSA-f82v-jwr5-mffw"
13
+ ],
14
+ "cvss": {
15
+ "version": "3.1",
16
+ "score": 9.1,
17
+ "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
18
+ },
19
+ "epss": {
20
+ "score": 0.93,
21
+ "percentile": 0.99,
22
+ "date": "2026-10-23"
23
+ },
24
+ "kev": {
25
+ "listed": true,
26
+ "date_added": "2025-04-02",
27
+ "ransomware": "unknown"
28
+ },
29
+ "cwe_ids": [
30
+ "CWE-285"
31
+ ],
32
+ "asvs_ids": [
33
+ "V8.2.1"
34
+ ],
35
+ "affected": {
36
+ "purl": "pkg:npm/next@14.2.10",
37
+ "ecosystem": "npm",
38
+ "name": "next",
39
+ "version": "14.2.10",
40
+ "component_type": "library",
41
+ "direct": true,
42
+ "scope": "runtime"
43
+ },
44
+ "fix": {
45
+ "fixed_versions": [
46
+ "14.2.25"
47
+ ],
48
+ "recommended": "14.2.25",
49
+ "available": true
50
+ },
51
+ "target": {
52
+ "site": "example-site",
53
+ "host": null,
54
+ "url": null,
55
+ "path": "package-lock.json",
56
+ "image": null
57
+ },
58
+ "evidence": [
59
+ {
60
+ "path": "package-lock.json",
61
+ "line": 812,
62
+ "excerpt": "\"next\": \"14.2.10\""
63
+ }
64
+ ],
65
+ "source": {
66
+ "command": "deps",
67
+ "tool": "osv-scanner",
68
+ "tool_version": "2.2.3",
69
+ "rule_id": "GHSA-f82v-jwr5-mffw",
70
+ "feed": "osv",
71
+ "fetched_at": "2026-10-24T06:17:09Z"
72
+ },
73
+ "remediation": {
74
+ "summary": "Upgrade next to 14.2.25 or later.",
75
+ "steps": [
76
+ "npm install next@14.2.25",
77
+ "rebuild and redeploy"
78
+ ],
79
+ "snippets": [],
80
+ "references": [
81
+ "https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw"
82
+ ],
83
+ "cheat_sheet": null
84
+ },
85
+ "signal": null,
86
+ "status": "new",
87
+ "first_seen": "2026-10-24T06:17:41Z",
88
+ "last_seen": "2026-10-24T06:17:41Z"
89
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-security/finding-v1.json",
4
+ "title": "Maggie security finding",
5
+ "description": "One result from any maggie security command. OSV-shaped vulnerability core plus target, evidence, remediation and ledger status. See docs/maggie-security/00-foundation-prd.md section 7.",
6
+ "type": "object",
7
+ "required": ["schema", "id", "kind", "title", "severity", "severity_source", "priority", "confidence", "target", "source", "status"],
8
+ "properties": {
9
+ "schema": {"const": "maggie-security-finding.v1"},
10
+ "id": {"type": "string", "pattern": "^msf_[0-9a-f]{24}$"},
11
+ "kind": {"enum": ["vulnerability", "eol", "malicious-package", "misconfiguration", "exposure", "secret", "code", "tls", "header", "attack-signal", "host-hardening", "availability", "agent-skill", "checklist"]},
12
+ "title": {"type": "string", "minLength": 1, "maxLength": 300},
13
+ "severity": {"$ref": "#/$defs/severity"},
14
+ "severity_source": {"enum": ["cvss", "vendor", "tool", "maggie"]},
15
+ "priority": {"enum": ["p0", "p1", "p2", "p3", "p4"]},
16
+ "confidence": {"enum": ["confirmed", "likely", "possible"]},
17
+ "aliases": {"type": "array", "items": {"type": "string"}},
18
+ "cvss": {"type": ["object", "null"], "properties": {"version": {"type": "string"}, "score": {"type": "number", "minimum": 0, "maximum": 10}, "vector": {"type": "string"}}},
19
+ "epss": {"type": ["object", "null"], "properties": {"score": {"type": "number", "minimum": 0, "maximum": 1}, "percentile": {"type": "number", "minimum": 0, "maximum": 1}, "date": {"type": "string"}}},
20
+ "kev": {"type": ["object", "null"], "properties": {"listed": {"type": "boolean"}, "date_added": {"type": "string"}, "ransomware": {"type": "string"}, "due_date": {"type": "string"}}},
21
+ "cwe_ids": {"type": "array", "items": {"type": "string", "pattern": "^CWE-[0-9]+$"}},
22
+ "asvs_ids": {"type": "array", "items": {"type": "string", "pattern": "^V[0-9]+\\.[0-9]+\\.[0-9]+$"}},
23
+ "affected": {"type": ["object", "null"], "properties": {
24
+ "purl": {"type": ["string", "null"]},
25
+ "ecosystem": {"type": ["string", "null"]},
26
+ "name": {"type": "string"},
27
+ "version": {"type": ["string", "null"]},
28
+ "component_type": {"enum": ["library", "runtime", "os", "service", "wordpress-core", "wordpress-plugin", "wordpress-theme", "image", "js-bundle"]},
29
+ "direct": {"type": ["boolean", "null"]},
30
+ "scope": {"enum": ["runtime", "dev", "build", "os", "service", null]}
31
+ }, "required": ["name"]},
32
+ "fix": {"type": ["object", "null"], "properties": {"fixed_versions": {"type": "array", "items": {"type": "string"}}, "recommended": {"type": ["string", "null"]}, "available": {"type": "boolean"}}},
33
+ "target": {"type": "object", "properties": {
34
+ "site": {"type": ["string", "null"]}, "host": {"type": ["string", "null"]}, "url": {"type": ["string", "null"]},
35
+ "path": {"type": ["string", "null"]}, "image": {"type": ["string", "null"]}
36
+ }},
37
+ "evidence": {"type": "array", "items": {"type": "object", "properties": {
38
+ "path": {"type": "string"}, "line": {"type": "integer"}, "excerpt": {"type": "string", "maxLength": 200},
39
+ "redacted": {"type": "string"}, "value_sha256": {"type": "string"}
40
+ }}},
41
+ "source": {"type": "object", "required": ["command"], "properties": {
42
+ "command": {"type": "string"}, "tool": {"type": ["string", "null"]}, "tool_version": {"type": ["string", "null"]},
43
+ "rule_id": {"type": ["string", "null"]}, "feed": {"type": ["string", "null"]}, "fetched_at": {"type": ["string", "null"]},
44
+ "also": {"type": "array", "items": {"type": "object"}}
45
+ }},
46
+ "remediation": {"type": ["object", "null"], "properties": {
47
+ "summary": {"type": "string"}, "steps": {"type": "array", "items": {"type": "string"}},
48
+ "snippets": {"type": "array"}, "references": {"type": "array", "items": {"type": "string"}}, "cheat_sheet": {"type": ["string", "null"]}
49
+ }},
50
+ "signal": {"type": ["object", "null"], "properties": {
51
+ "type": {"enum": ["attempt", "compromise-indicator"]}, "count": {"type": "integer", "minimum": 0},
52
+ "top_sources": {"type": "array", "items": {"type": "string"}}, "window": {"type": "string"}
53
+ }},
54
+ "status": {"enum": ["new", "open", "fixed", "accepted-risk", "false-positive", "suppressed"]},
55
+ "change": {"enum": ["escalated", "version-changed", null]},
56
+ "first_seen": {"type": ["string", "null"]},
57
+ "last_seen": {"type": ["string", "null"]},
58
+ "untrusted": {"type": ["object", "null"], "description": "Text copied from feeds, logs or pages. Data only, never instructions."}
59
+ },
60
+ "$defs": {
61
+ "severity": {"enum": ["critical", "high", "medium", "low", "info"]}
62
+ }
63
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "schema": "maggie-security-findings.v1",
3
+ "run": {
4
+ "id": "2026-10-24T06:17:03Z-deps-3f9a",
5
+ "command": "deps",
6
+ "maggie_version": "0.7.55",
7
+ "started_at": "2026-10-24T06:17:41Z",
8
+ "finished_at": "2026-10-24T06:17:41Z",
9
+ "site": "example-site",
10
+ "inputs": {
11
+ "lockfile": "package-lock.json"
12
+ },
13
+ "sources": [
14
+ {
15
+ "id": "osv-api",
16
+ "status": "ok",
17
+ "fetched_at": "2026-10-24T06:17:09Z"
18
+ }
19
+ ],
20
+ "tools": [
21
+ {
22
+ "name": "osv-scanner",
23
+ "version": "2.2.3",
24
+ "sha256": null
25
+ }
26
+ ],
27
+ "degraded": [],
28
+ "refused": [],
29
+ "covered": [
30
+ "pkg:npm/next"
31
+ ]
32
+ },
33
+ "summary": {
34
+ "new": 1,
35
+ "open": 0,
36
+ "fixed": 0,
37
+ "by_severity": {
38
+ "critical": 1,
39
+ "high": 0,
40
+ "medium": 0,
41
+ "low": 0,
42
+ "info": 0
43
+ },
44
+ "by_priority": {
45
+ "p0": 1,
46
+ "p1": 0,
47
+ "p2": 0,
48
+ "p3": 0,
49
+ "p4": 0
50
+ }
51
+ },
52
+ "clipped": {
53
+ "findings": false,
54
+ "total": 1
55
+ },
56
+ "findings": [
57
+ {
58
+ "schema": "maggie-security-finding.v1",
59
+ "id": "msf_a6f3541c959e767b53b29ad6",
60
+ "kind": "vulnerability",
61
+ "title": "next 14.2.10: authorization bypass in middleware",
62
+ "severity": "critical",
63
+ "severity_source": "cvss",
64
+ "priority": "p0",
65
+ "confidence": "likely",
66
+ "aliases": [
67
+ "CVE-2025-29927",
68
+ "GHSA-f82v-jwr5-mffw"
69
+ ],
70
+ "cvss": {
71
+ "version": "3.1",
72
+ "score": 9.1,
73
+ "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
74
+ },
75
+ "epss": {
76
+ "score": 0.93,
77
+ "percentile": 0.99,
78
+ "date": "2026-10-23"
79
+ },
80
+ "kev": {
81
+ "listed": true,
82
+ "date_added": "2025-04-02",
83
+ "ransomware": "unknown"
84
+ },
85
+ "cwe_ids": [
86
+ "CWE-285"
87
+ ],
88
+ "asvs_ids": [
89
+ "V8.2.1"
90
+ ],
91
+ "affected": {
92
+ "purl": "pkg:npm/next@14.2.10",
93
+ "ecosystem": "npm",
94
+ "name": "next",
95
+ "version": "14.2.10",
96
+ "component_type": "library",
97
+ "direct": true,
98
+ "scope": "runtime"
99
+ },
100
+ "fix": {
101
+ "fixed_versions": [
102
+ "14.2.25"
103
+ ],
104
+ "recommended": "14.2.25",
105
+ "available": true
106
+ },
107
+ "target": {
108
+ "site": "example-site",
109
+ "host": null,
110
+ "url": null,
111
+ "path": "package-lock.json",
112
+ "image": null
113
+ },
114
+ "evidence": [
115
+ {
116
+ "path": "package-lock.json",
117
+ "line": 812,
118
+ "excerpt": "\"next\": \"14.2.10\""
119
+ }
120
+ ],
121
+ "source": {
122
+ "command": "deps",
123
+ "tool": "osv-scanner",
124
+ "tool_version": "2.2.3",
125
+ "rule_id": "GHSA-f82v-jwr5-mffw",
126
+ "feed": "osv",
127
+ "fetched_at": "2026-10-24T06:17:09Z"
128
+ },
129
+ "remediation": {
130
+ "summary": "Upgrade next to 14.2.25 or later.",
131
+ "steps": [
132
+ "npm install next@14.2.25",
133
+ "rebuild and redeploy"
134
+ ],
135
+ "snippets": [],
136
+ "references": [
137
+ "https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw"
138
+ ],
139
+ "cheat_sheet": null
140
+ },
141
+ "signal": null,
142
+ "status": "new",
143
+ "first_seen": "2026-10-24T06:17:41Z",
144
+ "last_seen": "2026-10-24T06:17:41Z"
145
+ }
146
+ ],
147
+ "fixed": []
148
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-security/findings-set-v1.json",
4
+ "title": "Maggie security findings set",
5
+ "description": "One run of a maggie security command. findings[] items follow finding-v1.schema.json.",
6
+ "type": "object",
7
+ "required": ["schema", "run", "summary", "clipped", "findings"],
8
+ "properties": {
9
+ "schema": {"const": "maggie-security-findings.v1"},
10
+ "run": {"type": "object", "required": ["id", "command", "started_at", "finished_at", "sources", "tools", "degraded", "refused"], "properties": {
11
+ "id": {"type": "string"}, "command": {"type": "string"}, "maggie_version": {"type": "string"},
12
+ "started_at": {"type": "string"}, "finished_at": {"type": "string"}, "site": {"type": ["string", "null"]},
13
+ "inputs": {"type": "object"},
14
+ "sources": {"type": "array", "items": {"type": "object", "required": ["id", "status"], "properties": {
15
+ "id": {"type": "string"}, "status": {"enum": ["ok", "cached", "degraded", "skipped"]}, "fetched_at": {"type": ["string", "null"]},
16
+ "version": {"type": ["string", "null"]}, "cursor": {"type": ["string", "null"]}, "error": {"type": ["string", "null"]}
17
+ }}},
18
+ "tools": {"type": "array", "items": {"type": "object", "required": ["name"], "properties": {"name": {"type": "string"}, "version": {"type": ["string", "null"]}, "sha256": {"type": ["string", "null"]}}}},
19
+ "degraded": {"type": "array", "items": {"type": "string"}},
20
+ "refused": {"type": "array", "items": {"type": "string"}},
21
+ "covered": {"type": "array", "items": {"type": "string"}, "description": "Targets this run fully covered; the ledger only marks findings on these targets fixed."}
22
+ }},
23
+ "summary": {"type": "object", "required": ["new", "open", "fixed", "by_severity"], "properties": {
24
+ "new": {"type": "integer"}, "open": {"type": "integer"}, "fixed": {"type": "integer"},
25
+ "by_severity": {"type": "object", "properties": {"critical": {"type": "integer"}, "high": {"type": "integer"}, "medium": {"type": "integer"}, "low": {"type": "integer"}, "info": {"type": "integer"}}},
26
+ "by_priority": {"type": "object"}
27
+ }},
28
+ "clipped": {"type": "object", "required": ["findings", "total"], "properties": {"findings": {"type": "boolean"}, "total": {"type": "integer"}}},
29
+ "findings": {"type": "array", "items": {"type": "object"}},
30
+ "fixed": {"type": "array", "items": {"type": "string"}, "description": "Finding ids the ledger marked fixed in this run."}
31
+ }
32
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-security/protect-plan-v1.json",
4
+ "title": "Maggie security protection plan",
5
+ "description": "A reviewed, never auto-applied plan from `maggie security protect-plan`. See docs/maggie-security/05-protection-waf-prd.md section 6.2.",
6
+ "type": "object",
7
+ "required": ["schema", "id", "host", "created_at", "engine", "egress", "data_sharing", "requires", "risk_notes", "steps", "verify", "rollback"],
8
+ "properties": {
9
+ "schema": {"const": "maggie-security-protect-plan.v1"},
10
+ "id": {"type": "string", "pattern": "^pp_"},
11
+ "host": {"type": "string"},
12
+ "created_at": {"type": "string"},
13
+ "engine": {"enum": ["crowdsec", "fail2ban", "cloudflare"]},
14
+ "waf": {"type": "object"},
15
+ "inputs": {"type": "object"},
16
+ "egress": {"type": "array", "items": {"type": "object", "required": ["host", "why"]}},
17
+ "data_sharing": {"type": "object", "required": ["crowdsec_capi", "console"], "properties": {"crowdsec_capi": {"type": "boolean"}, "console": {"const": false}}},
18
+ "requires": {"type": "object", "required": ["consent"], "properties": {"consent": {"const": "host-change"}}},
19
+ "risk_notes": {"type": "array", "items": {"type": "string"}},
20
+ "advice": {"type": "array", "items": {"type": "string"}},
21
+ "steps": {"type": "array", "items": {"type": "object", "required": ["n", "title", "run", "kind", "reversible"], "properties": {
22
+ "n": {"type": "integer"}, "title": {"type": "string"}, "run": {"type": "string"}, "kind": {"enum": ["local", "host"]},
23
+ "reversible": {"type": "boolean"}, "rollback": {"type": "string"}}}},
24
+ "verify": {"type": "array", "items": {"type": "object", "required": ["check", "expect"]}},
25
+ "rollback": {"type": "array", "items": {"type": "string"}},
26
+ "allowlist": {"type": "object"}
27
+ }
28
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-security/report-v1.json",
4
+ "title": "Maggie security report",
5
+ "description": "Per-site report built by `maggie security report`; references finding ids, full findings stay in .maggie/security/runs/. See docs/maggie-security/09-risk-report-standards-prd.md section 8.2.",
6
+ "type": "object",
7
+ "required": ["schema", "id", "site", "kind", "period", "verdict", "counts", "actions", "checked", "degraded_sources", "runs", "findings"],
8
+ "properties": {
9
+ "schema": {"const": "maggie-security-report.v1"},
10
+ "id": {"type": "string"},
11
+ "site": {"type": "string"},
12
+ "kind": {"enum": ["weekly", "daily_ops", "incident", "gate"]},
13
+ "audience": {"enum": ["owner", "technical"]},
14
+ "period": {"type": "object", "required": ["from", "to"], "properties": {"from": {"type": "string"}, "to": {"type": "string"}}},
15
+ "verdict": {"type": "object", "required": ["code", "text"], "properties": {"code": {"enum": ["possible-break-in", "act-today", "act-this-week", "nothing-urgent"]}, "text": {"type": "string"}}},
16
+ "counts": {"type": "object", "required": ["new", "open", "fixed", "by_priority"]},
17
+ "actions": {"type": "array", "items": {"type": "object", "required": ["finding_id", "priority", "title"]}},
18
+ "coverage": {"type": ["object", "null"]},
19
+ "checked": {"type": "array", "items": {"type": "object", "required": ["command", "last_run", "degraded"]}},
20
+ "not_checked": {"type": "array", "items": {"type": "string"}},
21
+ "degraded_sources": {"type": "array", "items": {"type": "string"}},
22
+ "runs": {"type": "array", "items": {"type": "string"}},
23
+ "findings": {"type": "array", "items": {"type": "string", "pattern": "^msf_[0-9a-f]{24}$"}},
24
+ "fixed": {"type": "array", "items": {"type": "string"}},
25
+ "maggie_version": {"type": "string"},
26
+ "incident": {"type": "object", "required": ["id", "title", "status", "timeline"]},
27
+ "gate": {"type": "object", "required": ["decision", "block", "warn"], "properties": {"decision": {"enum": ["pass", "warn", "block"]}, "block": {"type": "array"}, "warn": {"type": "array"}, "checked": {"type": "array"}}}
28
+ }
29
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "schema": "maggie-security-stack.v1",
3
+ "site": {
4
+ "id": "example-site",
5
+ "type": "node-app",
6
+ "domains": [
7
+ "example.com"
8
+ ],
9
+ "hosting": "vps-with-cloudflare-dns"
10
+ },
11
+ "collected_at": "2026-10-24T06:00:00Z",
12
+ "hash": "sha256:73a805dca6155476f3cdc7f91b1954517325abcda06ecbb381d550c4732cc497",
13
+ "sources": [
14
+ {
15
+ "kind": "lockfile",
16
+ "path": "package-lock.json"
17
+ },
18
+ {
19
+ "kind": "runtime-inventory",
20
+ "path": ".maggie/security/inventory/host-web1.json"
21
+ }
22
+ ],
23
+ "components": [
24
+ {
25
+ "purl": "pkg:npm/next@14.2.10",
26
+ "ecosystem": "npm",
27
+ "name": "next",
28
+ "version": "14.2.10",
29
+ "scope": "runtime",
30
+ "direct": true,
31
+ "location": "package-lock.json"
32
+ }
33
+ ],
34
+ "runtimes": [
35
+ {
36
+ "name": "node",
37
+ "version": "20.11.1",
38
+ "cycle": "20",
39
+ "host": "web1",
40
+ "source": "runtime-inventory"
41
+ },
42
+ {
43
+ "name": "nginx",
44
+ "version": "1.24.0",
45
+ "cycle": "1.24",
46
+ "host": "web1",
47
+ "source": "runtime-inventory"
48
+ }
49
+ ],
50
+ "wordpress": null,
51
+ "images": [],
52
+ "hosts": [
53
+ {
54
+ "id": "web1",
55
+ "os": "ubuntu 22.04",
56
+ "public": true
57
+ }
58
+ ],
59
+ "watch": {
60
+ "products": [
61
+ "nginx",
62
+ "node",
63
+ "next"
64
+ ]
65
+ }
66
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-security/stack-upload-v1.json",
4
+ "title": "Maggie security stack upload",
5
+ "description": "What `maggie security inventory --export-upload` sends to CMO.so for the hosted daily watch: package and runtime names and versions only. No file paths, host names, lockfile contents, logs or secrets. See docs/maggie-security/11-mcp-tools-prd.md section 9.",
6
+ "type": "object",
7
+ "required": ["schema", "workspace", "site_type", "created_at", "hash", "components", "runtimes"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "schema": {"const": "maggie-security-stack-upload.v1"},
11
+ "workspace": {"type": "string", "maxLength": 253},
12
+ "site_type": {"type": "string"},
13
+ "created_at": {"type": "string"},
14
+ "hash": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
15
+ "components": {"type": "array", "maxItems": 20000, "items": {"type": "object", "required": ["ecosystem", "name", "version"], "additionalProperties": false,
16
+ "properties": {"ecosystem": {"type": "string"}, "name": {"type": "string"}, "version": {"type": "string"}, "scope": {"type": "string"}, "direct": {"type": ["boolean", "null"]}}}},
17
+ "runtimes": {"type": "array", "items": {"type": "object", "required": ["name", "version"], "additionalProperties": false,
18
+ "properties": {"name": {"type": "string"}, "version": {"type": "string"}, "host": {"type": ["string", "null"], "description": "opaque alias such as web1, never a hostname"}}}},
19
+ "wordpress": {"type": ["object", "null"]},
20
+ "watch": {"type": "array", "items": {"type": "string"}}
21
+ }
22
+ }