xploitscan-shared-rules 1.28.1 → 1.30.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.
- package/dist/index.cjs +373 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +372 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40,6 +40,7 @@ __export(index_exports, {
|
|
|
40
40
|
MODEL_TRIAGE: () => MODEL_TRIAGE,
|
|
41
41
|
NON_APP_PATH_PATTERNS: () => NON_APP_PATH_PATTERNS,
|
|
42
42
|
PRO_RULE_COUNT: () => PRO_RULE_COUNT,
|
|
43
|
+
QUALITY_EXAMPLES: () => QUALITY_EXAMPLES,
|
|
43
44
|
RULE_IMPACTS: () => RULE_IMPACTS,
|
|
44
45
|
TEST_FILE_PATTERN: () => TEST_FILE_PATTERN,
|
|
45
46
|
TOTAL_RULE_COUNT: () => TOTAL_RULE_COUNT,
|
|
@@ -12601,6 +12602,375 @@ var unassociatedLabel = {
|
|
|
12601
12602
|
}
|
|
12602
12603
|
};
|
|
12603
12604
|
|
|
12605
|
+
// src/quality/rules/failed-read-empty-state.ts
|
|
12606
|
+
var import_traverse5 = __toESM(require("@babel/traverse"), 1);
|
|
12607
|
+
var traverse4 = typeof import_traverse5.default === "function" ? import_traverse5.default : import_traverse5.default.default;
|
|
12608
|
+
var READ_ERROR_PATH_SIGNALS = ERROR_PATH_SIGNALS.filter(
|
|
12609
|
+
(re) => re.source !== /\.catch\s*\(/.source
|
|
12610
|
+
);
|
|
12611
|
+
function isEmptyCollectionLiteral(node) {
|
|
12612
|
+
if (node.type === "ArrayExpression") return node.elements.length === 0;
|
|
12613
|
+
if (node.type === "ObjectExpression") return node.properties.length === 0;
|
|
12614
|
+
return false;
|
|
12615
|
+
}
|
|
12616
|
+
var SETTER = /^set[A-Z][A-Za-z0-9_]*$/;
|
|
12617
|
+
function setterName(callee) {
|
|
12618
|
+
if (callee.type === "Identifier" && SETTER.test(callee.name)) return callee.name;
|
|
12619
|
+
return null;
|
|
12620
|
+
}
|
|
12621
|
+
function isPropertyRead(node) {
|
|
12622
|
+
return node.type === "MemberExpression" || node.type === "OptionalMemberExpression";
|
|
12623
|
+
}
|
|
12624
|
+
function emptyFallbackArgument(node) {
|
|
12625
|
+
if (node.type !== "LogicalExpression") return null;
|
|
12626
|
+
if (node.operator !== "||" && node.operator !== "??") return null;
|
|
12627
|
+
if (!isEmptyCollectionLiteral(node.right)) return null;
|
|
12628
|
+
if (!isPropertyRead(node.left)) return null;
|
|
12629
|
+
return node;
|
|
12630
|
+
}
|
|
12631
|
+
function isEffectCall(node) {
|
|
12632
|
+
if (node.type !== "CallExpression") return false;
|
|
12633
|
+
const callee = node.callee;
|
|
12634
|
+
const name = callee.type === "Identifier" ? callee.name : callee.type === "MemberExpression" && callee.property.type === "Identifier" ? callee.property.name : null;
|
|
12635
|
+
return name === "useEffect" || name === "useLayoutEffect";
|
|
12636
|
+
}
|
|
12637
|
+
function looksLikeComponent(path) {
|
|
12638
|
+
const parent = path.parent;
|
|
12639
|
+
if (parent.type === "VariableDeclarator" && parent.id.type === "Identifier") {
|
|
12640
|
+
return /^[A-Z]/.test(parent.id.name);
|
|
12641
|
+
}
|
|
12642
|
+
const node = path.node;
|
|
12643
|
+
if ((node.type === "FunctionDeclaration" || node.type === "FunctionExpression") && node.id && /^[A-Z]/.test(node.id.name)) {
|
|
12644
|
+
return true;
|
|
12645
|
+
}
|
|
12646
|
+
return false;
|
|
12647
|
+
}
|
|
12648
|
+
function unitFor(fetchPath) {
|
|
12649
|
+
let candidate = null;
|
|
12650
|
+
for (let fn = fetchPath.getFunctionParent(); fn !== null; fn = fn.getFunctionParent()) {
|
|
12651
|
+
if (looksLikeComponent(fn)) break;
|
|
12652
|
+
candidate = fn;
|
|
12653
|
+
if (fn.parent && isEffectCall(fn.parent)) return fn;
|
|
12654
|
+
}
|
|
12655
|
+
return candidate;
|
|
12656
|
+
}
|
|
12657
|
+
var failedReadEmptyState = {
|
|
12658
|
+
id: "QA009",
|
|
12659
|
+
title: "A failed read is rendered as an empty state",
|
|
12660
|
+
severity: "high",
|
|
12661
|
+
category: "Correctness",
|
|
12662
|
+
description: "This loader turns a failed or unexpected response into an empty list and renders it, so the page shows the same thing it would show a brand-new account: no sessions, no scans, no members. Nothing tells the user the request failed, and anything they do next \u2014 including saving \u2014 acts on data the app never actually received.",
|
|
12663
|
+
fix: "Check the response before using it: on a non-2xx, or a body without the field you expected, set an error state and render that instead of the empty state. Keep the `|| []` only for a response you have already confirmed arrived.",
|
|
12664
|
+
precisionNotes: "Client files only, and only a unit containing the literal global `fetch(` \u2014 throwing clients (ky, wretch, ofetch) reject on non-2xx, so `|| []` after them is correct, and in-file wrappers that check `.ok` and rethrow leave their callers containing no `fetch(` at all. The empty fallback must be `|| []`/`?? []`/`{}` over a PROPERTY READ passed straight to a `setX` state setter: `setRows(rows || [])` defaults a value the component already holds, and a pure helper's argument is never rendered. The unit is the effect callback, or the outermost non-component function \u2014 the nearest function cannot see the `.catch` below it, and the whole component would let an unrelated toast.error exonerate a broken loader. Exoneration is QA002's ERROR_PATH_SIGNALS with `.catch(` REMOVED: for a write a `.catch` means the author handled it, for a read `.catch(() => setLoaded(true))` is the defect itself. Measured at 6 fires over 5 sites in 437 real .tsx files with zero false positives, and silent on all three sites after they were fixed by hand.",
|
|
12665
|
+
check(ctx) {
|
|
12666
|
+
const hits = [];
|
|
12667
|
+
for (const file of ctx.files) {
|
|
12668
|
+
if (file.excluded) continue;
|
|
12669
|
+
if (!file.isClient) continue;
|
|
12670
|
+
if (file.isServer) continue;
|
|
12671
|
+
if (/^\s*["']use server["']/m.test(file.code)) continue;
|
|
12672
|
+
const parsed = file.parsed;
|
|
12673
|
+
if (!parsed) continue;
|
|
12674
|
+
const reported = /* @__PURE__ */ new Set();
|
|
12675
|
+
traverse4(parsed.ast, {
|
|
12676
|
+
CallExpression(path) {
|
|
12677
|
+
if (!isFetchCallee(path.node.callee)) return;
|
|
12678
|
+
const unit = unitFor(path);
|
|
12679
|
+
if (!unit) return;
|
|
12680
|
+
const start = nodeStart(unit.node);
|
|
12681
|
+
if (reported.has(start)) return;
|
|
12682
|
+
const unitSource = file.code.slice(start, nodeEnd(unit.node));
|
|
12683
|
+
if (READ_ERROR_PATH_SIGNALS.some((re) => re.test(unitSource))) return;
|
|
12684
|
+
let hit = null;
|
|
12685
|
+
unit.traverse({
|
|
12686
|
+
CallExpression(inner) {
|
|
12687
|
+
if (hit) return;
|
|
12688
|
+
const name = setterName(inner.node.callee);
|
|
12689
|
+
if (!name) return;
|
|
12690
|
+
const arg = inner.node.arguments[0];
|
|
12691
|
+
if (!arg) return;
|
|
12692
|
+
const fallback = emptyFallbackArgument(arg);
|
|
12693
|
+
if (!fallback) return;
|
|
12694
|
+
hit = { line: lineAt(file.content, nodeStart(fallback)), setter: name };
|
|
12695
|
+
}
|
|
12696
|
+
});
|
|
12697
|
+
if (!hit) return;
|
|
12698
|
+
reported.add(start);
|
|
12699
|
+
const { line, setter } = hit;
|
|
12700
|
+
hits.push({
|
|
12701
|
+
file: file.path,
|
|
12702
|
+
line,
|
|
12703
|
+
detail: `\`${setter}\` is handed an empty collection whenever this read fails or the body is missing that field, and nothing in this loader tells the user the request did not succeed. The page renders its empty state \u2014 the same screen a brand-new account sees.`
|
|
12704
|
+
});
|
|
12705
|
+
}
|
|
12706
|
+
});
|
|
12707
|
+
}
|
|
12708
|
+
return hits;
|
|
12709
|
+
}
|
|
12710
|
+
};
|
|
12711
|
+
|
|
12712
|
+
// src/quality/examples.ts
|
|
12713
|
+
var QUALITY_EXAMPLES = {
|
|
12714
|
+
QA001: {
|
|
12715
|
+
path: "supabase/functions/list-items/index.ts",
|
|
12716
|
+
language: "typescript",
|
|
12717
|
+
difference: "The catch answers with 500 and an error instead of 200 and an empty list, so the caller can tell a broken query from an account with no items.",
|
|
12718
|
+
vulnerable: `Deno.serve(async (req) => {
|
|
12719
|
+
try {
|
|
12720
|
+
const { data } = await supabase.from("items").select("*");
|
|
12721
|
+
return new Response(JSON.stringify({ items: data }), { status: 200 });
|
|
12722
|
+
} catch (err) {
|
|
12723
|
+
console.error(err);
|
|
12724
|
+
return new Response(JSON.stringify({ items: [] }), { status: 200 });
|
|
12725
|
+
}
|
|
12726
|
+
});`,
|
|
12727
|
+
safe: `Deno.serve(async (req) => {
|
|
12728
|
+
try {
|
|
12729
|
+
const { data } = await supabase.from("items").select("*");
|
|
12730
|
+
return new Response(JSON.stringify({ items: data }), { status: 200 });
|
|
12731
|
+
} catch (err) {
|
|
12732
|
+
console.error(err);
|
|
12733
|
+
return new Response(JSON.stringify({ error: "Could not load items" }), { status: 500 });
|
|
12734
|
+
}
|
|
12735
|
+
});`
|
|
12736
|
+
},
|
|
12737
|
+
QA009: {
|
|
12738
|
+
path: "app/settings/ApiKeysSection.tsx",
|
|
12739
|
+
language: "tsx",
|
|
12740
|
+
difference: "The loader checks the response and sets an error the page can render, so a failed read no longer looks like an account with no keys.",
|
|
12741
|
+
vulnerable: `"use client";
|
|
12742
|
+
|
|
12743
|
+
export function ApiKeysSection() {
|
|
12744
|
+
const [keys, setKeys] = useState([]);
|
|
12745
|
+
|
|
12746
|
+
const load = async () => {
|
|
12747
|
+
try {
|
|
12748
|
+
const res = await fetch("/api/api-keys");
|
|
12749
|
+
const data = await res.json();
|
|
12750
|
+
setKeys(data.keys || []);
|
|
12751
|
+
} catch {
|
|
12752
|
+
/* ignore */
|
|
12753
|
+
}
|
|
12754
|
+
};
|
|
12755
|
+
|
|
12756
|
+
useEffect(() => { load(); }, []);
|
|
12757
|
+
}`,
|
|
12758
|
+
safe: `"use client";
|
|
12759
|
+
|
|
12760
|
+
export function ApiKeysSection() {
|
|
12761
|
+
const [keys, setKeys] = useState([]);
|
|
12762
|
+
const [loadError, setLoadError] = useState(null);
|
|
12763
|
+
|
|
12764
|
+
const load = async () => {
|
|
12765
|
+
const res = await fetch("/api/api-keys");
|
|
12766
|
+
if (!res.ok) {
|
|
12767
|
+
setLoadError("Could not load your API keys. Try again.");
|
|
12768
|
+
return;
|
|
12769
|
+
}
|
|
12770
|
+
const data = await res.json();
|
|
12771
|
+
setKeys(data.keys ?? []);
|
|
12772
|
+
};
|
|
12773
|
+
|
|
12774
|
+
useEffect(() => { load(); }, []);
|
|
12775
|
+
}`
|
|
12776
|
+
},
|
|
12777
|
+
QA002: {
|
|
12778
|
+
path: "app/settings/ApiKeyRow.tsx",
|
|
12779
|
+
language: "tsx",
|
|
12780
|
+
difference: "The failure branch tells the user instead of returning silently, so a revoke that did not happen cannot show as one that did.",
|
|
12781
|
+
vulnerable: `"use client";
|
|
12782
|
+
import { toast } from "sonner";
|
|
12783
|
+
|
|
12784
|
+
export function ApiKeyRow({ keyId }) {
|
|
12785
|
+
async function handleRevoke() {
|
|
12786
|
+
const res = await fetch(\`/api/keys/\${keyId}/revoke\`, { method: "POST" });
|
|
12787
|
+
if (!res.ok) return;
|
|
12788
|
+
toast.success("API key revoked");
|
|
12789
|
+
}
|
|
12790
|
+
|
|
12791
|
+
return <button onClick={handleRevoke}>Revoke</button>;
|
|
12792
|
+
}`,
|
|
12793
|
+
safe: `"use client";
|
|
12794
|
+
import { toast } from "sonner";
|
|
12795
|
+
|
|
12796
|
+
export function ApiKeyRow({ keyId }) {
|
|
12797
|
+
async function handleRevoke() {
|
|
12798
|
+
const res = await fetch(\`/api/keys/\${keyId}/revoke\`, { method: "POST" });
|
|
12799
|
+
if (!res.ok) {
|
|
12800
|
+
toast.error("Could not revoke the key. Try again.");
|
|
12801
|
+
return;
|
|
12802
|
+
}
|
|
12803
|
+
toast.success("API key revoked");
|
|
12804
|
+
}
|
|
12805
|
+
|
|
12806
|
+
return <button onClick={handleRevoke}>Revoke</button>;
|
|
12807
|
+
}`
|
|
12808
|
+
},
|
|
12809
|
+
QA003: {
|
|
12810
|
+
path: "app/api/billing/webhook/route.ts",
|
|
12811
|
+
language: "typescript",
|
|
12812
|
+
difference: "The catch rethrows, so the row is not left saying a credit was issued that never left Stripe \u2014 and the webhook is redelivered.",
|
|
12813
|
+
vulnerable: `export async function POST(req) {
|
|
12814
|
+
const referral = await db.get("SELECT id FROM referrals WHERE status = 'pending' LIMIT 1");
|
|
12815
|
+
await db.run("UPDATE referrals SET status = 'rewarded' WHERE id = ?", referral.id);
|
|
12816
|
+
try {
|
|
12817
|
+
await stripe.customers.createBalanceTransaction(customerId, { amount: -1000, currency: "usd" });
|
|
12818
|
+
} catch (err) {
|
|
12819
|
+
logError("credit failed", err);
|
|
12820
|
+
}
|
|
12821
|
+
return new Response(JSON.stringify({ ok: true }), { status: 200 });
|
|
12822
|
+
}`,
|
|
12823
|
+
safe: `export async function POST(req) {
|
|
12824
|
+
const referral = await db.get("SELECT id FROM referrals WHERE status = 'pending' LIMIT 1");
|
|
12825
|
+
await db.run("UPDATE referrals SET status = 'rewarded' WHERE id = ?", referral.id);
|
|
12826
|
+
try {
|
|
12827
|
+
await stripe.customers.createBalanceTransaction(customerId, { amount: -1000, currency: "usd" });
|
|
12828
|
+
} catch (err) {
|
|
12829
|
+
logError("credit failed", err);
|
|
12830
|
+
throw err;
|
|
12831
|
+
}
|
|
12832
|
+
return new Response(JSON.stringify({ ok: true }), { status: 200 });
|
|
12833
|
+
}`
|
|
12834
|
+
},
|
|
12835
|
+
QA004: {
|
|
12836
|
+
path: "app/api/cron/cleanup/route.ts",
|
|
12837
|
+
language: "typescript",
|
|
12838
|
+
difference: 'The secret is read once and the handler refuses to run without it, so an unset variable can no longer make the comparison succeed against "Bearer undefined".',
|
|
12839
|
+
vulnerable: `export async function GET(req) {
|
|
12840
|
+
const auth = req.headers.get("authorization");
|
|
12841
|
+
if (auth !== \`Bearer \${process.env.CRON_SECRET}\`) {
|
|
12842
|
+
return new Response("Unauthorized", { status: 401 });
|
|
12843
|
+
}
|
|
12844
|
+
await purgeExpiredRows();
|
|
12845
|
+
return new Response("ok");
|
|
12846
|
+
}`,
|
|
12847
|
+
safe: `export async function GET(req) {
|
|
12848
|
+
const secret = process.env.CRON_SECRET;
|
|
12849
|
+
if (!secret) throw new Error("CRON_SECRET is not set");
|
|
12850
|
+
const auth = req.headers.get("authorization");
|
|
12851
|
+
if (auth !== \`Bearer \${secret}\`) {
|
|
12852
|
+
return new Response("Unauthorized", { status: 401 });
|
|
12853
|
+
}
|
|
12854
|
+
await purgeExpiredRows();
|
|
12855
|
+
return new Response("ok");
|
|
12856
|
+
}`
|
|
12857
|
+
},
|
|
12858
|
+
QA005: {
|
|
12859
|
+
path: "app/components/SortableTable.tsx",
|
|
12860
|
+
language: "tsx",
|
|
12861
|
+
difference: "The handler moves onto a real button, which the browser makes focusable, Enter- and Space-activatable, and announces as a control.",
|
|
12862
|
+
vulnerable: `export function SortableTable({ rows, onSort }) {
|
|
12863
|
+
return (
|
|
12864
|
+
<table>
|
|
12865
|
+
<thead>
|
|
12866
|
+
<tr>
|
|
12867
|
+
<th className="cursor-pointer select-none" onClick={() => onSort("name")}>
|
|
12868
|
+
Name
|
|
12869
|
+
</th>
|
|
12870
|
+
</tr>
|
|
12871
|
+
</thead>
|
|
12872
|
+
</table>
|
|
12873
|
+
);
|
|
12874
|
+
}`,
|
|
12875
|
+
safe: `export function SortableTable({ rows, onSort }) {
|
|
12876
|
+
return (
|
|
12877
|
+
<table>
|
|
12878
|
+
<thead>
|
|
12879
|
+
<tr>
|
|
12880
|
+
<th>
|
|
12881
|
+
<button type="button" className="cursor-pointer select-none" onClick={() => onSort("name")}>
|
|
12882
|
+
Name
|
|
12883
|
+
</button>
|
|
12884
|
+
</th>
|
|
12885
|
+
</tr>
|
|
12886
|
+
</thead>
|
|
12887
|
+
</table>
|
|
12888
|
+
);
|
|
12889
|
+
}`
|
|
12890
|
+
},
|
|
12891
|
+
QA006: {
|
|
12892
|
+
path: "app/components/ConfirmDialog.tsx",
|
|
12893
|
+
language: "tsx",
|
|
12894
|
+
difference: "The panel declares itself a modal dialog, takes focus when it opens and closes on Escape, so a screen reader announces it and a keyboard can reach and leave it.",
|
|
12895
|
+
vulnerable: `export function ConfirmDialog({ open, onClose, onConfirm }) {
|
|
12896
|
+
if (!open) return null;
|
|
12897
|
+
return (
|
|
12898
|
+
<div className="fixed inset-0 bg-black/50 flex items-center justify-center">
|
|
12899
|
+
<div className="bg-white rounded-xl p-6">
|
|
12900
|
+
<h2>Delete this project?</h2>
|
|
12901
|
+
<button onClick={onClose}>Cancel</button>
|
|
12902
|
+
<button onClick={onConfirm}>Delete</button>
|
|
12903
|
+
</div>
|
|
12904
|
+
</div>
|
|
12905
|
+
);
|
|
12906
|
+
}`,
|
|
12907
|
+
safe: `export function ConfirmDialog({ open, onClose, onConfirm }) {
|
|
12908
|
+
const ref = useRef(null);
|
|
12909
|
+
useEffect(() => {
|
|
12910
|
+
if (!open) return;
|
|
12911
|
+
ref.current?.focus();
|
|
12912
|
+
const onKey = (e) => { if (e.key === "Escape") onClose(); };
|
|
12913
|
+
document.addEventListener("keydown", onKey);
|
|
12914
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
12915
|
+
}, [open, onClose]);
|
|
12916
|
+
|
|
12917
|
+
if (!open) return null;
|
|
12918
|
+
return (
|
|
12919
|
+
<div className="fixed inset-0 bg-black/50 flex items-center justify-center">
|
|
12920
|
+
<div
|
|
12921
|
+
role="dialog"
|
|
12922
|
+
aria-modal="true"
|
|
12923
|
+
aria-labelledby="confirm-title"
|
|
12924
|
+
ref={ref}
|
|
12925
|
+
tabIndex={-1}
|
|
12926
|
+
className="bg-white rounded-xl p-6"
|
|
12927
|
+
>
|
|
12928
|
+
<h2 id="confirm-title">Delete this project?</h2>
|
|
12929
|
+
<button onClick={onClose}>Cancel</button>
|
|
12930
|
+
<button onClick={onConfirm}>Delete</button>
|
|
12931
|
+
</div>
|
|
12932
|
+
</div>
|
|
12933
|
+
);
|
|
12934
|
+
}`
|
|
12935
|
+
},
|
|
12936
|
+
QA007: {
|
|
12937
|
+
path: "app/api/orders/route.ts",
|
|
12938
|
+
language: "typescript",
|
|
12939
|
+
difference: "The query takes a bounded page, so one account with years of history cannot decide how much memory the request uses.",
|
|
12940
|
+
vulnerable: `export async function GET(req) {
|
|
12941
|
+
const userId = await requireUser(req);
|
|
12942
|
+
const orders = await prisma.order.findMany({ where: { userId } });
|
|
12943
|
+
return Response.json({ orders });
|
|
12944
|
+
}`,
|
|
12945
|
+
safe: `export async function GET(req) {
|
|
12946
|
+
const userId = await requireUser(req);
|
|
12947
|
+
const orders = await prisma.order.findMany({ where: { userId }, take: 50 });
|
|
12948
|
+
return Response.json({ orders });
|
|
12949
|
+
}`
|
|
12950
|
+
},
|
|
12951
|
+
QA008: {
|
|
12952
|
+
path: "app/components/SignupForm.tsx",
|
|
12953
|
+
language: "tsx",
|
|
12954
|
+
difference: "The label points at the input, so a screen reader reads the field's name and clicking the text focuses the field.",
|
|
12955
|
+
vulnerable: `export function SignupForm() {
|
|
12956
|
+
return (
|
|
12957
|
+
<form>
|
|
12958
|
+
<label>Email address</label>
|
|
12959
|
+
<input type="email" name="email" />
|
|
12960
|
+
</form>
|
|
12961
|
+
);
|
|
12962
|
+
}`,
|
|
12963
|
+
safe: `export function SignupForm() {
|
|
12964
|
+
return (
|
|
12965
|
+
<form>
|
|
12966
|
+
<label htmlFor="email">Email address</label>
|
|
12967
|
+
<input id="email" type="email" name="email" />
|
|
12968
|
+
</form>
|
|
12969
|
+
);
|
|
12970
|
+
}`
|
|
12971
|
+
}
|
|
12972
|
+
};
|
|
12973
|
+
|
|
12604
12974
|
// src/quality/index.ts
|
|
12605
12975
|
var qualityRules = [
|
|
12606
12976
|
silentFailedRead,
|
|
@@ -12610,7 +12980,8 @@ var qualityRules = [
|
|
|
12610
12980
|
mouseOnlyControl,
|
|
12611
12981
|
undeclaredModal,
|
|
12612
12982
|
unboundedList,
|
|
12613
|
-
unassociatedLabel
|
|
12983
|
+
unassociatedLabel,
|
|
12984
|
+
failedReadEmptyState
|
|
12614
12985
|
];
|
|
12615
12986
|
function scanQuality(files, rules = qualityRules) {
|
|
12616
12987
|
const ctx = buildQualityContext(files);
|
|
@@ -12657,6 +13028,7 @@ function scanQuality(files, rules = qualityRules) {
|
|
|
12657
13028
|
MODEL_TRIAGE,
|
|
12658
13029
|
NON_APP_PATH_PATTERNS,
|
|
12659
13030
|
PRO_RULE_COUNT,
|
|
13031
|
+
QUALITY_EXAMPLES,
|
|
12660
13032
|
RULE_IMPACTS,
|
|
12661
13033
|
TEST_FILE_PATTERN,
|
|
12662
13034
|
TOTAL_RULE_COUNT,
|