mustflow 2.84.0 → 2.99.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 (105) hide show
  1. package/README.md +11 -2
  2. package/dist/cli/commands/script-pack.js +14 -0
  3. package/dist/cli/i18n/en.js +262 -0
  4. package/dist/cli/i18n/es.js +262 -0
  5. package/dist/cli/i18n/fr.js +262 -0
  6. package/dist/cli/i18n/hi.js +262 -0
  7. package/dist/cli/i18n/ko.js +262 -0
  8. package/dist/cli/i18n/zh.js +262 -0
  9. package/dist/cli/lib/repo-map.js +27 -6
  10. package/dist/cli/lib/run-root-trust.js +15 -1
  11. package/dist/cli/lib/script-pack-registry.js +397 -0
  12. package/dist/cli/lib/validation/index.js +2 -2
  13. package/dist/cli/lib/validation/primitives.js +4 -1
  14. package/dist/cli/script-packs/code-change-impact.js +178 -0
  15. package/dist/cli/script-packs/code-dependency-graph.js +181 -0
  16. package/dist/cli/script-packs/code-import-cycle.js +193 -0
  17. package/dist/cli/script-packs/docs-link-integrity.js +145 -0
  18. package/dist/cli/script-packs/repo-approval-gate.js +100 -0
  19. package/dist/cli/script-packs/repo-env-contract.js +156 -0
  20. package/dist/cli/script-packs/repo-git-ignore-audit.js +119 -0
  21. package/dist/cli/script-packs/repo-manifest-lock-drift.js +122 -0
  22. package/dist/cli/script-packs/repo-merge-conflict-scan.js +123 -0
  23. package/dist/cli/script-packs/repo-secret-risk-scan.js +147 -0
  24. package/dist/cli/script-packs/repo-skill-route-audit.js +86 -0
  25. package/dist/cli/script-packs/repo-version-source.js +92 -0
  26. package/dist/cli/script-packs/test-performance-report.js +247 -0
  27. package/dist/cli/script-packs/test-regression-selector.js +167 -0
  28. package/dist/core/change-impact.js +355 -0
  29. package/dist/core/change-surface-classification.js +198 -0
  30. package/dist/core/change-verification.js +32 -5
  31. package/dist/core/config-loading.js +121 -4
  32. package/dist/core/dependency-graph.js +490 -0
  33. package/dist/core/docs-link-integrity.js +443 -0
  34. package/dist/core/env-contract.js +450 -0
  35. package/dist/core/import-cycle.js +152 -0
  36. package/dist/core/line-endings.js +26 -13
  37. package/dist/core/public-json-contracts.js +167 -0
  38. package/dist/core/repo-approval-gate.js +116 -0
  39. package/dist/core/repo-git-ignore-audit.js +302 -0
  40. package/dist/core/repo-manifest-lock-drift.js +321 -0
  41. package/dist/core/repo-merge-conflict-scan.js +335 -0
  42. package/dist/core/repo-version-source.js +82 -0
  43. package/dist/core/route-outline.js +57 -5
  44. package/dist/core/script-pack-suggestions.js +97 -1
  45. package/dist/core/secret-risk-scan.js +440 -0
  46. package/dist/core/skill-route-audit.js +354 -0
  47. package/dist/core/test-performance-report.js +697 -0
  48. package/dist/core/test-regression-selector.js +335 -0
  49. package/package.json +1 -1
  50. package/schemas/README.md +54 -0
  51. package/schemas/change-impact-report.schema.json +184 -0
  52. package/schemas/commands.schema.json +12 -0
  53. package/schemas/dependency-graph-report.schema.json +149 -0
  54. package/schemas/env-contract-report.schema.json +203 -0
  55. package/schemas/import-cycle-report.schema.json +157 -0
  56. package/schemas/link-integrity-report.schema.json +176 -0
  57. package/schemas/repo-approval-gate-report.schema.json +115 -0
  58. package/schemas/repo-git-ignore-audit-report.schema.json +201 -0
  59. package/schemas/repo-manifest-lock-drift-report.schema.json +202 -0
  60. package/schemas/repo-merge-conflict-scan-report.schema.json +169 -0
  61. package/schemas/repo-version-source-report.schema.json +127 -0
  62. package/schemas/secret-risk-scan-report.schema.json +152 -0
  63. package/schemas/skill-route-audit-report.schema.json +144 -0
  64. package/schemas/test-performance-report.schema.json +319 -0
  65. package/schemas/test-regression-selector-report.schema.json +187 -0
  66. package/templates/default/i18n.toml +80 -26
  67. package/templates/default/locales/en/.mustflow/skills/INDEX.md +51 -9
  68. package/templates/default/locales/en/.mustflow/skills/api-access-control-review/SKILL.md +48 -27
  69. package/templates/default/locales/en/.mustflow/skills/api-failure-triage/SKILL.md +270 -0
  70. package/templates/default/locales/en/.mustflow/skills/architecture-deepening-review/SKILL.md +28 -11
  71. package/templates/default/locales/en/.mustflow/skills/astro-code-change/SKILL.md +71 -27
  72. package/templates/default/locales/en/.mustflow/skills/auth-flow-triage/SKILL.md +192 -0
  73. package/templates/default/locales/en/.mustflow/skills/auth-permission-change/SKILL.md +59 -13
  74. package/templates/default/locales/en/.mustflow/skills/backend-log-evidence-review/SKILL.md +14 -5
  75. package/templates/default/locales/en/.mustflow/skills/cache-integrity-review/SKILL.md +30 -15
  76. package/templates/default/locales/en/.mustflow/skills/change-blast-radius-review/SKILL.md +45 -32
  77. package/templates/default/locales/en/.mustflow/skills/ci-pipeline-triage/SKILL.md +200 -0
  78. package/templates/default/locales/en/.mustflow/skills/clarifying-question-gate/SKILL.md +87 -13
  79. package/templates/default/locales/en/.mustflow/skills/cross-agent-session-reference/SKILL.md +23 -8
  80. package/templates/default/locales/en/.mustflow/skills/dependency-upgrade-review/SKILL.md +3 -1
  81. package/templates/default/locales/en/.mustflow/skills/docker-runtime-triage/SKILL.md +191 -0
  82. package/templates/default/locales/en/.mustflow/skills/github-contribution-quality-gate/SKILL.md +48 -11
  83. package/templates/default/locales/en/.mustflow/skills/go-code-change/SKILL.md +18 -13
  84. package/templates/default/locales/en/.mustflow/skills/javascript-code-change/SKILL.md +15 -13
  85. package/templates/default/locales/en/.mustflow/skills/line-ending-hygiene/SKILL.md +18 -10
  86. package/templates/default/locales/en/.mustflow/skills/llm-hallucination-control-review/SKILL.md +4 -1
  87. package/templates/default/locales/en/.mustflow/skills/motion-system-contract-review/SKILL.md +155 -0
  88. package/templates/default/locales/en/.mustflow/skills/next-action-menu/SKILL.md +177 -0
  89. package/templates/default/locales/en/.mustflow/skills/node-code-change/SKILL.md +16 -14
  90. package/templates/default/locales/en/.mustflow/skills/observability-debuggability-review/SKILL.md +15 -7
  91. package/templates/default/locales/en/.mustflow/skills/payment-integrity-review/SKILL.md +59 -35
  92. package/templates/default/locales/en/.mustflow/skills/powershell-code-change/SKILL.md +16 -6
  93. package/templates/default/locales/en/.mustflow/skills/prompt-contract-quality-review/SKILL.md +4 -1
  94. package/templates/default/locales/en/.mustflow/skills/python-code-change/SKILL.md +19 -10
  95. package/templates/default/locales/en/.mustflow/skills/rag-pipeline-triage/SKILL.md +206 -0
  96. package/templates/default/locales/en/.mustflow/skills/routes.toml +69 -9
  97. package/templates/default/locales/en/.mustflow/skills/rust-code-change/SKILL.md +10 -4
  98. package/templates/default/locales/en/.mustflow/skills/search-index-integrity-review/SKILL.md +181 -0
  99. package/templates/default/locales/en/.mustflow/skills/security-privacy-review/SKILL.md +3 -1
  100. package/templates/default/locales/en/.mustflow/skills/service-boundary-architecture/SKILL.md +37 -23
  101. package/templates/default/locales/en/.mustflow/skills/test-suite-performance-review/SKILL.md +323 -0
  102. package/templates/default/locales/en/.mustflow/skills/typescript-code-change/SKILL.md +18 -10
  103. package/templates/default/locales/en/.mustflow/skills/vector-search-integrity-review/SKILL.md +209 -0
  104. package/templates/default/locales/en/.mustflow/skills/version-freshness-check/SKILL.md +16 -14
  105. package/templates/default/manifest.toml +71 -1
