@microsoft/sarif-multitool-darwin 4.6.5 → 5.0.1

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/Sarif.xml CHANGED
@@ -6866,6 +6866,330 @@
6866
6866
  Enables a trace message that summarizes all results and notification by id and severity.
6867
6867
  </summary>
6868
6868
  </member>
6869
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention">
6870
+ <summary>
6871
+ Enforces the SARIF SDK AI-authoring convention for <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>.
6872
+ </summary>
6873
+ <remarks>
6874
+ <para>The emit verb chain (and any future AI-facing acceptor on top of the same SDK)
6875
+ is opinionated about what a well-shaped AI finding's <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>
6876
+ looks like. Every accepted result MUST carry a ruleId in one of two forms:</para>
6877
+ <list type="bullet">
6878
+ <item><description><b>Taxonomy sub-id</b> — <c>&lt;BASE&gt;/&lt;sub-id&gt;</c> where
6879
+ <c>BASE</c> is a recognized taxonomy entry id (e.g., <c>CWE-89</c>,
6880
+ <c>CVE-2021-12345</c>, <c>OWASP-A01-2021</c>) and <c>sub-id</c> is a non-empty
6881
+ AI-chosen sub-classifier with no slashes or whitespace
6882
+ (e.g., <c>CWE-89/kql-injection-from-config</c>).</description></item>
6883
+ <item><description><b>NOVEL escape hatch</b> — <c>NOVEL-&lt;sub-id&gt;</c> for
6884
+ findings that don't map to any known taxonomy entry
6885
+ (e.g., <c>NOVEL-prompt-injection-via-system-message</c>). The NOVEL- form is
6886
+ exclusive: it does not accept a slash. If the AI can connect the finding back to
6887
+ a taxonomy entry it MUST use the sub-id form instead.</description></item>
6888
+ </list>
6889
+ <para>Rationale: the sub-id form keeps AI1012 silent (sub-classification is what
6890
+ the rule wants) AND lets the CWE taxonomy enricher hydrate the base descriptor
6891
+ from MITRE metadata, so the AI gets enriched output for free while staying
6892
+ honest about which sub-pattern of the base it observed. The NOVEL- form keeps
6893
+ non-taxonomy findings emittable without forcing the AI to pretend a CWE applies.
6894
+ See <c>docs/AI-RuleId-Convention.md</c> for the full rationale and examples.</para>
6895
+ <para>Producers using <see cref="T:Microsoft.CodeAnalysis.Sarif.Writers.SarifLogger"/> directly do not flow through
6896
+ this convention — it is specific to the AI-authoring emit verb path.</para>
6897
+ </remarks>
6898
+ </member>
6899
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsNovel(System.String)">
6900
+ <summary>
6901
+ Returns true when <paramref name="ruleId"/> starts with the NOVEL- escape-hatch
6902
+ prefix. The full grammar is enforced by <see cref="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsAcceptable(System.String)"/>; this helper
6903
+ is for consumers (e.g., the AI1012 validation rule) that just need to know
6904
+ whether the ruleId is a NOVEL- finding and therefore already sub-id-bearing by
6905
+ convention.
6906
+ </summary>
6907
+ </member>
6908
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsAcceptable(System.String)">
6909
+ <summary>
6910
+ Returns true when <paramref name="ruleId"/> conforms to one of the two AI ruleId
6911
+ shapes (taxonomy sub-id or NOVEL- prefix). Null and empty are rejected.
6912
+ </summary>
6913
+ </member>
6914
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.ThrowIfUnacceptable(System.String)">
6915
+ <summary>
6916
+ Throws <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> if <paramref name="ruleId"/>
6917
+ does not conform. The thrown message is shaped for AI consumption: it states
6918
+ what was rejected, why, and exactly which two forms are accepted.
6919
+ </summary>
6920
+ </member>
6921
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.ThrowIfAnyUnacceptable(System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.Result})">
6922
+ <summary>
6923
+ Validates every result's <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>. If any violate the convention,
6924
+ throws a single <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> that lists ALL offenders
6925
+ so an AI orchestrator can correct them in one round trip rather than discovering
6926
+ them one at a time.
6927
+ </summary>
6928
+ </member>
6929
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException">
6930
+ <summary>
6931
+ Thrown by the AI-authoring emit chain when one or more <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>
6932
+ values violate <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention"/>.
6933
+ </summary>
6934
+ <remarks>
6935
+ <para>The exception's <see cref="P:System.Exception.Message"/> is intentionally shaped for AI
6936
+ consumption: it lists every offending id, explains the two accepted shapes with
6937
+ concrete examples, and points at the documentation. A coding agent that catches the
6938
+ emitted text (e.g., from <c>multitool emit-finalize</c> stderr) can read it directly,
6939
+ correct every offender, and retry — no separate parsing of structured fields is
6940
+ required for the common case. The <see cref="P:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.OffendingRuleIds"/> property is exposed
6941
+ for programmatic consumers that prefer structured data.</para>
6942
+ </remarks>
6943
+ </member>
6944
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.ErrorCode">
6945
+ <summary>
6946
+ Stable error code so downstream tooling can pattern-match without parsing the
6947
+ human-readable message body.
6948
+ </summary>
6949
+ </member>
6950
+ <member name="P:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.OffendingRuleIds">
6951
+ <summary>
6952
+ The rejected <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/> values, in source order. An empty string
6953
+ in this list represents a result that supplied no ruleId at all.
6954
+ </summary>
6955
+ </member>
6956
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.AtomicSarifWriter">
6957
+ <summary>
6958
+ Atomically writes a SARIF file by staging to a sibling temp file in the same directory
6959
+ and renaming over the destination.
6960
+ </summary>
6961
+ <remarks>
6962
+ <para>The staging file is placed in the same directory as the destination so the final
6963
+ rename is a within-volume operation, which is atomic on every supported filesystem.</para>
6964
+ <para>If the rename fails, the staging file is removed to avoid leaving turds behind.</para>
6965
+ <para>The <c>writeContent</c> callback receives the underlying <see cref="T:System.IO.FileStream"/>;
6966
+ callers MAY dispose any wrapper they construct (e.g., a <see cref="T:System.IO.StreamWriter"/>) — the
6967
+ final fsync is best-effort and tolerates an already-disposed stream.</para>
6968
+ </remarks>
6969
+ </member>
6970
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AtomicSarifWriter.Write(System.String,System.Action{System.IO.Stream})">
6971
+ <summary>
6972
+ Stages writing via <paramref name="writeContent"/>, then atomically replaces
6973
+ <paramref name="destinationPath"/>.
6974
+ </summary>
6975
+ </member>
6976
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEvent">
6977
+ <summary>
6978
+ One line of the append-only event log that backs incremental SARIF authoring.
6979
+ </summary>
6980
+ <remarks>
6981
+ Wire shape: <c>{"v":1,"kind":"&lt;kind&gt;","payload":{ ... }}</c>.
6982
+ The payload is a SARIF object (Run header, Result, Notification, or Invocation) and is
6983
+ preserved as a <see cref="T:Newtonsoft.Json.Linq.JToken"/> until consumers deserialize it into the appropriate
6984
+ strongly-typed SDK object.
6985
+ </remarks>
6986
+ </member>
6987
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds">
6988
+ <summary>
6989
+ Canonical event kinds for the JSONL event log that backs incremental SARIF authoring.
6990
+ </summary>
6991
+ <remarks>
6992
+ The event log shape is:
6993
+ <code>{"v":1,"kind":"&lt;kind&gt;","payload":{ ... }}</code>
6994
+ Readers MAY skip unknown <c>kind</c> values when the schema version <c>v</c> is supported;
6995
+ readers MUST fail when <c>v</c> is unknown for a known <c>kind</c>.
6996
+ </remarks>
6997
+ </member>
6998
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.RunHeader">
6999
+ <summary>
7000
+ A partial <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/> skeleton (everything except <c>results</c>, <c>invocations</c>,
7001
+ and <c>notifications</c>, which arrive as separate events). MUST appear at most once per
7002
+ event log; SHOULD be the first event in the log.
7003
+ </summary>
7004
+ </member>
7005
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Result">
7006
+ <summary>
7007
+ A single self-contained <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Result"/>. Self-contained means the result
7008
+ SHALL NOT carry index references (<c>ruleIndex</c>, <c>artifactLocation.index</c>,
7009
+ etc.) into run-level caches. Use <c>ruleId</c> rather than <c>ruleIndex</c>; the
7010
+ replay engine auto-registers descriptors keyed by <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>.
7011
+ </summary>
7012
+ </member>
7013
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.ExecutionNotification">
7014
+ <summary>
7015
+ A self-contained <see cref="T:Microsoft.CodeAnalysis.Sarif.Notification"/> destined for
7016
+ <c>invocations[last].toolExecutionNotifications</c>. The replay engine routes events
7017
+ of this kind to the execution-notifications array.
7018
+ </summary>
7019
+ </member>
7020
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.ConfigurationNotification">
7021
+ <summary>
7022
+ A self-contained <see cref="T:Microsoft.CodeAnalysis.Sarif.Notification"/> destined for
7023
+ <c>invocations[last].toolConfigurationNotifications</c>. The replay engine routes
7024
+ events of this kind to the configuration-notifications array.
7025
+ </summary>
7026
+ </member>
7027
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation">
7028
+ <summary>
7029
+ A complete <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation"/> object. Producers may append multiple
7030
+ invocations per run.
7031
+ </summary>
7032
+ </member>
7033
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.RuleDescriptor">
7034
+ <summary>
7035
+ A single <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at <c>run.tool.driver.rules</c>.
7036
+ Emitted by the <c>add-reporting-descriptor --rules</c> verb. The replayer appends the
7037
+ descriptor to the rules list before result-driven auto-registration runs, so an
7038
+ explicitly-supplied descriptor wins over the minimal one that would otherwise be
7039
+ synthesized from a result's <c>ruleId</c>. The verb enforces
7040
+ <see cref="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsNovel(System.String)"/> on the descriptor id — this kind is
7041
+ reserved for NOVEL- novel-finding descriptors. Taxonomy-mapped descriptors (e.g.,
7042
+ <c>CWE-89</c>) come from the taxonomy enricher, not from this event.
7043
+ </summary>
7044
+ </member>
7045
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.NotificationDescriptor">
7046
+ <summary>
7047
+ A single <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at
7048
+ <c>run.tool.driver.notifications</c>. Emitted by the <c>add-reporting-descriptor</c>
7049
+ verb (default target). Notifications use opaque ids by convention (e.g.,
7050
+ <c>progress</c>, <c>config-error</c>) and carry no convention gate — any non-empty id
7051
+ is accepted. The replayer appends the descriptor to the notifications list verbatim.
7052
+ </summary>
7053
+ </member>
7054
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.CurrentSchemaVersion">
7055
+ <summary>The current event-log schema version.</summary>
7056
+ </member>
7057
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogException">
7058
+ <summary>
7059
+ Thrown when the event log is malformed, corrupt, locked, or carries an unsupported
7060
+ schema version for a known kind.
7061
+ </summary>
7062
+ </member>
7063
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogReader">
7064
+ <summary>
7065
+ Forward-only reader for a SARIF event log.
7066
+ </summary>
7067
+ <remarks>
7068
+ <para>Tolerates both LF and CRLF line endings (per JSONL convention; emits LF). Tolerates a
7069
+ single optional UTF-8 BOM at the start of the stream; rejects BOM elsewhere.</para>
7070
+ <para>Unknown event <c>kind</c> values at the current schema version are skipped (forward
7071
+ compatibility). Unknown schema <c>v</c> on a known kind is fatal.</para>
7072
+ <para>Malformed JSON on any line is fatal; the reader reports the 1-based line number and
7073
+ reason.</para>
7074
+ </remarks>
7075
+ </member>
7076
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogReader.Read(System.String)">
7077
+ <summary>
7078
+ Streams events from the given path. Unknown kinds at supported schema versions are
7079
+ silently skipped. Unknown <c>v</c> for a known kind throws.
7080
+ </summary>
7081
+ </member>
7082
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter">
7083
+ <summary>
7084
+ Append-only writer for a SARIF event log (<c>*.sarif.wip.jsonl</c>).
7085
+ </summary>
7086
+ <remarks>
7087
+ <para>The writer opens the target file with <see cref="F:System.IO.FileShare.Read"/> sharing. On
7088
+ Windows this rejects a concurrent second writer with an <see cref="T:System.IO.IOException"/>; on
7089
+ POSIX the .NET runtime does not enforce FileShare.Read against subsequent opens, so
7090
+ the cross-process exclusive-write guarantee is Windows-only. The emit chain's
7091
+ canonical use is single-process JSONL append; callers should not rely on cross-process
7092
+ locking on Linux/macOS.</para>
7093
+ <para>If the file exists and does not end with a newline, the prior writer was interrupted
7094
+ mid-line; the writer rejects the file with a <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogException"/> rather
7095
+ than risk concatenating bytes to a torn line. This is best-effort: a crash AFTER a partial
7096
+ write of the current line but BEFORE the trailing <c>\n</c> still leaves a torn line; the
7097
+ torn-line check protects subsequent <em>append</em> sessions, not the in-progress one.</para>
7098
+ <para>Every event is serialized to a single UTF-8 line terminated with <c>\n</c>. After
7099
+ each line the writer calls <see cref="M:System.IO.FileStream.Flush"/> (managed buffer to OS buffer)
7100
+ — NOT <c>Flush(flushToDisk: true)</c>. The line is durably committed at <c>Dispose</c>
7101
+ when the underlying <see cref="T:System.IO.FileStream"/> flushes and closes; the final SARIF artifact
7102
+ is the durable-write contract, written via <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AtomicSarifWriter"/>.</para>
7103
+ </remarks>
7104
+ </member>
7105
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter.Append(System.String,Newtonsoft.Json.Linq.JToken)">
7106
+ <summary>Appends an event with the given kind and payload.</summary>
7107
+ </member>
7108
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter.Append(System.String,System.Object)">
7109
+ <summary>Appends an event whose payload is a strongly-typed SARIF object.</summary>
7110
+ </member>
7111
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter.EnsureNoTornTrailingLine(System.String)">
7112
+ <summary>
7113
+ If the file exists and is non-empty, verify its last byte is <c>\n</c>; otherwise the
7114
+ prior writer was interrupted mid-line and the file is in an unrecoverable state for
7115
+ safe append.
7116
+ </summary>
7117
+ </member>
7118
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer">
7119
+ <summary>
7120
+ Replays a SARIF event log into an in-memory <see cref="T:Microsoft.CodeAnalysis.Sarif.SarifLog"/>.
7121
+ </summary>
7122
+ <remarks>
7123
+ <para>v1 contract:</para>
7124
+ <list type="bullet">
7125
+ <item><description>At most one <c>run-header</c> event; if present, it SHOULD be first.
7126
+ The header MAY carry a partial <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/> shape (tool, language, columnKind,
7127
+ defaultEncoding, defaultSourceLanguage, originalUriBaseIds, versionControlProvenance,
7128
+ automationDetails, baselineGuid, redactionTokens, etc.). <c>results</c>, <c>invocations</c>,
7129
+ and <c>notifications</c> on a header are ignored — those belong in their own events.</description></item>
7130
+ <item><description><c>result</c> events MUST be self-contained: <c>ruleIndex</c> is ignored
7131
+ (re-derived from <c>ruleId</c>); index references into run-level caches are not validated
7132
+ in v1 (producers needing indexed references should use <see cref="T:Microsoft.CodeAnalysis.Sarif.Writers.SarifLogger"/>
7133
+ directly). Every <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/> MUST conform to
7134
+ <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention"/> — taxonomy sub-id form
7135
+ (<c>&lt;BASE&gt;/&lt;sub-id&gt;</c>, e.g., <c>CWE-89/kql-injection-from-config</c>) or
7136
+ NOVEL escape hatch (<c>NOVEL-&lt;sub-id&gt;</c>). Violations throw
7137
+ <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> listing every offender at once.</description></item>
7138
+ <item><description><c>invocation</c> events are appended to <c>run.invocations</c> in
7139
+ event order.</description></item>
7140
+ <item><description><c>execution-notification</c> events are buffered and attached at
7141
+ finalize to <c>run.invocations[last].toolExecutionNotifications</c>;
7142
+ <c>configuration-notification</c> events to
7143
+ <c>run.invocations[last].toolConfigurationNotifications</c>. If no invocation has been
7144
+ supplied, a synthetic <c>{ "executionSuccessful": true }</c> invocation is created to
7145
+ hold them (SARIF requires a home for notifications). Notifications whose <c>timeUtc</c>
7146
+ is unset on the event payload are stamped with <see cref="P:System.DateTime.UtcNow"/> at
7147
+ replay time so AI execution-timeline consumers can order events without burdening
7148
+ producers to track wall-clock themselves (cf. AI2019). Producer-supplied
7149
+ <c>timeUtc</c> values are preserved.</description></item>
7150
+ </list>
7151
+ <para>Descriptor auto-registration mirrors <see cref="T:Microsoft.CodeAnalysis.Sarif.Writers.SarifLogger"/>: on first
7152
+ sighting of a <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>, the replayer appends a minimal
7153
+ <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> to <c>run.tool.driver.rules</c> and back-fills
7154
+ <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleIndex"/>.</para>
7155
+ </remarks>
7156
+ </member>
7157
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.Replay(System.String)">
7158
+ <summary>
7159
+ Reads the event log at <paramref name="eventLogPath"/> and returns a
7160
+ <see cref="T:Microsoft.CodeAnalysis.Sarif.SarifLog"/> with a single <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/>.
7161
+ </summary>
7162
+ </member>
7163
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.Replay(System.Collections.Generic.IEnumerable{Microsoft.CodeAnalysis.Sarif.Emit.SarifEvent})">
7164
+ <summary>
7165
+ Reads the supplied <paramref name="events"/> and returns a <see cref="T:Microsoft.CodeAnalysis.Sarif.SarifLog"/> with
7166
+ a single <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/>.
7167
+ </summary>
7168
+ </member>
7169
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.ReplayToFile(System.String,System.String,System.Boolean)">
7170
+ <summary>
7171
+ Replays the event log and writes the resulting <see cref="T:Microsoft.CodeAnalysis.Sarif.SarifLog"/> atomically to
7172
+ <paramref name="destinationPath"/>.
7173
+ </summary>
7174
+ </member>
7175
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.MergeDescriptors(System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.ReportingDescriptor},System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.ReportingDescriptor},System.String,System.Action{System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.ReportingDescriptor}})">
7176
+ <summary>
7177
+ Merges producer-supplied descriptors emitted as <c>rule-descriptor</c> /
7178
+ <c>notification-descriptor</c> events into the target list on the run's driver.
7179
+ </summary>
7180
+ <remarks>
7181
+ <para>Header pre-populated entries (if any) are preserved by reference, so a producer
7182
+ that supplied a descriptor on the run-header AND via an event for the same id is
7183
+ already a contract violation that the verb's emit-time dedup should have rejected.
7184
+ At replay we trust the invariant and append events after pre-populated entries; if
7185
+ the invariant is violated (e.g., a manually-edited event log) the resulting SARIF
7186
+ will carry two descriptors with the same id and the validator will flag it.</para>
7187
+ <para>For the rules array specifically, this method must run BEFORE
7188
+ <see cref="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.RegisterDescriptorsFromResults(Microsoft.CodeAnalysis.Sarif.Run,System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.Result})"/> so that the explicit descriptors seed
7189
+ the <c>idToIndex</c> table — auto-registration synthesizes minimal descriptors only
7190
+ for ids that aren't already represented.</para>
7191
+ </remarks>
7192
+ </member>
6869
7193
  <!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[])" -->
