@amityco/social-plus-vise 0.12.3 → 0.12.4
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/dist/tools/compliance.js +19 -8
- package/package.json +1 -1
- package/rules/feed.yaml +11 -6
package/dist/tools/compliance.js
CHANGED
|
@@ -358,14 +358,17 @@ export async function checkCompliance(repoPath) {
|
|
|
358
358
|
// If the current source now produces a finding, the old sync record must
|
|
359
359
|
// not mask code drift; the next `vise sync` will remove it.
|
|
360
360
|
if (attestation.status === "deterministic-pass") {
|
|
361
|
+
const failStatus = rule.advisory ? "advisory" : rule.enforcement.attestation.allowed ? "attestation-needed" : "deterministic-fail";
|
|
361
362
|
results.push({
|
|
362
363
|
ruleId: rule.id,
|
|
363
364
|
title: rule.title,
|
|
364
365
|
severity: rule.severity,
|
|
365
|
-
status:
|
|
366
|
-
reason: rule.
|
|
367
|
-
? "
|
|
368
|
-
:
|
|
366
|
+
status: failStatus,
|
|
367
|
+
reason: rule.advisory
|
|
368
|
+
? "Advisory: informational only — does not affect compliance status."
|
|
369
|
+
: rule.enforcement.attestation.allowed
|
|
370
|
+
? "Current deterministic check failed; previously synced deterministic-pass evidence is stale."
|
|
371
|
+
: "Current deterministic check failed; this rule does not allow attestation.",
|
|
369
372
|
finding,
|
|
370
373
|
recommendation: finding?.recommendation,
|
|
371
374
|
rationale: rule.rationale,
|
|
@@ -384,8 +387,10 @@ export async function checkCompliance(repoPath) {
|
|
|
384
387
|
ruleId: rule.id,
|
|
385
388
|
title: rule.title,
|
|
386
389
|
severity: rule.severity,
|
|
387
|
-
status: rule.enforcement.attestation.allowed ? "attestation-needed" : "deterministic-fail",
|
|
388
|
-
reason:
|
|
390
|
+
status: rule.advisory ? "advisory" : rule.enforcement.attestation.allowed ? "attestation-needed" : "deterministic-fail",
|
|
391
|
+
reason: rule.advisory
|
|
392
|
+
? "Advisory: informational only — does not affect compliance status."
|
|
393
|
+
: "Recorded attestation source fingerprints changed. Re-check the evidence and record a fresh attestation.",
|
|
389
394
|
finding,
|
|
390
395
|
recommendation: finding?.recommendation,
|
|
391
396
|
rationale: rule.rationale,
|
|
@@ -413,9 +418,14 @@ export async function checkCompliance(repoPath) {
|
|
|
413
418
|
continue;
|
|
414
419
|
}
|
|
415
420
|
}
|
|
416
|
-
const baseStatus =
|
|
421
|
+
const baseStatus = rule.advisory
|
|
422
|
+
? "advisory"
|
|
423
|
+
: (rule.enforcement.attestation.allowed || isInferential) ? "attestation-needed" : "deterministic-fail";
|
|
417
424
|
let fallbackReason = "This rule does not allow attestation.";
|
|
418
|
-
if (
|
|
425
|
+
if (rule.advisory) {
|
|
426
|
+
fallbackReason = "Advisory: informational only — does not affect compliance status.";
|
|
427
|
+
}
|
|
428
|
+
else if (isInferential) {
|
|
419
429
|
fallbackReason = "Inferential check required. Please provide a host-agent attestation.";
|
|
420
430
|
}
|
|
421
431
|
else if (rule.enforcement.attestation.allowed) {
|
|
@@ -436,6 +446,7 @@ export async function checkCompliance(repoPath) {
|
|
|
436
446
|
const summary = summarize(results);
|
|
437
447
|
const hasBlocked = results.some((result) => result.status === "blocked");
|
|
438
448
|
const hasDeterministicFailure = results.some((result) => result.status === "deterministic-fail");
|
|
449
|
+
// "advisory" status is intentionally excluded — advisory rules surface but never block.
|
|
439
450
|
const needsAttestation = results.some((result) => result.status === "attestation-needed" || result.status === "stale");
|
|
440
451
|
// Precedence: blocked (exit 3) > deterministic-failures (2) > needs-attestation (1) > green (0).
|
|
441
452
|
// Contract drift (exit 4) is handled earlier and short-circuits the loop.
|
package/package.json
CHANGED
package/rules/feed.yaml
CHANGED
|
@@ -1469,10 +1469,11 @@
|
|
|
1469
1469
|
},
|
|
1470
1470
|
{
|
|
1471
1471
|
"id": "typescript.reactions.configured-name-used",
|
|
1472
|
-
"version":
|
|
1472
|
+
"version": 2,
|
|
1473
1473
|
"title": "TypeScript reaction name matches console config",
|
|
1474
1474
|
"severity": "warning",
|
|
1475
|
-
"
|
|
1475
|
+
"advisory": true,
|
|
1476
|
+
"rationale": "Reaction names are configurable per-tenant. Hardcoding 'like' or another specific name prevents apps from dynamically matching the tenant's actual configuration, leading to silent failures or API errors. Advisory: Vise cannot verify tenant console config, so this surfaces as informational — it never blocks vise check.",
|
|
1476
1477
|
"applies_when": {
|
|
1477
1478
|
"platforms": [
|
|
1478
1479
|
"typescript"
|
|
@@ -1506,7 +1507,8 @@
|
|
|
1506
1507
|
},
|
|
1507
1508
|
{
|
|
1508
1509
|
"id": "react-native.reactions.configured-name-used",
|
|
1509
|
-
"version":
|
|
1510
|
+
"version": 2,
|
|
1511
|
+
"advisory": true,
|
|
1510
1512
|
"title": "React Native reaction name matches console config",
|
|
1511
1513
|
"severity": "warning",
|
|
1512
1514
|
"rationale": "Reaction names are configurable per-tenant. Hardcoding 'like' or another specific name prevents apps from dynamically matching the tenant's actual configuration, leading to silent failures or API errors.",
|
|
@@ -1543,7 +1545,8 @@
|
|
|
1543
1545
|
},
|
|
1544
1546
|
{
|
|
1545
1547
|
"id": "android.reactions.configured-name-used",
|
|
1546
|
-
"version":
|
|
1548
|
+
"version": 2,
|
|
1549
|
+
"advisory": true,
|
|
1547
1550
|
"title": "Android reaction name matches console config",
|
|
1548
1551
|
"severity": "warning",
|
|
1549
1552
|
"rationale": "Reaction names are configurable per-tenant. Hardcoding 'like' or another specific name prevents apps from dynamically matching the tenant's actual configuration, leading to silent failures or API errors.",
|
|
@@ -1580,7 +1583,8 @@
|
|
|
1580
1583
|
},
|
|
1581
1584
|
{
|
|
1582
1585
|
"id": "flutter.reactions.configured-name-used",
|
|
1583
|
-
"version":
|
|
1586
|
+
"version": 2,
|
|
1587
|
+
"advisory": true,
|
|
1584
1588
|
"title": "Flutter reaction name matches console config",
|
|
1585
1589
|
"severity": "warning",
|
|
1586
1590
|
"rationale": "Reaction names are configurable per-tenant. Hardcoding 'like' or another specific name prevents apps from dynamically matching the tenant's actual configuration, leading to silent failures or API errors.",
|
|
@@ -1617,7 +1621,8 @@
|
|
|
1617
1621
|
},
|
|
1618
1622
|
{
|
|
1619
1623
|
"id": "ios.reactions.configured-name-used",
|
|
1620
|
-
"version":
|
|
1624
|
+
"version": 2,
|
|
1625
|
+
"advisory": true,
|
|
1621
1626
|
"title": "iOS reaction name matches console config",
|
|
1622
1627
|
"severity": "warning",
|
|
1623
1628
|
"rationale": "Reaction names are configurable per-tenant. Hardcoding 'like' or another specific name prevents apps from dynamically matching the tenant's actual configuration, leading to silent failures or API errors.",
|