@@ -0,0 +1,202 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/repo-manifest-lock-drift-report.schema.json",
4
+ "title": "mustflow repo manifest-lock-drift report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "input",
18
+ "policy",
19
+ "input_hash",
20
+ "lock",
21
+ "summary",
22
+ "entries",
23
+ "findings",
24
+ "issues"
25
+ ],
26
+ "properties": {
27
+ "schema_version": { "const": "1" },
28
+ "command": { "const": "script-pack" },
29
+ "pack_id": { "const": "repo" },
30
+ "script_id": { "const": "manifest-lock-drift" },
31
+ "script_ref": { "const": "repo/manifest-lock-drift" },
32
+ "action": { "const": "check" },
33
+ "status": { "enum": ["passed", "failed", "error"] },
34
+ "ok": { "type": "boolean" },
35
+ "mustflow_root": { "type": "string" },
36
+ "input": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["paths"],
40
+ "properties": {
41
+ "paths": {
42
+ "type": "array",
43
+ "items": { "type": "string" }
44
+ }
45
+ }
46
+ },
47
+ "policy": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["lock_path", "input_mode", "max_entries", "extra_manifest_file_detection"],
51
+ "properties": {
52
+ "lock_path": { "const": ".mustflow/config/manifest.lock.toml" },
53
+ "input_mode": { "enum": ["all_locked_files", "explicit_paths"] },
54
+ "max_entries": { "type": "integer", "minimum": 1 },
55
+ "extra_manifest_file_detection": { "const": "not_authoritative" }
56
+ }
57
+ },
58
+ "input_hash": { "$ref": "#/$defs/sha256" },
59
+ "lock": { "$ref": "#/$defs/lockMetadata" },
60
+ "summary": { "$ref": "#/$defs/summary" },
61
+ "entries": {
62
+ "type": "array",
63
+ "items": { "$ref": "#/$defs/entry" }
64
+ },
65
+ "findings": {
66
+ "type": "array",
67
+ "items": { "$ref": "#/$defs/finding" }
68
+ },
69
+ "issues": {
70
+ "type": "array",
71
+ "items": { "type": "string" }
72
+ }
73
+ },
74
+ "$defs": {
75
+ "sha256": {
76
+ "type": "string",
77
+ "pattern": "^sha256:[a-f0-9]{64}$"
78
+ },
79
+ "nullableString": {
80
+ "type": ["string", "null"]
81
+ },
82
+ "nullableSha256": {
83
+ "anyOf": [
84
+ { "$ref": "#/$defs/sha256" },
85
+ { "type": "null" }
86
+ ]
87
+ },
88
+ "lockMetadata": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": [
92
+ "path",
93
+ "exists",
94
+ "schema_version",
95
+ "template_id",
96
+ "template_version",
97
+ "template_profile",
98
+ "template_locale",
99
+ "entries_total"
100
+ ],
101
+ "properties": {
102
+ "path": { "const": ".mustflow/config/manifest.lock.toml" },
103
+ "exists": { "type": "boolean" },
104
+ "schema_version": { "$ref": "#/$defs/nullableString" },
105
+ "template_id": { "$ref": "#/$defs/nullableString" },
106
+ "template_version": { "$ref": "#/$defs/nullableString" },
107
+ "template_profile": { "$ref": "#/$defs/nullableString" },
108
+ "template_locale": { "$ref": "#/$defs/nullableString" },
109
+ "entries_total": { "type": "integer", "minimum": 0 }
110
+ }
111
+ },
112
+ "summary": {
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": [
116
+ "entries_total",
117
+ "entries_checked",
118
+ "clean_entries",
119
+ "missing_entries",
120
+ "hash_mismatches",
121
+ "unreadable_entries",
122
+ "unsafe_entries",
123
+ "skipped_entries",
124
+ "findings"
125
+ ],
126
+ "properties": {
127
+ "entries_total": { "type": "integer", "minimum": 0 },
128
+ "entries_checked": { "type": "integer", "minimum": 0 },
129
+ "clean_entries": { "type": "integer", "minimum": 0 },
130
+ "missing_entries": { "type": "integer", "minimum": 0 },
131
+ "hash_mismatches": { "type": "integer", "minimum": 0 },
132
+ "unreadable_entries": { "type": "integer", "minimum": 0 },
133
+ "unsafe_entries": { "type": "integer", "minimum": 0 },
134
+ "skipped_entries": { "type": "integer", "minimum": 0 },
135
+ "findings": { "type": "integer", "minimum": 0 }
136
+ }
137
+ },
138
+ "entry": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": [
142
+ "path",
143
+ "source",
144
+ "last_action",
145
+ "lock_hash",
146
+ "actual_hash",
147
+ "exists",
148
+ "status"
149
+ ],
150
+ "properties": {
151
+ "path": { "type": "string" },
152
+ "source": { "$ref": "#/$defs/nullableString" },
153
+ "last_action": { "$ref": "#/$defs/nullableString" },
154
+ "lock_hash": { "$ref": "#/$defs/nullableString" },
155
+ "actual_hash": { "$ref": "#/$defs/nullableSha256" },
156
+ "exists": { "type": "boolean" },
157
+ "status": {
158
+ "enum": ["clean", "hash_mismatch", "missing", "unreadable", "unsafe_path", "skipped"]
159
+ }
160
+ }
161
+ },
162
+ "finding": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "code",
167
+ "severity",
168
+ "message",
169
+ "path",
170
+ "expected_hash",
171
+ "actual_hash",
172
+ "json_pointer",
173
+ "metric",
174
+ "actual",
175
+ "expected"
176
+ ],
177
+ "properties": {
178
+ "code": {
179
+ "enum": [
180
+ "manifest_lock_missing",
181
+ "manifest_lock_invalid",
182
+ "manifest_lock_max_entries_exceeded",
183
+ "manifest_lock_entry_path_outside_root",
184
+ "manifest_lock_entry_missing",
185
+ "manifest_lock_entry_unreadable",
186
+ "manifest_lock_entry_invalid_hash",
187
+ "manifest_lock_hash_mismatch"
188
+ ]
189
+ },
190
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
191
+ "message": { "type": "string" },
192
+ "path": { "type": "string" },
193
+ "expected_hash": { "$ref": "#/$defs/nullableString" },
194
+ "actual_hash": { "$ref": "#/$defs/nullableSha256" },
195
+ "json_pointer": { "type": ["string", "null"] },
196
+ "metric": { "type": ["string", "null"] },
197
+ "actual": { "type": ["number", "null"] },
198
+ "expected": { "type": ["number", "null"] }
199
+ }
200
+ }
201
+ }
202
+ }
@@ -0,0 +1,169 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/repo-merge-conflict-scan-report.schema.json",
4
+ "title": "mustflow repo merge-conflict-scan report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "input",
18
+ "policy",
19
+ "input_hash",
20
+ "summary",
21
+ "files",
22
+ "markers",
23
+ "findings",
24
+ "issues"
25
+ ],
26
+ "properties": {
27
+ "schema_version": { "const": "1" },
28
+ "command": { "const": "script-pack" },
29
+ "pack_id": { "const": "repo" },
30
+ "script_id": { "const": "merge-conflict-scan" },
31
+ "script_ref": { "const": "repo/merge-conflict-scan" },
32
+ "action": { "const": "check" },
33
+ "status": { "enum": ["passed", "failed", "error"] },
34
+ "ok": { "type": "boolean" },
35
+ "mustflow_root": { "type": "string" },
36
+ "input": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["paths"],
40
+ "properties": {
41
+ "paths": {
42
+ "type": "array",
43
+ "items": { "type": "string" }
44
+ }
45
+ }
46
+ },
47
+ "policy": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["input_mode", "marker_prefixes", "max_files", "max_file_bytes", "skipped_directories"],
51
+ "properties": {
52
+ "input_mode": { "enum": ["explicit_paths", "git_changed_files"] },
53
+ "marker_prefixes": {
54
+ "type": "array",
55
+ "items": { "enum": ["<<<<<<<", "|||||||", "=======", ">>>>>>>"] }
56
+ },
57
+ "max_files": { "type": "integer", "minimum": 1 },
58
+ "max_file_bytes": { "type": "integer", "minimum": 1 },
59
+ "skipped_directories": {
60
+ "type": "array",
61
+ "items": { "type": "string" }
62
+ }
63
+ }
64
+ },
65
+ "input_hash": { "$ref": "#/$defs/sha256" },
66
+ "summary": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": ["files_checked", "markers_found", "files_with_markers", "issues"],
70
+ "properties": {
71
+ "files_checked": { "type": "integer", "minimum": 0 },
72
+ "markers_found": { "type": "integer", "minimum": 0 },
73
+ "files_with_markers": { "type": "integer", "minimum": 0 },
74
+ "issues": { "type": "integer", "minimum": 0 }
75
+ }
76
+ },
77
+ "files": {
78
+ "type": "array",
79
+ "items": { "$ref": "#/$defs/file" }
80
+ },
81
+ "markers": {
82
+ "type": "array",
83
+ "items": { "$ref": "#/$defs/marker" }
84
+ },
85
+ "findings": {
86
+ "type": "array",
87
+ "items": { "$ref": "#/$defs/finding" }
88
+ },
89
+ "issues": {
90
+ "type": "array",
91
+ "items": { "type": "string" }
92
+ }
93
+ },
94
+ "$defs": {
95
+ "sha256": {
96
+ "type": "string",
97
+ "pattern": "^sha256:[a-f0-9]{64}$"
98
+ },
99
+ "markerKind": {
100
+ "enum": ["start", "base", "separator", "end"]
101
+ },
102
+ "file": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["path", "sha256", "bytes", "markers"],
106
+ "properties": {
107
+ "path": { "type": "string" },
108
+ "sha256": { "$ref": "#/$defs/sha256" },
109
+ "bytes": { "type": "integer", "minimum": 0 },
110
+ "markers": { "type": "integer", "minimum": 0 }
111
+ }
112
+ },
113
+ "marker": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": ["path", "line", "column", "marker", "marker_length"],
117
+ "properties": {
118
+ "path": { "type": "string" },
119
+ "line": { "type": "integer", "minimum": 1 },
120
+ "column": { "type": "integer", "minimum": 1 },
121
+ "marker": { "$ref": "#/$defs/markerKind" },
122
+ "marker_length": { "type": "integer", "minimum": 1 }
123
+ }
124
+ },
125
+ "finding": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "code",
130
+ "severity",
131
+ "message",
132
+ "path",
133
+ "line",
134
+ "marker",
135
+ "json_pointer",
136
+ "metric",
137
+ "actual",
138
+ "expected"
139
+ ],
140
+ "properties": {
141
+ "code": {
142
+ "enum": [
143
+ "merge_conflict_marker_detected",
144
+ "merge_conflict_scan_git_unavailable",
145
+ "merge_conflict_scan_no_input_files",
146
+ "merge_conflict_scan_max_files_exceeded",
147
+ "merge_conflict_scan_file_too_large",
148
+ "merge_conflict_scan_unreadable_path",
149
+ "merge_conflict_scan_path_outside_root"
150
+ ]
151
+ },
152
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
153
+ "message": { "type": "string" },
154
+ "path": { "type": "string" },
155
+ "line": { "type": ["integer", "null"], "minimum": 1 },
156
+ "marker": {
157
+ "anyOf": [
158
+ { "$ref": "#/$defs/markerKind" },
159
+ { "type": "null" }
160
+ ]
161
+ },
162
+ "json_pointer": { "type": ["string", "null"] },
163
+ "metric": { "type": ["string", "null"] },
164
+ "actual": { "type": ["number", "null"] },
165
+ "expected": { "type": ["number", "null"] }
166
+ }
167
+ }
168
+ }
169
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/repo-version-source-report.schema.json",
4
+ "title": "mustflow repo version-source report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "input",
18
+ "input_hash",
19
+ "versioning_enabled",
20
+ "counts",
21
+ "sources",
22
+ "findings",
23
+ "issues"
24
+ ],
25
+ "properties": {
26
+ "schema_version": { "const": "1" },
27
+ "command": { "const": "script-pack" },
28
+ "pack_id": { "const": "repo" },
29
+ "script_id": { "const": "version-source" },
30
+ "script_ref": { "const": "repo/version-source" },
31
+ "action": { "const": "inspect" },
32
+ "status": { "enum": ["passed", "failed", "error"] },
33
+ "ok": { "type": "boolean" },
34
+ "mustflow_root": { "type": "string" },
35
+ "input": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["preferences_path", "declared_sources_path"],
39
+ "properties": {
40
+ "preferences_path": { "const": ".mustflow/config/preferences.toml" },
41
+ "declared_sources_path": { "const": ".mustflow/config/versioning.toml" }
42
+ }
43
+ },
44
+ "input_hash": { "$ref": "#/$defs/sha256" },
45
+ "versioning_enabled": { "type": "boolean" },
46
+ "counts": { "$ref": "#/$defs/counts" },
47
+ "sources": {
48
+ "type": "array",
49
+ "items": { "$ref": "#/$defs/versionSource" }
50
+ },
51
+ "findings": {
52
+ "type": "array",
53
+ "items": { "$ref": "#/$defs/finding" }
54
+ },
55
+ "issues": {
56
+ "type": "array",
57
+ "items": { "type": "string" }
58
+ }
59
+ },
60
+ "$defs": {
61
+ "sha256": {
62
+ "type": "string",
63
+ "pattern": "^sha256:[a-f0-9]{64}$"
64
+ },
65
+ "counts": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "sources",
70
+ "declared_sources",
71
+ "source_authority_sources",
72
+ "derived_authority_sources",
73
+ "unclassified_authority_sources"
74
+ ],
75
+ "properties": {
76
+ "sources": { "type": "integer", "minimum": 0 },
77
+ "declared_sources": { "type": "integer", "minimum": 0 },
78
+ "source_authority_sources": { "type": "integer", "minimum": 0 },
79
+ "derived_authority_sources": { "type": "integer", "minimum": 0 },
80
+ "unclassified_authority_sources": { "type": "integer", "minimum": 0 }
81
+ }
82
+ },
83
+ "versionSource": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": ["path", "kind"],
87
+ "properties": {
88
+ "path": { "type": "string" },
89
+ "kind": {
90
+ "enum": [
91
+ "template_lock",
92
+ "template_manifest",
93
+ "package_manifest"
94
+ ]
95
+ },
96
+ "declared": { "type": "boolean" },
97
+ "authority": {
98
+ "enum": ["source", "derived"]
99
+ }
100
+ }
101
+ },
102
+ "finding": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "code",
107
+ "severity",
108
+ "message",
109
+ "path",
110
+ "json_pointer",
111
+ "metric",
112
+ "actual",
113
+ "expected"
114
+ ],
115
+ "properties": {
116
+ "code": { "const": "versioning_enabled_without_sources" },
117
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
118
+ "message": { "type": "string" },
119
+ "path": { "type": "string" },
120
+ "json_pointer": { "type": ["string", "null"] },
121
+ "metric": { "type": ["string", "null"] },
122
+ "actual": { "type": ["number", "null"] },
123
+ "expected": { "type": ["number", "null"] }
124
+ }
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,152 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/secret-risk-scan-report.schema.json",
4
+ "title": "mustflow secret-risk-scan report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "policy",
18
+ "input_hash",
19
+ "targets",
20
+ "summary",
21
+ "truncated",
22
+ "findings",
23
+ "issues"
24
+ ],
25
+ "properties": {
26
+ "schema_version": { "const": "1" },
27
+ "command": { "const": "script-pack" },
28
+ "pack_id": { "const": "repo" },
29
+ "script_id": { "const": "secret-risk-scan" },
30
+ "script_ref": { "const": "repo/secret-risk-scan" },
31
+ "action": { "const": "scan" },
32
+ "status": { "enum": ["passed", "failed", "error"] },
33
+ "ok": { "type": "boolean" },
34
+ "mustflow_root": { "type": "string" },
35
+ "policy": { "$ref": "#/$defs/policy" },
36
+ "input_hash": { "$ref": "#/$defs/sha256" },
37
+ "targets": {
38
+ "type": "array",
39
+ "items": { "$ref": "#/$defs/target" }
40
+ },
41
+ "summary": { "$ref": "#/$defs/summary" },
42
+ "truncated": { "type": "boolean" },
43
+ "findings": {
44
+ "type": "array",
45
+ "items": { "$ref": "#/$defs/finding" }
46
+ },
47
+ "issues": {
48
+ "type": "array",
49
+ "items": { "type": "string" }
50
+ }
51
+ },
52
+ "$defs": {
53
+ "sha256": {
54
+ "type": "string",
55
+ "pattern": "^sha256:[a-f0-9]{64}$"
56
+ },
57
+ "fingerprint": {
58
+ "type": "string",
59
+ "pattern": "^sha256:[a-f0-9]{16}$"
60
+ },
61
+ "stringArray": {
62
+ "type": "array",
63
+ "items": { "type": "string" }
64
+ },
65
+ "policy": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "max_file_bytes",
70
+ "max_files",
71
+ "max_findings",
72
+ "extensions",
73
+ "skipped_secret_names",
74
+ "ignored_directories"
75
+ ],
76
+ "properties": {
77
+ "max_file_bytes": { "type": "integer", "minimum": 1 },
78
+ "max_files": { "type": "integer", "minimum": 1 },
79
+ "max_findings": { "type": "integer", "minimum": 1 },
80
+ "extensions": { "$ref": "#/$defs/stringArray" },
81
+ "skipped_secret_names": { "$ref": "#/$defs/stringArray" },
82
+ "ignored_directories": { "$ref": "#/$defs/stringArray" }
83
+ }
84
+ },
85
+ "target": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["input", "path", "exists", "kind"],
89
+ "properties": {
90
+ "input": { "type": "string" },
91
+ "path": { "type": "string" },
92
+ "exists": { "type": ["boolean", "null"] },
93
+ "kind": { "enum": ["file", "directory", "missing", "other", "unknown"] }
94
+ }
95
+ },
96
+ "summary": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "target_count",
101
+ "file_count",
102
+ "finding_count",
103
+ "skipped_secret_file_count",
104
+ "high_or_critical_count"
105
+ ],
106
+ "properties": {
107
+ "target_count": { "type": "integer", "minimum": 0 },
108
+ "file_count": { "type": "integer", "minimum": 0 },
109
+ "finding_count": { "type": "integer", "minimum": 0 },
110
+ "skipped_secret_file_count": { "type": "integer", "minimum": 0 },
111
+ "high_or_critical_count": { "type": "integer", "minimum": 0 }
112
+ }
113
+ },
114
+ "detector": {
115
+ "enum": [
116
+ "private_key_block",
117
+ "bearer_token",
118
+ "provider_token",
119
+ "generic_assignment",
120
+ "realistic_env_example",
121
+ "secret_file_skipped"
122
+ ]
123
+ },
124
+ "finding": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": ["code", "severity", "message", "path"],
128
+ "properties": {
129
+ "code": {
130
+ "enum": [
131
+ "secret_risk_path_outside_root",
132
+ "secret_risk_unreadable_path",
133
+ "secret_risk_secret_file_skipped",
134
+ "secret_risk_max_files_exceeded",
135
+ "secret_risk_max_findings_exceeded",
136
+ "secret_risk_private_key_block",
137
+ "secret_risk_bearer_token",
138
+ "secret_risk_provider_token",
139
+ "secret_risk_generic_assignment",
140
+ "secret_risk_realistic_env_example"
141
+ ]
142
+ },
143
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
144
+ "message": { "type": "string" },
145
+ "path": { "type": "string" },
146
+ "line": { "type": "integer", "minimum": 1 },
147
+ "detector": { "$ref": "#/$defs/detector" },
148
+ "fingerprint": { "$ref": "#/$defs/fingerprint" }
149
+ }
150
+ }
151
+ }
152
+ }