Repository navigation
Expand file tree
/
Copy pathcategories.yml
More file actions
133 lines (121 loc) · 8.53 KB
/
Copy pathcategories.yml
File metadata and controls
133 lines (121 loc) · 8.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Own.NET Audit — category taxonomy (knowledge base).
#
# Maps each analyzer's ruleId (exact, or a glob like `IDISP0*` / `*RESOURCE_LEAK`)
# to one of the problem categories defined in Plan.md §2. normalize.py reads this
# and labels every SARIF result. Rules with NO mapping are NOT dropped — they land
# in `uncategorized` and are surfaced in the report's coverage section, so the
# taxonomy grows deliberately instead of swallowing findings (same discipline as
# oracle_compare's unparsed-line bucket).
#
# Precedence: an exact ruleId match wins over a glob; among globs, the most
# specific (longest non-wildcard prefix) wins.
rules:
# ── Category 1: IDisposable leak (local/field, dispose-on-throw) ──────────────
CA2000: {category: 1, name: idisposable-leak}
CA2213: {category: 1, name: idisposable-leak}
"IDISP0*": {category: 1, name: idisposable-leak} # IDisposableAnalyzers
"cs/local-not-disposed": {category: 1, name: idisposable-leak}
"cs/missing-dispose": {category: 1, name: idisposable-leak}
"cs/dispose-not-called-on-throw": {category: 1, name: idisposable-leak}
"*RESOURCE_LEAK": {category: 1, name: idisposable-leak} # Infer#: (PULSE_)RESOURCE_LEAK
"*MEMORY_LEAK": {category: 1, name: idisposable-leak}
# ── own-check OWN001 is an UMBRELLA leak code ────────────────────────────────
# One ruleId covers IDisposable fields/locals, subscription tokens and timers;
# the `[resource: ...]` tag in the message text distinguishes them. A flat
# OWN001 -> cat.1 would collapse subscription/timer leaks (cat. 2/3) into the
# IDisposable bucket and undercount them, so normalize.py splits on the tag.
OWN001:
by_resource: # key matched against [resource: KEY]
"subscription token": {category: 2, name: subscription-leak}
"timer": {category: 3, name: timer-leak}
"*": {category: 1, name: idisposable-leak} # disposable / disposable field / pooled buffer
# ── Category 2: event/subscription leak & region escape ──────────────────────
OWN014: {category: 2, name: region-escape} # escape to a longer-lived region
# (vm->App, SystemEvents) — NOT a
# generic subscription-leak
# XAML Phase-2 join: a view (x:Class) that subscribes from a load-lifecycle handler
# but never releases (OwnIR released=false). Categorized as a subscription leak and
# anchored at the code-behind subscription site, so it lands at the same file+line as
# own-check's OWN001 and CLUSTERS with it into one high-confidence finding (two
# sources agree — Plan.md §3.5), tagging it as a view-lifecycle leak rather than
# double-reporting it on a separate .xaml line.
"XAML203": {category: 2, name: xaml-subscription-leak}
# ── Category 5: INPC correctness ─────────────────────────────────────────────
"INPC0*": {category: 5, name: inpc-correctness} # PropertyChangedAnalyzers
# ── Category 9: WPF Freezable / per-instance brush-geometry (partial) ────────
"WPF0*": {category: 9, name: wpf-freezable} # WpfAnalyzers (subset)
# ── XAML analyzer (build-free markup pass) — docs/notes/xaml-analyzer-design.md.
# XAML is a SECOND fact source, not a parallel linter: each rule maps to one of
# the same Plan.md §2 categories so a markup finding rides the same fingerprint
# -> baseline -> ratchet path as a .cs finding. Exact ids win over the XAML1*
# glob, which is a safety net so a not-yet-mapped XAML rule never lands in
# `uncategorized` (the design note's "nothing quietly falls through").
"XAML100": {category: 9, name: resource-hoist} # heavy resource duplicated per-scope
"XAML107": {category: 8, name: broken-virtualization} # virtualization disabled
"XAML109": {category: 8, name: template-complexity} # visual-tree inflation
"XAML108": {category: 6, name: binding-update-frequency} # per-keystroke source flood
"XAML106": {category: 9, name: wpf-freezable} # Freezable not frozen
"XAML101": {category: 9, name: per-instance-resource} # duplicate converter
"XAML102": {category: 9, name: dynamic-resource-misuse} # DynamicResource for a static key
"XAML103": {category: 9, name: per-instance-resource} # x:Shared=False
"XAML104": {category: 9, name: merged-dictionary-waste} # duplicate merged dict
"XAML105": {category: 9, name: merged-dictionary-shadowing} # order-dependent key collision
"XAML110": {category: 9, name: image-decode} # full-size thumbnail decode
"XAML111": {category: 8, name: layout-cost} # LayoutTransform layout pass
"XAML112": {category: 9, name: template-binding-opportunity} # cheaper compiled binding
"XAML113": {category: 9, name: per-instance-resource} # duplicated inline freezable
"XAML1*": {category: 9, name: xaml-markup-perf} # safety net for future rules
# ── Category 14: general bugs / perf / best-practice / async ──────────────────
"CA1*": {category: 14, name: general-quality} # NetAnalyzers design/perf
"CA2*": {category: 14, name: general-quality} # (CA2000/CA2213 above win by exactness)
"S*": {category: 14, name: general-quality} # SonarAnalyzer.CSharp
"RCS*": {category: 14, name: general-quality} # Roslynator
"MA0*": {category: 14, name: general-quality} # Meziantou.Analyzer
"AsyncFixer*": {category: 14, name: general-quality}
"cs/*": {category: 14, name: general-quality} # CodeQL security-and-quality (leak ids above win)
# ── Category 15: architecture metrics / hotspots ─────────────────────────────
"RCS1*": {category: 15, name: architecture} # Roslynator maintainability subset
# ── RUNTIME tier (Plan.md §4) — emitted by audit/runtime/ (leak-harness, ClrMD
# duplicate detector). These categories are NO-TOOL for static analysis, so the
# runtime layer is the ONLY tool that covers them. A runtime finding that lands
# in the same file/category as a static one clusters with it -> high confidence
# (the static→runtime confirmation in Plan.md §3.5).
"RUNTIME-LEAK-SUBSCRIPTION": {category: 2, name: subscription-leak}
"RUNTIME-LEAK-TIMER": {category: 3, name: timer-leak}
"RUNTIME-DPD-ADDVALUECHANGED": {category: 4, name: dpd-addvaluechanged-leak}
"RUNTIME-DUP-IMMUTABLE": {category: 11, name: duplicate-immutable}
"RUNTIME-PROPCHANGED-STORM": {category: 6, name: propertychanged-storm} # raise-frequency,
# NOT INPC0xx correctness (cat. 5) — a storm
# in the same file as an INPC0xx hit clusters
# with it -> high confidence (§3.5)
# Baseline P-level per category (Plan.md §3.5.2). Confidence (cross-tool
# agreement) is a SEPARATE axis handled by score.py; this is severity only.
category_severity:
1: P1 # leaks — the high-value classes
2: P1
3: P1
4: P1 # DependencyPropertyDescriptor.AddValueChanged leak (runtime-confirmed)
5: P2
6: P2 # PropertyChanged storms/cascades — runtime raise-frequency, perf-tier
8: P2 # broken/disabled virtualization — now statically covered by the XAML pass
9: P2
11: P2 # duplicated immutable data — memory bloat (the project's "gold"), perf-tier
14: P2
15: P3
0: P3 # uncategorized
# DevExpress baseline-suppress (Plan.md §3.4, confirmed decision). Findings whose
# path OR message contains one of these tokens are third-party noise: dropped from
# the main report but COUNTED and reported in the coverage section — nothing is
# hidden silently. This is an honest third-party-namespace filter, not a regex
# heuristic over our own code.
suppress:
path_or_message_contains:
- "DevExpress."
# Analysis-skipped / coverage NOTES — diagnostics that are NOT verdicts. own-check
# emits OWN050 ("cannot verify X — unresolved") at SARIF level: note when it cannot
# analyze something. These must NOT be scored as findings: left in, they would show
# up as uncategorized P3 candidates and add phantom pain. Instead they are routed to
# the coverage ledger (analysis-skipped count) — the honest "we didn't see here",
# the same discipline as own-check's own OWN050.
coverage_notes:
- "OWN050"