6870
7194
  <!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[],System.Int32,System.Int32)" -->
6871
7195
  <member name="T:Microsoft.CodeAnalysis.Sarif.FileRegionsCache">
@@ -6876,7 +7200,20 @@
6876
7200
  snippets associated with region instances.
6877
7201
  </summary>
6878
7202
  </member>
6879
- <member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.#ctor(System.Int32,Microsoft.CodeAnalysis.Sarif.IFileSystem)">
7203
+ <member name="P:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.HashAlgorithms">
7204
+ <summary>
7205
+ The hash algorithms this cache computes when producing <see cref="T:Microsoft.CodeAnalysis.Sarif.HashData"/> for files.
7206
+ </summary>
7207
+ </member>
7208
+ <member name="P:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.FileSystem">
7209
+ <summary>
7210
+ The file system this cache uses for all I/O. Exposed to internal callers so that
7211
+ downstream <see cref="M:Microsoft.CodeAnalysis.Sarif.Artifact.Create(System.Uri,Microsoft.CodeAnalysis.Sarif.OptionallyEmittedData,System.Text.Encoding,Microsoft.CodeAnalysis.Sarif.HashData,Microsoft.CodeAnalysis.Sarif.IFileSystem,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)"/> / <see cref="M:Microsoft.CodeAnalysis.Sarif.Run.GetFileIndex(Microsoft.CodeAnalysis.Sarif.ArtifactLocation,System.Boolean,Microsoft.CodeAnalysis.Sarif.OptionallyEmittedData,System.Text.Encoding,Microsoft.CodeAnalysis.Sarif.HashData,Microsoft.CodeAnalysis.Sarif.IFileSystem,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)"/> sites
7212
+ can flow the same <see cref="T:Microsoft.CodeAnalysis.Sarif.IFileSystem"/> instance instead of silently falling
7213
+ back to the default <c>FileSystem.Instance</c>.
7214
+ </summary>
7215
+ </member>
7216
+ <member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.#ctor(System.Int32,Microsoft.CodeAnalysis.Sarif.IFileSystem,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)">
6880
7217
  <summary>
