pumuki 6.3.129 → 6.3.130
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.
- package/AGENTS.md +16 -1
- package/CHANGELOG.md +9 -0
- package/README.md +14 -10
- package/VERSION +1 -1
- package/core/facts/detectors/text/android.test.ts +2583 -24
- package/core/facts/detectors/text/android.ts +4633 -34
- package/core/facts/detectors/typescript/index.test.ts +3639 -73
- package/core/facts/detectors/typescript/index.ts +4819 -270
- package/core/facts/extractHeuristicFacts.ts +271 -6
- package/core/rules/presets/heuristics/android.test.ts +314 -1
- package/core/rules/presets/heuristics/android.ts +1220 -50
- package/core/rules/presets/heuristics/typescript.test.ts +158 -2
- package/core/rules/presets/heuristics/typescript.ts +508 -0
- package/docs/README.md +3 -3
- package/docs/operations/RELEASE_NOTES.md +7 -1
- package/docs/operations/framework-menu-consumer-walkthrough.md +18 -15
- package/docs/product/API_REFERENCE.md +1 -1
- package/docs/product/USAGE.md +1 -1
- package/docs/validation/README.md +3 -1
- package/integrations/config/skillsCompilerTemplates.test.ts +131 -0
- package/integrations/config/skillsCompilerTemplates.ts +953 -7
- package/integrations/config/skillsDetectorRegistry.ts +451 -8
- package/integrations/config/skillsMarkdownRules.ts +884 -2
- package/integrations/evidence/buildEvidence.ts +29 -1
- package/integrations/evidence/platformSummary.test.ts +73 -9
- package/integrations/evidence/platformSummary.ts +165 -7
- package/integrations/evidence/repoState.ts +3 -0
- package/integrations/evidence/schema.ts +18 -0
- package/integrations/evidence/trackingContract.ts +17 -0
- package/integrations/evidence/writeEvidence.test.ts +3 -0
- package/integrations/evidence/writeEvidence.ts +29 -1
- package/integrations/gate/evaluateAiGate.ts +251 -8
- package/integrations/gate/governanceActionCatalog.ts +275 -0
- package/integrations/gate/remediationCatalog.ts +8 -0
- package/integrations/git/runPlatformGate.ts +9 -1
- package/integrations/lifecycle/adapter.ts +24 -0
- package/integrations/lifecycle/bootstrapManifest.ts +248 -0
- package/integrations/lifecycle/cliGovernanceConsole.ts +69 -0
- package/integrations/lifecycle/governanceNextAction.ts +171 -0
- package/integrations/lifecycle/governanceObservationSnapshot.ts +369 -0
- package/integrations/lifecycle/packageInfo.ts +118 -1
- package/integrations/lifecycle/state.ts +8 -1
- package/integrations/lifecycle/trackingState.ts +403 -0
- package/integrations/lifecycle/watch.ts +1 -1
- package/integrations/mcp/aiGateCheck.ts +194 -10
- package/integrations/mcp/alignedPlatformGate.ts +232 -0
- package/integrations/mcp/enterpriseServer.ts +19 -3
- package/integrations/mcp/preFlightCheck.ts +66 -3
- package/integrations/mcp/readMcpPrePushStdin.ts +7 -0
- package/package.json +1 -1
- package/scripts/build-ruralgo-s1-evidence-pack.ts +85 -0
- package/scripts/check-tracking-single-active.sh +1 -1
- package/scripts/framework-menu-advanced-view-lib.ts +49 -0
- package/scripts/framework-menu-consumer-actions-lib.ts +32 -32
- package/scripts/framework-menu-consumer-preflight-render.ts +10 -0
- package/scripts/framework-menu-consumer-preflight-run.ts +23 -0
- package/scripts/framework-menu-consumer-preflight-types.ts +12 -0
- package/scripts/framework-menu-consumer-runtime-actions.ts +11 -5
- package/scripts/framework-menu-consumer-runtime-audit.ts +0 -28
- package/scripts/framework-menu-consumer-runtime-evidence-classic.ts +118 -42
- package/scripts/framework-menu-consumer-runtime-lib.ts +38 -0
- package/scripts/framework-menu-consumer-runtime-menu.ts +55 -15
- package/scripts/framework-menu-consumer-runtime-types.ts +4 -0
- package/scripts/framework-menu-evidence-summary-read.ts +17 -1
- package/scripts/framework-menu-evidence-summary-types.ts +3 -0
- package/scripts/framework-menu-layout-data.ts +3 -23
- package/scripts/framework-menu-system-notifications-macos-applescript-dialog.ts +1 -1
- package/scripts/framework-menu-system-notifications-macos-dialog-payload.ts +14 -2
- package/scripts/framework-menu-system-notifications-macos-swift-source.ts +1 -1
- package/scripts/framework-menu-system-notifications-payloads-blocked.ts +128 -4
- package/scripts/framework-menu-system-notifications-payloads.ts +8 -1
- package/scripts/framework-menu-system-notifications-text.ts +7 -1
- package/scripts/framework-menu.ts +37 -2
- package/scripts/package-install-smoke-consumer-git-repo-lib.ts +10 -1
- package/scripts/package-install-smoke-consumer-npm-lib.ts +46 -9
- package/scripts/ruralgo-s1-evidence-pack-lib.ts +200 -0
- package/skills.lock.json +613 -698
|
@@ -3,7 +3,7 @@ import test from 'node:test';
|
|
|
3
3
|
import { typescriptRules } from './typescript';
|
|
4
4
|
|
|
5
5
|
test('typescriptRules define reglas heurísticas locked para plataforma generic', () => {
|
|
6
|
-
assert.equal(typescriptRules.length,
|
|
6
|
+
assert.equal(typescriptRules.length, 47);
|
|
7
7
|
|
|
8
8
|
const ids = typescriptRules.map((rule) => rule.id);
|
|
9
9
|
assert.deepEqual(ids, [
|
|
@@ -16,6 +16,32 @@ test('typescriptRules define reglas heurísticas locked para plataforma generic'
|
|
|
16
16
|
'heuristics.ts.set-timeout-string.ast',
|
|
17
17
|
'heuristics.ts.set-interval-string.ast',
|
|
18
18
|
'heuristics.ts.new-promise-async.ast',
|
|
19
|
+
'heuristics.ts.callback-hell.ast',
|
|
20
|
+
'heuristics.ts.magic-numbers.ast',
|
|
21
|
+
'heuristics.ts.hardcoded-values.ast',
|
|
22
|
+
'heuristics.ts.env-default-fallback.ast',
|
|
23
|
+
'heuristics.ts.guards-useguards-jwtauthguard.ast',
|
|
24
|
+
'heuristics.ts.interceptors-useinterceptors-logging-transform.ast',
|
|
25
|
+
'heuristics.ts.no-sensitive-log.ast',
|
|
26
|
+
'heuristics.ts.rate-limiting-throttler.ast',
|
|
27
|
+
'heuristics.ts.winston-structured-json-logger.ast',
|
|
28
|
+
'heuristics.ts.error-logging-full-context.ast',
|
|
29
|
+
'heuristics.ts.correlation-ids.ast',
|
|
30
|
+
'heuristics.ts.cors-configured.ast',
|
|
31
|
+
'heuristics.ts.validationpipe-global.ast',
|
|
32
|
+
'heuristics.ts.versionado-api-v1-api-v2.ast',
|
|
33
|
+
'heuristics.ts.validation-config.ast',
|
|
34
|
+
'heuristics.ts.class-validator-decorators.ast',
|
|
35
|
+
'heuristics.ts.class-transformer-decorators.ast',
|
|
36
|
+
'heuristics.ts.input-validation-siempre-validar-con-dtos.ast',
|
|
37
|
+
'heuristics.ts.nested-validation-validatenested-type.ast',
|
|
38
|
+
'heuristics.ts.dtos-en-boundaries-validacio-n-en-entrada-salida.ast',
|
|
39
|
+
'heuristics.ts.dtos-separados-createorderdto-updateorderdto-orderresponsedto.ast',
|
|
40
|
+
'heuristics.ts.return-dtos-no-exponer-entidades-directamente.ast',
|
|
41
|
+
'heuristics.ts.transacciones-para-operaciones-cri-ticas.ast',
|
|
42
|
+
'heuristics.ts.transacciones-para-operaciones-multi-tabla.ast',
|
|
43
|
+
'heuristics.ts.prometheus-prom-client.ast',
|
|
44
|
+
'heuristics.ts.password-hashing-bcrypt-salt-rounds-10.ast',
|
|
19
45
|
'heuristics.ts.with-statement.ast',
|
|
20
46
|
'heuristics.ts.delete-operator.ast',
|
|
21
47
|
'heuristics.ts.debugger.ast',
|
|
@@ -25,6 +51,8 @@ test('typescriptRules define reglas heurísticas locked para plataforma generic'
|
|
|
25
51
|
'heuristics.ts.solid.lsp.override-not-implemented.ast',
|
|
26
52
|
'heuristics.ts.solid.dip.framework-import.ast',
|
|
27
53
|
'heuristics.ts.solid.dip.concrete-instantiation.ast',
|
|
54
|
+
'heuristics.ts.clean-architecture.ast',
|
|
55
|
+
'heuristics.ts.react-class-component.ast',
|
|
28
56
|
'heuristics.ts.god-class-large-class.ast',
|
|
29
57
|
]);
|
|
30
58
|
|
|
@@ -45,14 +73,142 @@ test('typescriptRules define reglas heurísticas locked para plataforma generic'
|
|
|
45
73
|
byId.get('heuristics.ts.solid.dip.concrete-instantiation.ast')?.then.code,
|
|
46
74
|
'HEURISTICS_SOLID_DIP_CONCRETE_INSTANTIATION_AST'
|
|
47
75
|
);
|
|
76
|
+
assert.equal(
|
|
77
|
+
byId.get('heuristics.ts.clean-architecture.ast')?.then.code,
|
|
78
|
+
'HEURISTICS_CLEAN_ARCHITECTURE_AST'
|
|
79
|
+
);
|
|
80
|
+
assert.equal(
|
|
81
|
+
byId.get('heuristics.ts.react-class-component.ast')?.then.code,
|
|
82
|
+
'HEURISTICS_TS_REACT_CLASS_COMPONENT_AST'
|
|
83
|
+
);
|
|
48
84
|
assert.equal(
|
|
49
85
|
byId.get('heuristics.ts.god-class-large-class.ast')?.then.code,
|
|
50
86
|
'HEURISTICS_GOD_CLASS_LARGE_CLASS_AST'
|
|
51
87
|
);
|
|
88
|
+
assert.equal(
|
|
89
|
+
byId.get('heuristics.ts.callback-hell.ast')?.then.code,
|
|
90
|
+
'HEURISTICS_CALLBACK_HELL_AST'
|
|
91
|
+
);
|
|
92
|
+
assert.equal(
|
|
93
|
+
byId.get('heuristics.ts.magic-numbers.ast')?.then.code,
|
|
94
|
+
'HEURISTICS_MAGIC_NUMBERS_AST'
|
|
95
|
+
);
|
|
96
|
+
assert.equal(
|
|
97
|
+
byId.get('heuristics.ts.hardcoded-values.ast')?.then.code,
|
|
98
|
+
'HEURISTICS_HARDCODED_VALUES_AST'
|
|
99
|
+
);
|
|
100
|
+
assert.equal(
|
|
101
|
+
byId.get('heuristics.ts.env-default-fallback.ast')?.then.code,
|
|
102
|
+
'HEURISTICS_ENV_DEFAULT_FALLBACK_AST'
|
|
103
|
+
);
|
|
104
|
+
assert.equal(
|
|
105
|
+
byId.get('heuristics.ts.guards-useguards-jwtauthguard.ast')?.then.code,
|
|
106
|
+
'HEURISTICS_GUARDS_USEGUARDS_JWTAUTHGUARD_AST'
|
|
107
|
+
);
|
|
108
|
+
assert.equal(
|
|
109
|
+
byId.get('heuristics.ts.interceptors-useinterceptors-logging-transform.ast')?.then.code,
|
|
110
|
+
'HEURISTICS_INTERCEPTORS_USEINTERCEPTORS_LOGGING_TRANSFORM_AST'
|
|
111
|
+
);
|
|
112
|
+
assert.equal(
|
|
113
|
+
byId.get('heuristics.ts.no-sensitive-log.ast')?.then.code,
|
|
114
|
+
'HEURISTICS_NO_SENSITIVE_LOG_AST'
|
|
115
|
+
);
|
|
116
|
+
assert.equal(
|
|
117
|
+
byId.get('heuristics.ts.password-hashing-bcrypt-salt-rounds-10.ast')?.then.code,
|
|
118
|
+
'HEURISTICS_PASSWORD_HASHING_BCRYPT_SALT_ROUNDS_10_AST'
|
|
119
|
+
);
|
|
120
|
+
assert.equal(
|
|
121
|
+
byId.get('heuristics.ts.rate-limiting-throttler.ast')?.then.code,
|
|
122
|
+
'HEURISTICS_RATE_LIMITING_THROTTLER_AST'
|
|
123
|
+
);
|
|
124
|
+
assert.equal(
|
|
125
|
+
byId.get('heuristics.ts.winston-structured-json-logger.ast')?.then.code,
|
|
126
|
+
'HEURISTICS_WINSTON_STRUCTURED_JSON_LOGGER_AST'
|
|
127
|
+
);
|
|
128
|
+
assert.equal(
|
|
129
|
+
byId.get('heuristics.ts.error-logging-full-context.ast')?.then.code,
|
|
130
|
+
'HEURISTICS_ERROR_LOGGING_FULL_CONTEXT_AST'
|
|
131
|
+
);
|
|
132
|
+
assert.equal(
|
|
133
|
+
byId.get('heuristics.ts.correlation-ids.ast')?.then.code,
|
|
134
|
+
'HEURISTICS_CORRELATION_IDS_AST'
|
|
135
|
+
);
|
|
136
|
+
assert.equal(
|
|
137
|
+
byId.get('heuristics.ts.cors-configured.ast')?.then.code,
|
|
138
|
+
'HEURISTICS_CORS_CONFIGURED_AST'
|
|
139
|
+
);
|
|
140
|
+
assert.equal(
|
|
141
|
+
byId.get('heuristics.ts.validationpipe-global.ast')?.then.code,
|
|
142
|
+
'HEURISTICS_VALIDATIONPIPE_GLOBAL_AST'
|
|
143
|
+
);
|
|
144
|
+
assert.equal(
|
|
145
|
+
byId.get('heuristics.ts.versionado-api-v1-api-v2.ast')?.then.code,
|
|
146
|
+
'HEURISTICS_VERSIONADO_API_V1_API_V2_AST'
|
|
147
|
+
);
|
|
148
|
+
assert.equal(
|
|
149
|
+
byId.get('heuristics.ts.validation-config.ast')?.then.code,
|
|
150
|
+
'HEURISTICS_VALIDATION_CONFIG_AST'
|
|
151
|
+
);
|
|
152
|
+
assert.equal(
|
|
153
|
+
byId.get('heuristics.ts.class-validator-decorators.ast')?.then.code,
|
|
154
|
+
'HEURISTICS_CLASS_VALIDATOR_DECORATORS_AST'
|
|
155
|
+
);
|
|
156
|
+
assert.equal(
|
|
157
|
+
byId.get('heuristics.ts.class-transformer-decorators.ast')?.then.code,
|
|
158
|
+
'HEURISTICS_CLASS_TRANSFORMER_DECORATORS_AST'
|
|
159
|
+
);
|
|
160
|
+
assert.equal(
|
|
161
|
+
byId.get('heuristics.ts.dtos-en-boundaries-validacio-n-en-entrada-salida.ast')?.then.code,
|
|
162
|
+
'HEURISTICS_DTOS_EN_BOUNDARIES_VALIDACIO_N_EN_ENTRADA_SALIDA_AST'
|
|
163
|
+
);
|
|
164
|
+
assert.equal(
|
|
165
|
+
byId.get('heuristics.ts.input-validation-siempre-validar-con-dtos.ast')?.then.code,
|
|
166
|
+
'HEURISTICS_INPUT_VALIDATION_SIEMPRE_VALIDAR_CON_DTOS_AST'
|
|
167
|
+
);
|
|
168
|
+
assert.equal(
|
|
169
|
+
byId.get('heuristics.ts.nested-validation-validatenested-type.ast')?.then.code,
|
|
170
|
+
'HEURISTICS_NESTED_VALIDATION_VALIDATENESTED_TYPE_AST'
|
|
171
|
+
);
|
|
172
|
+
assert.equal(
|
|
173
|
+
byId.get('heuristics.ts.dtos-separados-createorderdto-updateorderdto-orderresponsedto.ast')
|
|
174
|
+
?.then.code,
|
|
175
|
+
'HEURISTICS_DTOS_SEPARADOS_CREATEORDERDTO_UPDATEORDERDTO_ORDERRESPONSEDTO_AST'
|
|
176
|
+
);
|
|
177
|
+
assert.equal(
|
|
178
|
+
byId.get('heuristics.ts.return-dtos-no-exponer-entidades-directamente.ast')?.then.code,
|
|
179
|
+
'HEURISTICS_TS_RETURN_DTOS_NO_EXPONER_ENTIDADES_DIRECTAMENTE_AST'
|
|
180
|
+
);
|
|
181
|
+
assert.equal(
|
|
182
|
+
byId.get('heuristics.ts.transacciones-para-operaciones-cri-ticas.ast')?.then.code,
|
|
183
|
+
'HEURISTICS_TS_TRANSACCIONES_PARA_OPERACIONES_CRI_TICAS_AST'
|
|
184
|
+
);
|
|
185
|
+
assert.equal(
|
|
186
|
+
byId.get('heuristics.ts.transacciones-para-operaciones-multi-tabla.ast')?.then.code,
|
|
187
|
+
'HEURISTICS_TS_TRANSACCIONES_PARA_OPERACIONES_MULTI_TABLA_AST'
|
|
188
|
+
);
|
|
189
|
+
assert.equal(
|
|
190
|
+
byId.get('heuristics.ts.prometheus-prom-client.ast')?.then.code,
|
|
191
|
+
'HEURISTICS_PROMETHEUS_PROM_CLIENT_AST'
|
|
192
|
+
);
|
|
193
|
+
assert.equal(
|
|
194
|
+
byId.get('heuristics.ts.password-hashing-bcrypt-salt-rounds-10.ast')?.then.code,
|
|
195
|
+
'HEURISTICS_PASSWORD_HASHING_BCRYPT_SALT_ROUNDS_10_AST'
|
|
196
|
+
);
|
|
52
197
|
|
|
53
198
|
for (const rule of typescriptRules) {
|
|
54
199
|
assert.equal(rule.platform, 'generic');
|
|
55
|
-
if (
|
|
200
|
+
if (
|
|
201
|
+
rule.id === 'heuristics.ts.clean-architecture.ast' ||
|
|
202
|
+
rule.id === 'heuristics.ts.god-class-large-class.ast' ||
|
|
203
|
+
rule.id === 'heuristics.ts.magic-numbers.ast' ||
|
|
204
|
+
rule.id === 'heuristics.ts.hardcoded-values.ast' ||
|
|
205
|
+
rule.id === 'heuristics.ts.env-default-fallback.ast' ||
|
|
206
|
+
rule.id === 'heuristics.ts.guards-useguards-jwtauthguard.ast' ||
|
|
207
|
+
rule.id === 'heuristics.ts.no-sensitive-log.ast' ||
|
|
208
|
+
rule.id === 'heuristics.ts.rate-limiting-throttler.ast' ||
|
|
209
|
+
rule.id === 'heuristics.ts.react-class-component.ast' ||
|
|
210
|
+
rule.id === 'heuristics.ts.password-hashing-bcrypt-salt-rounds-10.ast'
|
|
211
|
+
) {
|
|
56
212
|
assert.equal(rule.severity, 'ERROR');
|
|
57
213
|
} else {
|
|
58
214
|
assert.equal(rule.severity, 'WARN');
|