6881
7218
  Creates a new <see cref="T:Microsoft.CodeAnalysis.Sarif.FileRegionsCache"/> object.
6882
7219
  </summary>
@@ -6886,6 +7223,10 @@
6886
7223
  <param name="fileSystem">
6887
7224
  An object that provides access to file system services.
6888
7225
  </param>
7226
+ <param name="hashAlgorithms">
7227
+ The set of hash algorithms this cache will compute when producing <see cref="T:Microsoft.CodeAnalysis.Sarif.HashData"/>
7228
+ for files. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default"/> (SHA-256 only).
7229
+ </param>
6889
7230
  </member>
6890
7231
  <member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.PopulateTextRegionProperties(Microsoft.CodeAnalysis.Sarif.Region,System.Uri,System.Boolean,System.String)">
6891
7232
  <summary>
@@ -7326,6 +7667,126 @@
7326
7667
  <member name="M:Microsoft.CodeAnalysis.Sarif.GitHelper.Dispose">
7327
7668
  <inheritdoc/>
7328
7669
  </member>
7670
+ <member name="T:Microsoft.CodeAnalysis.Sarif.HashAlgorithms">
7671
+ <summary>
7672
+ Specifies the set of hash algorithms to compute for files persisted into a SARIF log.
7673
+ Used in conjunction with <see cref="F:Microsoft.CodeAnalysis.Sarif.OptionallyEmittedData.Hashes"/>, which acts as the
7674
+ on/off switch for emitting any hashes at all; this enum selects which algorithms are
7675
+ produced.
7676
+ </summary>
7677
+ <remarks>
7678
+ SHA-1 is no longer included in the default set. To preserve legacy behavior, callers
7679
+ must explicitly request <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Sha1"/>.
7680
+
7681
+ <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.GitBlobSha1"/> emits a hash with the dictionary key
7682
+ <c>git-blob-sha-1</c>, computed as <c>SHA1("blob " + length + "\0" + content)</c>
7683
+ over the raw bytes of the file on disk. This hash is byte-for-byte sensitive,
7684
+ including line-ending configuration. For the value to match a server-persisted git
7685
+ blob SHA, the on-disk bytes must match what git stored (typically LF line endings
7686
+ for text files in a normalized repository).
7687
+
7688
+ When a caller of <see cref="T:Microsoft.CodeAnalysis.Sarif.Writers.SarifLogger"/> supplies an explicit
7689
+ <see cref="T:Microsoft.CodeAnalysis.Sarif.FileRegionsCache"/>, the algorithm set configured on that cache wins
7690
+ and the logger's <c>hashAlgorithms</c> parameter is not consulted. Configure
7691
+ algorithms on the cache in that scenario.
7692
+ </remarks>
7693
+ </member>
7694
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.None">
7695
+ <summary>
7696
+ Compute no hashes.
7697
+ </summary>
7698
+ </member>
7699
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Sha1">
7700
+ <summary>
7701
+ Compute SHA-1. Emitted under the dictionary key <c>sha-1</c>.
7702
+ </summary>
7703
+ </member>
7704
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Sha256">
7705
+ <summary>
7706
+ Compute SHA-256. Emitted under the dictionary key <c>sha-256</c>.
7707
+ </summary>
7708
+ </member>
7709
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.GitBlobSha1">
7710
+ <summary>
7711
+ Compute a GitHub blob SHA-1 over the raw bytes of the file. Emitted under the
7712
+ dictionary key <c>git-blob-sha-1</c>. The value matches what
7713
+ <c>git hash-object &lt;file&gt;</c> would produce for the same bytes.
7714
+ </summary>
7715
+ </member>
7716
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Sha512">
7717
+ <summary>
7718
+ Compute SHA-512. Emitted under the dictionary key <c>sha-512</c>.
7719
+ </summary>
7720
+ </member>
7721
+ <member name="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default">
7722
+ <summary>
7723
+ The default set of algorithms computed by <see cref="!:SarifLogger"/> and related
7724
+ infrastructure when only <see cref="F:Microsoft.CodeAnalysis.Sarif.OptionallyEmittedData.Hashes"/> is requested.
7725
+ </summary>
7726
+ </member>
7727
+ <member name="T:Microsoft.CodeAnalysis.Sarif.HashData">
7728
+ <summary>
7729
+ A bag of hex-encoded hash values for a single artifact, keyed by algorithm.
7730
+ Populate the algorithm-specific properties via object initializer syntax:
7731
+ <c>new HashData { Sha256 = ..., GitBlobSha1 = ... }</c>. Unset properties are
7732
+ omitted from <see cref="M:Microsoft.CodeAnalysis.Sarif.HashData.ToDictionary"/>.
7733
+ </summary>
7734
+ </member>
7735
+ <member name="P:Microsoft.CodeAnalysis.Sarif.HashData.Sha1">
7736
+ <summary>
7737
+ SHA-1 (uppercase hex). Emitted under the dictionary key <c>sha-1</c>.
7738
+ </summary>
7739
+ </member>
7740
+ <member name="P:Microsoft.CodeAnalysis.Sarif.HashData.Sha256">
7741
+ <summary>
7742
+ SHA-256 (uppercase hex). Emitted under the dictionary key <c>sha-256</c>.
7743
+ </summary>
7744
+ </member>
7745
+ <member name="P:Microsoft.CodeAnalysis.Sarif.HashData.Sha512">
7746
+ <summary>
7747
+ SHA-512 (uppercase hex). Emitted under the dictionary key <c>sha-512</c>.
7748
+ </summary>
7749
+ </member>
7750
+ <member name="P:Microsoft.CodeAnalysis.Sarif.HashData.GitBlobSha1">
7751
+ <summary>
7752
+ The GitHub blob SHA-1 of the file content, computed as
7753
+ <c>SHA1("blob " + length + "\0" + content)</c> over the raw bytes of the file.
7754
+ Emitted under the SARIF artifact hashes dictionary key <c>git-blob-sha-1</c>
7755
+ (lowercase hex, matching git's canonical form).
7756
+ </summary>
7757
+ </member>
7758
+ <member name="M:Microsoft.CodeAnalysis.Sarif.HashUtilities.ComputeHashes(System.String,Microsoft.CodeAnalysis.Sarif.IFileSystem,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)">
7759
+ <summary>
7760
+ Computes the requested set of hashes for a file. Returns <c>null</c> if the file
7761
+ cannot be opened (e.g., I/O error, access denied, or a mock file system returns
7762
+ no stream). Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default"/> (SHA-256 only).
7763
+ </summary>
7764
+ </member>
7765
+ <member name="M:Microsoft.CodeAnalysis.Sarif.HashUtilities.ComputeHashes(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)">
7766
+ <summary>
7767
+ Computes the requested set of hashes from a stream in a single pass, hashing from
7768
+ the stream's current position to the end. The position is restored on seekable streams.
7769
+ </summary>
7770
+ <remarks>
7771
+ <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.GitBlobSha1"/> uses the byte length of the hashed region
7772
+ (<c>stream.Length - stream.Position</c>) to build the git blob header; the result
7773
+ therefore matches <c>git hash-object</c> when the stream is positioned at zero.
7774
+ Non-seekable streams are buffered in memory as a fallback. SHA-* values are
7775
+ uppercase hex; <c>git-blob-sha-1</c> is lowercase, matching git's canonical form.
7776
+ </remarks>
7777
+ </member>
7778
+ <member name="M:Microsoft.CodeAnalysis.Sarif.HashUtilities.ComputeHashesForText(System.String,Microsoft.CodeAnalysis.Sarif.HashAlgorithms)">
7779
+ <summary>
7780
+ Computes the requested set of hashes for the UTF-8 byte representation of <paramref name="text"/>.
7781
+ Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default"/> (SHA-256 only).
7782
+ </summary>
7783
+ <remarks>
7784
+ Note that <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.GitBlobSha1"/> computed via this overload reflects
7785
+ the UTF-8 encoding of the supplied text, not the original on-disk bytes. To produce
7786
+ a value that matches a git server's stored blob SHA, prefer the stream- or file-based
7787
+ overloads operating on the raw file bytes.
7788
+ </remarks>
7789
+ </member>
7329
7790
  <member name="T:Microsoft.CodeAnalysis.Sarif.HttpClientWrapper">
7330
7791
  <summary>
7331
7792
  A wrapper class for accessing the .NET http client.
@@ -8813,6 +9274,14 @@
8813
9274
  </summary>
8814
9275
  <param name="underlyingStream"></param>
8815
9276
  </member>
9277
+ <member name="T:Microsoft.CodeAnalysis.Sarif.RuleKind">
9278
+ <summary>
9279
+ Identifies the validator family that applies a SARIF reporting-descriptor rule.
9280
+ </summary>
9281
+ <remarks>
9282
+ Not a <c>[Flags]</c> enum; combinations are expressed via <see cref="T:Microsoft.CodeAnalysis.Sarif.RuleKindSet"/>.
9283
+ </remarks>
9284
+ </member>
8816
9285
  <member name="F:Microsoft.CodeAnalysis.Sarif.SarifConstants.SarifFileExtension">
8817
9286
  <summary>
8818
9287
  The standard file extension for SARIF files.
@@ -9334,6 +9803,148 @@
9334
9803
  dictates exactly which results land in which output file.
9335
9804
  </summary>
9336
9805
  </member>
9806
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus">
9807
+ <summary>
9808
+ Maturity status of a MITRE CWE entry, as declared in the upstream
9809
+ <see href="https://cwe.mitre.org/data/xml/cwec_latest.xml.zip">CWE XML feed</see>.
9810
+ </summary>
9811
+ <remarks>
9812
+ <para>
9813
+ Every entry in <see cref="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy"/>'s consolidated SARIF and brief artifacts
9814
+ carries one of these statuses as the <c>cwe/status</c> property. Callers select a
9815
+ subset with a bitwise combination of these flags; the default
9816
+ (<see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>) is <c>Stable | Draft | Incomplete</c>,
9817
+ matching the practical floor of what real-world scanners actually emit.
9818
+ </para>
9819
+ <para>
9820
+ In cwec_v4.20 the distribution is wildly skewed: 26 Stable, 432 Draft, 486 Incomplete,
9821
+ 25 Deprecated, 0 Obsolete. See <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/> for why the
9822
+ default deliberately includes Incomplete (to cover OWASP-tier CWEs like SSRF that
9823
+ MITRE has not yet promoted to Draft) and excludes Deprecated (so the enricher leaves
9824
+ a migration signal on stale rule descriptors).
9825
+ </para>
9826
+ </remarks>
9827
+ </member>
9828
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy">
9829
+ <summary>
9830
+ Provides access to the SDK's embedded MITRE CWE taxonomy in SARIF and
9831
+ compact-markdown form. Callers select a subset by <see cref="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus"/>;
9832
+ the default (<see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>) is <c>Stable | Draft | Incomplete</c>,
9833
+ which mirrors what real-world scanners report — see remarks for the rationale.
9834
+ </summary>
9835
+ <remarks>
9836
+ <para>
9837
+ The SDK ships exactly two embedded resources — one consolidated SARIF taxonomy
9838
+ (<c>CweTaxonomy.sarif</c>) and one consolidated markdown table (<c>CweTaxonomy.brief.md</c>) —
9839
+ containing every entry in the upstream MITRE catalog regardless of status.
9840
+ Each taxon carries its <c>cwe/status</c> as a property, and the brief table has
9841
+ a Status column. Filtering by status happens at read time, never at load time.
9842
+ </para>
9843
+ <para>
9844
+ Sized for AI prompt-context injection: the brief table fits ~60K tokens at the
9845
+ default loadout, comfortable for every modern frontier model.
9846
+ </para>
9847
+ </remarks>
9848
+ </member>
9849
+ <member name="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses">
9850
+ <summary>
9851
+ The default set of CWE statuses for read and enrichment operations:
9852
+ <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Stable"/> | <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Draft"/> | <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Incomplete"/>.
9853
+ </summary>
9854
+ <remarks>
9855
+ <para>
9856
+ Notably <em>includes</em> <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Incomplete"/> and <em>excludes</em>
9857
+ <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Deprecated"/>. This is the non-obvious shape, and it is deliberate.
9858
+ </para>
9859
+ <para>
9860
+ MITRE's "Stable" bar is much higher than common usage suggests — at cwec_v4.20
9861
+ only 26 of 969 entries are Stable. Most household-name CWEs (XXE, deserialization,
9862
+ hardcoded credentials, broken crypto, out-of-bounds write) are still <em>Draft</em>,
9863
+ and SSRF (CWE-918) — an OWASP Top 10 entry since 2021 — is <em>Incomplete</em>.
9864
+ </para>
9865
+ <para>
9866
+ We measured how often Incomplete CWEs show up in real scanner rule metadata
9867
+ across <c>github/codeql</c> (13,143 query files) and <c>semgrep/semgrep-rules</c>
9868
+ (2,183 rule files): of 349 distinct CWEs cited, <strong>136 (39%) are upstream-Incomplete</strong>
9869
+ — including CWE-1220 (Insufficient Granularity of Access Control), the third-most-cited
9870
+ CWE across all of Semgrep at 108 rule files. Defaulting to <c>Stable | Draft</c> would
9871
+ silently exclude two-fifths of what real scanners actually emit. See
9872
+ <c>src/Sarif/Taxonomies/CweReadme.md</c> for the full table and methodology.
9873
+ </para>
9874
+ <para>
9875
+ Excluding <c>Deprecated</c> by default is also intentional and also measured: across
9876
+ those same 349 cited CWEs, exactly one Deprecated CWE appears (CWE-247, once). Real
9877
+ scanners have already migrated off deprecated CWEs. The enricher
9878
+ (<see cref="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomyEnricher"/>) intentionally gives no help on a deprecated CWE,
9879
+ leaving the descriptor's metadata empty so the producer notices and migrates to the
9880
+ MITRE-recommended replacement. Callers that want a complete snapshot can pass
9881
+ <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.All"/>.
9882
+ </para>
9883
+ </remarks>
9884
+ </member>
9885
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.Load(Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus)">
9886
+ <summary>
9887
+ Loads the consolidated CWE taxonomy, optionally filtered by status.
9888
+ </summary>
9889
+ <param name="statuses">
9890
+ Bitwise combination of <see cref="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus"/> flags. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>
9891
+ (<c>Stable | Draft | Incomplete</c>) — see the documentation on <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>
9892
+ for why this loadout is the right baseline.
9893
+ </param>
9894
+ <returns>
9895
+ A <see cref="T:Microsoft.CodeAnalysis.Sarif.SarifLog"/> whose <c>runs[0].taxonomies[0].taxa</c> contains every CWE
9896
+ entry whose status matches one of the requested flags. Returns the canonical log
9897
+ directly (no filtering, no copy) when <paramref name="statuses"/> is <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.All"/>.
9898
+ </returns>
9899
+ <exception cref="T:System.ArgumentException">Thrown if <paramref name="statuses"/> is <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.None"/>.</exception>
9900
+ </member>
9901
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.LoadBrief(Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus)">
9902
+ <summary>
9903
+ Loads the compact markdown table of CWE entries, optionally filtered by status.
9904
+ </summary>
9905
+ <param name="statuses">
9906
+ Bitwise combination of <see cref="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus"/> flags. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>.
9907
+ </param>
9908
+ <returns>
9909
+ The verbatim embedded canonical string when <paramref name="statuses"/> is <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.All"/>;
9910
+ otherwise a re-rendered table with only the matching rows.
9911
+ </returns>
9912
+ <exception cref="T:System.ArgumentException">Thrown if <paramref name="statuses"/> is <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.None"/>.</exception>
9913
+ </member>
9914
+ <member name="T:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomyEnricher">
9915
+ <summary>
9916
+ Enriches <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> instances on a <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/> whose
9917
+ <c>id</c> matches a MITRE CWE entry, populating <c>name</c>, <c>shortDescription</c>,
9918
+ <c>fullDescription</c>, <c>helpUri</c>, and <c>help</c> from the SDK's embedded
9919
+ taxonomy artifacts.
9920
+ </summary>
9921
+ <remarks>
9922
+ <para>
9923
+ Producer-supplied descriptor fields are never overwritten — the enricher only fills
9924
+ gaps. This makes the enricher safe to run repeatedly and safe to layer on top of
9925
+ producer authoring.
9926
+ </para>
9927
+ <para>
9928
+ This enricher does not add cross-references via <c>reportingDescriptor.relationships</c>
9929
+ or <c>result.taxa</c>. Producers that author CWE descriptors directly do not need that
9930
+ indirection; the pattern is reserved for tools that map their own rule IDs onto CWE.
9931
+ </para>
9932
+ </remarks>
9933
+ </member>
9934
+ <member name="M:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomyEnricher.Enrich(Microsoft.CodeAnalysis.Sarif.Run,Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus)">
9935
+ <summary>
9936
+ Enriches every descriptor on the supplied <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/> whose id maps to a
9937
+ CWE entry in the requested statuses.
9938
+ </summary>
9939
+ <param name="run">The run whose <c>tool.driver.rules</c> and <c>tool.extensions[].rules</c> are enriched.</param>
9940
+ <param name="statuses">
9941
+ The CWE statuses to source enrichment data from. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/>
9942
+ (<c>Stable | Draft | Incomplete</c>), which excludes <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Deprecated"/> by design —
9943
+ see <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomy.DefaultStatuses"/> for the rationale. Descriptors that reference
9944
+ deprecated CWEs are left untouched so the producer notices the migration signal.
9945
+ </param>
9946
+ <returns>The number of descriptors whose content was modified.</returns>
9947
+ </member>
9337
9948
  <member name="M:Microsoft.CodeAnalysis.Sarif.UriHelper.MakeValidUri(System.String)">
9338
9949
  <summary>
9339
9950
  Create a syntactically valid URI from a path that might be