@microsoft/sarif-multitool-linux 5.0.2 → 5.0.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/Sarif.Converters.pdb +0 -0
- package/Sarif.Driver.pdb +0 -0
- package/Sarif.Multitool +0 -0
- package/Sarif.Multitool.Library.pdb +0 -0
- package/Sarif.Multitool.Library.xml +380 -236
- package/Sarif.Multitool.pdb +0 -0
- package/Sarif.WorkItems.pdb +0 -0
- package/Sarif.pdb +0 -0
- package/Sarif.xml +63 -131
- package/WorkItems.pdb +0 -0
- package/package.json +1 -1
package/Sarif.Converters.pdb
CHANGED
|
Binary file
|
package/Sarif.Driver.pdb
CHANGED
|
Binary file
|
package/Sarif.Multitool
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -6,156 +6,88 @@
|
|
|
6
6
|
<members>
|
|
7
7
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddInvocationCommand">
|
|
8
8
|
<summary>
|
|
9
|
-
Implements <c>
|
|
9
|
+
Implements <c>add-invocation</c>: appends a fully-formed SARIF invocation
|
|
10
10
|
JSON to <c><output>.wip.jsonl</c>.
|
|
11
11
|
</summary>
|
|
12
12
|
<remarks>
|
|
13
|
-
<para>The verb
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
both). Full-log validation belongs in <c>emit-finalize --validate</c>, not at receipt.</para>
|
|
18
|
-
<para>Invocations are replayed in event order to <c>run.invocations[]</c>. Subsequent
|
|
19
|
-
<c>execution-notification</c> and <c>configuration-notification</c> events attach to
|
|
20
|
-
the most recent invocation, so emitting a fresh invocation event MAY be used to start
|
|
21
|
-
a new notification group within the same scan.</para>
|
|
13
|
+
<para>The verb gates required AI invocation fields: <c>executionSuccessful</c>,
|
|
14
|
+
<c>commandLine</c>, <c>workingDirectory.uri</c>, and inline notification <c>timeUtc</c>
|
|
15
|
+
values. Full structural validation runs at <c>emit-finalize --validate</c>.</para>
|
|
16
|
+
<para>The verb stamps <c>endTimeUtc</c> with the time of receipt when the producer leaves it unset.</para>
|
|
22
17
|
</remarks>
|
|
23
18
|
</member>
|
|
24
19
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddInvocationOptions">
|
|
25
20
|
<summary>
|
|
26
21
|
Options for <c>add-invocation</c>, which appends a fully-formed SARIF <c>invocation</c>
|
|
27
22
|
object to a staged event log (<c><output>.wip.jsonl</c>) created by
|
|
28
|
-
<c>emit-
|
|
23
|
+
<c>emit-run</c>.
|
|
29
24
|
</summary>
|
|
30
25
|
<remarks>
|
|
31
|
-
The invocation is supplied as a JSON document (file via <c>--input</c> or piped on
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
only path a producer has to populate <c>run.invocations[]</c>. Subsequent
|
|
35
|
-
<c>add-notification</c> events attach to the most recent invocation in event order,
|
|
36
|
-
so producers MAY append additional invocations to start a new notification group
|
|
37
|
-
(e.g., to model a re-run within the same scan).
|
|
26
|
+
The invocation is supplied as a JSON document (file via <c>--input</c> or piped on stdin).
|
|
27
|
+
Notifications travel inline on <c>toolExecutionNotifications</c> /
|
|
28
|
+
<c>toolConfigurationNotifications</c>.
|
|
38
29
|
</remarks>
|
|
39
30
|
</member>
|
|
40
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
31
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddNotificationReportingDescriptorCommand">
|
|
41
32
|
<summary>
|
|
42
|
-
Implements <c>
|
|
43
|
-
JSON to <c
|
|
33
|
+
Implements <c>add-notification-reporting-descriptor</c>: validates a SARIF
|
|
34
|
+
reportingDescriptor JSON and appends it to <c>run.tool.driver.notifications[]</c> in a
|
|
35
|
+
staged event log.
|
|
44
36
|
</summary>
|
|
45
|
-
<remarks>
|
|
46
|
-
<para>Unlike <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddResultCommand"/>, this verb does not enforce the AI ruleId
|
|
47
|
-
convention on the notification's <c>associatedRule.id</c> — that field references a
|
|
48
|
-
descriptor in <c>tool.driver.rules</c>, which uses the base taxonomy id (e.g.,
|
|
49
|
-
<c>CWE-79</c>) per SARIF §3.49.3, not the result-side hierarchical form.</para>
|
|
50
|
-
<para>Notifications without a <c>timeUtc</c> stamp are auto-stamped at replay time
|
|
51
|
-
(<see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer"/>), so producers can omit that field without firing
|
|
52
|
-
AI2019 at validate time.</para>
|
|
53
|
-
</remarks>
|
|
54
37
|
</member>
|
|
55
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
38
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddNotificationReportingDescriptorOptions">
|
|
56
39
|
<summary>
|
|
57
|
-
Options for <c>add-notification</c>, which appends a
|
|
58
|
-
|
|
59
|
-
<c>emit-
|
|
40
|
+
Options for <c>add-notification-reporting-descriptor</c>, which appends a SARIF
|
|
41
|
+
<c>reportingDescriptor</c> to <c>run.tool.driver.notifications[]</c> in a staged event log
|
|
42
|
+
(<c><output>.wip.jsonl</c>) created by <c>emit-run</c>.
|
|
60
43
|
</summary>
|
|
61
44
|
<remarks>
|
|
62
|
-
The
|
|
63
|
-
|
|
64
|
-
— associated rule references, full exception trees, descriptive markdown messages,
|
|
65
|
-
per-call properties — so the JSON-payload contract avoids encoding-by-flag entirely and
|
|
66
|
-
preserves whatever the producer chose to express.
|
|
45
|
+
The descriptor is supplied as a JSON document (file via <c>--input</c> or piped on stdin).
|
|
46
|
+
Each <c>id</c> may appear at most once in the notifications array.
|
|
67
47
|
</remarks>
|
|
68
48
|
</member>
|
|
69
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
49
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddResultCommand">
|
|
70
50
|
<summary>
|
|
71
|
-
Implements <c>
|
|
72
|
-
|
|
51
|
+
Implements <c>add-result</c>: validates a fully-formed SARIF result JSON and
|
|
52
|
+
appends a <c>result</c> event to <c><output>.wip.jsonl</c>.
|
|
73
53
|
</summary>
|
|
74
54
|
<remarks>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<see cref="
|
|
79
|
-
|
|
80
|
-
at finalize time, not from this verb — this verb is the producer-side authoring path
|
|
81
|
-
for novel-finding descriptors that have no upstream taxonomy entry.</para>
|
|
82
|
-
<para>Duplicate-id submissions within the same event log are rejected on receipt — the
|
|
83
|
-
verb scans the existing event log (including any descriptors pre-populated on the
|
|
84
|
-
run-header event) and fails before appending. (A future <c>--force</c> escape hatch
|
|
85
|
-
is acknowledged; not in v1.)</para>
|
|
55
|
+
The result's <c>ruleId</c> is validated at receipt against the AI ruleId convention
|
|
56
|
+
(taxonomy sub-id form or NOVEL- escape hatch). On rejection the verb writes the
|
|
57
|
+
AI-consumable error envelope (error code AI1012) to stderr and returns
|
|
58
|
+
<see cref="F:Microsoft.CodeAnalysis.Sarif.Driver.CommandBase.FAILURE"/> WITHOUT appending — an AI orchestrator can retry the
|
|
59
|
+
individual result without first having to remove garbage from the event log.
|
|
86
60
|
</remarks>
|
|
87
61
|
</member>
|
|
88
|
-
<member name="
|
|
62
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddResultOptions">
|
|
89
63
|
<summary>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
duplicate is found; <c>false</c> otherwise.
|
|
64
|
+
Options for <c>add-result</c>, which appends a fully-formed SARIF <c>result</c> object
|
|
65
|
+
to a staged event log (<c><output>.wip.jsonl</c>) created by <c>emit-run</c>.
|
|
93
66
|
</summary>
|
|
94
67
|
<remarks>
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
<item><description>Run-header events: <c>payload.tool.driver.<targetArray>[*].id</c>
|
|
98
|
-
— producers MAY pre-populate descriptors on the header.</description></item>
|
|
99
|
-
<item><description>Prior descriptor events of the same target kind:
|
|
100
|
-
<c>payload.id</c>.</description></item>
|
|
101
|
-
</list>
|
|
102
|
-
The reader silently skips unknown kinds and malformed-but-skippable rows; for the
|
|
103
|
-
scan we walk the full event sequence so the event index reported in the error
|
|
104
|
-
matches the producer's mental model of "the Nth thing I appended."
|
|
68
|
+
The result is supplied as a JSON document (file via <c>--input</c> or piped on stdin).
|
|
69
|
+
On receipt the verb validates <c>result.ruleId</c> against the AI ruleId convention.
|
|
105
70
|
</remarks>
|
|
106
71
|
</member>
|
|
107
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
72
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddRuleReportingDescriptorCommand">
|
|
108
73
|
<summary>
|
|
109
|
-
|
|
110
|
-
<c>
|
|
111
|
-
|
|
74
|
+
Implements <c>add-rule-reporting-descriptor</c>: validates a SARIF
|
|
75
|
+
reportingDescriptor JSON with a <c>NOVEL-</c> id and appends it to
|
|
76
|
+
<c>run.tool.driver.rules[]</c> in a staged event log.
|
|
112
77
|
</summary>
|
|
113
|
-
<remarks>
|
|
114
|
-
<para>The verb's default target is <c>run.tool.driver.notifications[]</c> — AI producers
|
|
115
|
-
routinely emit notification descriptors (progress, telemetry, config errors, handoff
|
|
116
|
-
breadcrumbs). Pass <c>--rules</c> to target <c>run.tool.driver.rules[]</c> instead;
|
|
117
|
-
this rule-descriptor path is reserved for NOVEL- novel-finding descriptors (taxonomy
|
|
118
|
-
rule descriptors such as <c>CWE-89</c> come from the taxonomy enricher, not this
|
|
119
|
-
verb).</para>
|
|
120
|
-
<para>The descriptor is supplied as a JSON document (file via <c>--input</c> or piped
|
|
121
|
-
on stdin). The full SARIF reportingDescriptor shape (id, name, shortDescription,
|
|
122
|
-
fullDescription, helpUri, messageStrings, defaultConfiguration, properties, …)
|
|
123
|
-
round-trips byte-for-byte through the staged event log.</para>
|
|
124
|
-
<para>Each descriptor <c>id</c> may appear at most once per event log. Submitting a
|
|
125
|
-
duplicate id is rejected with a clear error pointing at the prior occurrence.</para>
|
|
126
|
-
</remarks>
|
|
127
78
|
</member>
|
|
128
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
79
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddRuleReportingDescriptorOptions">
|
|
129
80
|
<summary>
|
|
130
|
-
|
|
131
|
-
|
|
81
|
+
Options for <c>add-rule-reporting-descriptor</c>, which appends a SARIF
|
|
82
|
+
<c>reportingDescriptor</c> to <c>run.tool.driver.rules[]</c> in a staged event log
|
|
83
|
+
(<c><output>.wip.jsonl</c>) created by <c>emit-run</c>.
|
|
132
84
|
</summary>
|
|
133
85
|
<remarks>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<see cref="F:Microsoft.CodeAnalysis.Sarif.Driver.CommandBase.FAILURE"/> WITHOUT appending — an AI orchestrator can retry the
|
|
138
|
-
individual result without first having to remove garbage from the event log.
|
|
86
|
+
Reserved for novel-finding rules: the descriptor <c>id</c> must be a well-formed
|
|
87
|
+
<c>NOVEL-</c> id. Descriptors for taxonomy-mapped rules (e.g., <c>CWE-89</c>) come from the
|
|
88
|
+
taxonomy enricher, not this verb. Each <c>id</c> may appear at most once in the rules array.
|
|
139
89
|
</remarks>
|
|
140
90
|
</member>
|
|
141
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddResultOptions">
|
|
142
|
-
<summary>
|
|
143
|
-
Options for <c>add-result</c>, which appends a fully-formed SARIF <c>result</c> object
|
|
144
|
-
to a staged event log (<c><output>.wip.jsonl</c>) created by <c>emit-init-run</c>.
|
|
145
|
-
</summary>
|
|
146
|
-
<remarks>
|
|
147
|
-
The result is supplied as a JSON document (file via <c>--input</c> or piped on stdin).
|
|
148
|
-
The SARIF <c>result</c> object can carry rich nested structures (code flows, thread flows,
|
|
149
|
-
stacks, fixes, taxa, related locations, properties bags). Modeling every field as a CLI
|
|
150
|
-
flag would explode the surface; the JSON-payload contract keeps the verb generic and lets
|
|
151
|
-
an AI producer emit arbitrarily-rich findings without losing fidelity.
|
|
152
|
-
|
|
153
|
-
On receipt the verb validates that <c>result.ruleId</c> conforms to the AI ruleId
|
|
154
|
-
convention (taxonomy sub-id form or NOVEL- escape hatch) so an AI orchestrator gets an
|
|
155
|
-
immediate, AI-consumable rejection envelope rather than discovering the violation later
|
|
156
|
-
at <c>emit-finalize</c> time.
|
|
157
|
-
</remarks>
|
|
158
|
-
</member>
|
|
159
91
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext">
|
|
160
92
|
<summary>
|
|
161
93
|
Detects an Azure DevOps pipeline execution context from environment variables and stamps
|
|
@@ -216,7 +148,7 @@
|
|
|
216
148
|
</summary>
|
|
217
149
|
<remarks>
|
|
218
150
|
<para>The "stamp only when absent, fail on conflict" contract is required because
|
|
219
|
-
callers (notably <c>emit-
|
|
151
|
+
callers (notably <c>emit-run</c>'s JSON-payload contract) may supply these
|
|
220
152
|
fields directly. An unconditional overwrite would silently clobber a producer's
|
|
221
153
|
declared identity; a conflict is a misconfiguration signal that we want to surface
|
|
222
154
|
at the verb rather than ship in the run.</para>
|
|
@@ -261,15 +193,15 @@
|
|
|
261
193
|
</member>
|
|
262
194
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers">
|
|
263
195
|
<summary>
|
|
264
|
-
Shared plumbing for the emit verb chain (<c>emit-
|
|
265
|
-
<c>add-
|
|
266
|
-
|
|
267
|
-
|
|
196
|
+
Shared plumbing for the emit verb chain (<c>emit-run</c>, <c>add-result</c>,
|
|
197
|
+
<c>add-invocation</c>, <c>add-notification-reporting-descriptor</c>,
|
|
198
|
+
<c>add-rule-reporting-descriptor</c>, <c>emit-finalize</c>): resolves
|
|
199
|
+
the staged event log path, reads caller-supplied JSON (file or stdin), and parses it into
|
|
200
|
+
a <see cref="T:Newtonsoft.Json.Linq.JToken"/> in a date-safe way.
|
|
268
201
|
</summary>
|
|
269
202
|
<remarks>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
per-verb commands can stay focused on payload-specific validation and append.
|
|
203
|
+
Shared helpers preserve payload text, including date-looking strings, until the staged
|
|
204
|
+
event log is finalized.
|
|
273
205
|
</remarks>
|
|
274
206
|
</member>
|
|
275
207
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.TryValidateUri(System.String,System.String,System.String[],System.String@)">
|
|
@@ -278,12 +210,8 @@
|
|
|
278
210
|
absolute URI whose scheme appears in <paramref name="allowedSchemes"/>.
|
|
279
211
|
</summary>
|
|
280
212
|
<remarks>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
values would never resolve meaningfully into a SARIF reader downstream) and we
|
|
284
|
-
constrain the scheme to a documented allow-list so a typo like <c>"htps://..."</c>
|
|
285
|
-
or an inappropriate scheme like <c>"file:..."</c> on a public-facing URL surfaces
|
|
286
|
-
here rather than silently shipping in the run header.
|
|
213
|
+
Empty values are accepted because the corresponding flags are optional. Non-empty
|
|
214
|
+
values must be absolute and use an allowed scheme.
|
|
287
215
|
</remarks>
|
|
288
216
|
</member>
|
|
289
217
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.TryResolveWipPath(System.String,Microsoft.CodeAnalysis.Sarif.IFileSystem,System.String@)">
|
|
@@ -312,22 +240,34 @@
|
|
|
312
240
|
</member>
|
|
313
241
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.ReadStandardInputAsUtf8">
|
|
314
242
|
<summary>
|
|
315
|
-
Reads redirected stdin as UTF-8, bypassing <see cref="P:System.Console.InputEncoding"
|
|
316
|
-
|
|
317
|
-
(often cp437 or cp850), which would mangle non-ASCII content in a piped
|
|
318
|
-
SARIF payload. AI orchestrators routinely emit messages, URIs, and properties
|
|
319
|
-
containing non-ASCII characters, so we must decode the raw byte stream as UTF-8
|
|
320
|
-
regardless of the console's current code page. A BOM-stamped input is still
|
|
321
|
-
honored — <see cref="T:System.IO.StreamReader"/>'s detect-BOM flag handles that case.
|
|
243
|
+
Reads redirected stdin as UTF-8, bypassing <see cref="P:System.Console.InputEncoding"/> so
|
|
244
|
+
Windows OEM codepages cannot mangle non-ASCII SARIF payloads. A UTF-8 BOM is honored.
|
|
322
245
|
</summary>
|
|
323
246
|
</member>
|
|
324
247
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeCommand">
|
|
325
248
|
<summary>
|
|
326
|
-
Implements <c>
|
|
249
|
+
Implements <c>emit-finalize</c>: replays <c><output>.wip.jsonl</c>,
|
|
327
250
|
optionally enriches CWE-as-rule-id descriptors, and atomically writes the destination
|
|
328
251
|
SARIF file.
|
|
329
252
|
</summary>
|
|
330
253
|
</member>
|
|
254
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeCommand.ApplyRankDerivedSecuritySeverity(Microsoft.CodeAnalysis.Sarif.Run)">
|
|
255
|
+
<summary>
|
|
256
|
+
Derives a GitHub Advanced Security <c>security-severity</c> for each rule descriptor
|
|
257
|
+
from the highest <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.Rank"/> observed across the results that reference
|
|
258
|
+
it, mapping the SARIF rank scale (0–100) onto the security-severity scale (0.0–10.0)
|
|
259
|
+
by dividing by ten.
|
|
260
|
+
</summary>
|
|
261
|
+
<remarks>
|
|
262
|
+
GHAS reads <c>security-severity</c> off the rule a result references, never off a
|
|
263
|
+
taxon, so the value is stamped on <c>tool.driver.rules[]</c>. Results carry an
|
|
264
|
+
authoritative <c>ruleIndex</c> by the time the log is replayed, so association is by
|
|
265
|
+
index rather than by id. The rank sentinel <c>-1.0</c> ("unset") is excluded: a rule
|
|
266
|
+
whose results carry no rank receives nothing, and a producer-authored
|
|
267
|
+
<c>security-severity</c> is left untouched.
|
|
268
|
+
</remarks>
|
|
269
|
+
<returns>The number of rule descriptors stamped.</returns>
|
|
270
|
+
</member>
|
|
331
271
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeCommand.RunValidatorAndReport(System.String)">
|
|
332
272
|
<summary>
|
|
333
273
|
Runs the multitool validator (--rule-kind Sarif;AI) against the finalized SARIF.
|
|
@@ -341,15 +281,44 @@
|
|
|
341
281
|
writes the destination SARIF file.
|
|
342
282
|
</summary>
|
|
343
283
|
</member>
|
|
344
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
284
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor">
|
|
285
|
+
<summary>
|
|
286
|
+
Rewrites absolute local file paths in a run into relative URIs plus portable, per-repository
|
|
287
|
+
<c>uriBaseId</c>s derived from <c>versionControlProvenance</c>. Each artifact location is
|
|
288
|
+
resolved against the run's input <c>originalUriBaseIds</c>, attributed to the owning
|
|
289
|
+
repository by longest-prefix match on the mapped local root, and re-expressed relative to
|
|
290
|
+
that repository's minted output base. The rebuilt <c>originalUriBaseIds</c> anchor each base
|
|
291
|
+
at a portable root — a GitHub-compatible blob permalink (commit-pinned in the URL) or an Azure
|
|
292
|
+
DevOps repository root (commit pinning carried by <c>versionControlProvenance.revisionId</c>),
|
|
293
|
+
derived from the repositoryUri by <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot"/> — so the finalized SARIF
|
|
294
|
+
carries no machine-specific path. Each minted base also carries a <c>description</c> whose
|
|
295
|
+
<c>text</c> is a SARIF embedded link (§3.11.6) whose anchor names the repository and
|
|
296
|
+
abbreviated commit (<c><repo>@<short-sha></c>) and whose destination is a
|
|
297
|
+
browsable root-at-revision URL, unless the input base already supplied a description.
|
|
298
|
+
</summary>
|
|
299
|
+
<remarks>
|
|
300
|
+
One repository collapses to the bare <c>SRCROOT</c> base. Multiple repositories each receive
|
|
301
|
+
<c>SRCROOT_<REPO-LEAF></c>, disambiguated by an ordinal suffix on collision. A result URI
|
|
302
|
+
that resolves to a local file path under no declared repository root fails finalize (it would
|
|
303
|
+
leak); an unmatched URI under a portable scheme is inlined as an absolute reference.
|
|
304
|
+
</remarks>
|
|
305
|
+
</member>
|
|
306
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInputOptionsBase">
|
|
307
|
+
<summary>
|
|
308
|
+
Shared options for the emit verbs that append a JSON object to a staged event log: the
|
|
309
|
+
destination SARIF path and the JSON input (file or stdin).
|
|
310
|
+
</summary>
|
|
311
|
+
</member>
|
|
312
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand">
|
|
345
313
|
<summary>
|
|
346
|
-
Implements <c>
|
|
314
|
+
Implements <c>emit-run</c>: creates an append-only SARIF event log
|
|
347
315
|
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
348
316
|
caller-supplied SARIF <c>Run</c> JSON document (file via <c>--input</c> or stdin).
|
|
349
317
|
</summary>
|
|
350
318
|
<remarks>
|
|
351
319
|
<para>The JSON-payload contract matches the other emit verbs (<c>add-result</c>,
|
|
352
|
-
<c>add-
|
|
320
|
+
<c>add-invocation</c>, <c>add-notification-reporting-descriptor</c>,
|
|
321
|
+
<c>add-rule-reporting-descriptor</c>). The supplied <c>Run</c> may
|
|
353
322
|
carry any subset of the partial-Run shape the replayer accepts (<c>tool</c>,
|
|
354
323
|
<c>language</c>, <c>columnKind</c>, <c>defaultEncoding</c>, <c>defaultSourceLanguage</c>,
|
|
355
324
|
<c>originalUriBaseIds</c>, <c>versionControlProvenance</c>, <c>automationDetails</c>,
|
|
@@ -385,92 +354,53 @@
|
|
|
385
354
|
</list>
|
|
386
355
|
</remarks>
|
|
387
356
|
</member>
|
|
388
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
357
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryValidateVcpRepositoryShapes(Newtonsoft.Json.Linq.JObject)">
|
|
389
358
|
<summary>
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
further down the validator chain from throwing InvalidOperationException.
|
|
359
|
+
Confirms that every present <c>versionControlProvenance[].repositoryUri</c> has a shape
|
|
360
|
+
from which <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor"/> can later derive a portable root. Runs
|
|
361
|
+
after header validation (which proves each value is an absolute https URI) and after env
|
|
362
|
+
stamping, so both caller-supplied and stamped entries are covered. Entries without a
|
|
363
|
+
repositoryUri are left to the finalize-time contract.
|
|
396
364
|
</summary>
|
|
397
365
|
</member>
|
|
398
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
366
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryRequireOptionalObject(Newtonsoft.Json.Linq.JObject,System.String,Newtonsoft.Json.Linq.JObject@)">
|
|
399
367
|
<summary>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
SARIF Run fields the typed model doesn't surface (e.g., <c>redactionTokens</c>) in
|
|
403
|
-
the wip line. (The replayer materializes a typed <c>Run</c> at finalize time, so
|
|
404
|
-
non-typed fields are durable only up to that boundary.)
|
|
368
|
+
Requires an optional token to be null/absent or a JSON object; returns the object via
|
|
369
|
+
<paramref name="value"/>.
|
|
405
370
|
</summary>
|
|
406
371
|
</member>
|
|
407
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
372
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryStampAdoContext(Newtonsoft.Json.Linq.JObject,Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext,System.String@)">
|
|
408
373
|
<summary>
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
environment via <see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunCommand.TryResolveVcpFields(Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext,Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext,System.Uri@,System.String@,System.String@,System.String@)"/>). Three input shapes:
|
|
412
|
-
<list type="bullet">
|
|
413
|
-
<item>VCP absent or empty array → append a synthesized entry with the fields we have
|
|
414
|
-
(only when a repository URI is known; branch/revision without a repo URI anchor is
|
|
415
|
-
informationally thin and cannot bind to a repo downstream).</item>
|
|
416
|
-
<item>VCP contains exactly one entry → enrich missing fields; fail on disagreement.</item>
|
|
417
|
-
<item>VCP contains multiple entries → leave untouched (caller declared a multi-repo
|
|
418
|
-
shape; we don't pick which entry names the pipeline's source repo).</item>
|
|
419
|
-
</list>
|
|
420
|
-
<para>This method is the env-driven stamper. The verb supports a layered set of
|
|
421
|
-
VCP sources:</para>
|
|
422
|
-
<list type="number">
|
|
423
|
-
<item>ADO pipeline environment — <c>TF_BUILD=True</c> plus the
|
|
424
|
-
<c>BUILD_REPOSITORY_URI</c> / <c>BUILD_SOURCEVERSION</c> /
|
|
425
|
-
<c>BUILD_SOURCEBRANCH</c> vars supply repo URI / revision / branch directly.</item>
|
|
426
|
-
<item>GitHub Actions environment — <c>GITHUB_ACTIONS=true</c> plus
|
|
427
|
-
<c>GITHUB_SERVER_URL</c> / <c>GITHUB_REPOSITORY</c> / <c>GITHUB_SHA</c> /
|
|
428
|
-
<c>GITHUB_REF</c> supply the same fields. When both ADO and GHA vars are
|
|
429
|
-
populated, the sources must agree on every field they both publish.</item>
|
|
430
|
-
<item>Caller-supplied — if neither CI env is present, the producer populates
|
|
431
|
-
<c>versionControlProvenance</c> entries directly in the run-header JSON and the
|
|
432
|
-
verb passes them through after shape validation. Callers running outside a
|
|
433
|
-
supported CI environment can shell out to <c>git</c> themselves and either
|
|
434
|
-
populate the entry directly or stage the corresponding env vars before invoking
|
|
435
|
-
the verb.</item>
|
|
436
|
-
</list>
|
|
374
|
+
Stamps ADO pipeline identity directly onto the JSON payload, preserving fields not
|
|
375
|
+
surfaced by the typed <see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.Run(Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunOptions,Microsoft.CodeAnalysis.Sarif.IFileSystem)"/> model.
|
|
437
376
|
</summary>
|
|
438
377
|
</member>
|
|
439
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
378
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryStampVcp(Newtonsoft.Json.Linq.JObject,System.Uri,System.String,System.String,System.String@)">
|
|
440
379
|
<summary>
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
ADO is silent. When both sources publish the same field, the values must agree
|
|
445
|
-
(case-insensitive URI equality for <c>repositoryUri</c>, ordinal for the rest) or
|
|
446
|
-
the method returns false with a diagnostic naming both sources.
|
|
380
|
+
Enriches <c>versionControlProvenance</c> with resolved repository URI, revision id,
|
|
381
|
+
and branch fields. Empty VCP arrays receive a synthesized entry only when a repository
|
|
382
|
+
URI is known; single-entry arrays are enriched; multi-entry arrays are left untouched.
|
|
447
383
|
</summary>
|
|
448
384
|
</member>
|
|
449
|
-
<member name="
|
|
385
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryResolveVcpFields(Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext,Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext,System.Uri@,System.String@,System.String@,System.String@)">
|
|
450
386
|
<summary>
|
|
451
|
-
|
|
387
|
+
Resolves VCP fields from ADO and GitHub Actions contexts. ADO seeds each field; GHA
|
|
388
|
+
fills only the fields ADO left empty. Any field both sources publish must agree, or
|
|
389
|
+
stamping is refused.
|
|
390
|
+
</summary>
|
|
391
|
+
</member>
|
|
392
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunOptions">
|
|
393
|
+
<summary>
|
|
394
|
+
Options for <c>emit-run</c>, which opens an append-only event log
|
|
452
395
|
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
453
396
|
caller-supplied SARIF <c>Run</c> JSON document. Subsequent producers append events to the
|
|
454
|
-
log via the SARIF emit API and finalize via <c>
|
|
397
|
+
log via the SARIF emit API and finalize via <c>emit-finalize</c>.
|
|
455
398
|
</summary>
|
|
456
399
|
<remarks>
|
|
457
400
|
<para>The run JSON is supplied as a JSON document (file via <c>--input</c> or piped on
|
|
458
|
-
stdin)
|
|
459
|
-
<
|
|
460
|
-
|
|
461
|
-
surface that still could not express the legal partial-<c>Run</c> shape the replayer
|
|
462
|
-
accepts (multiple <c>versionControlProvenance</c> entries, <c>properties</c> bags,
|
|
463
|
-
<c>language</c>, <c>columnKind</c>, <c>defaultEncoding</c>, <c>redactionTokens</c>, …).
|
|
464
|
-
The JSON-payload contract keeps the verb generic and lets an AI producer emit
|
|
465
|
-
arbitrarily-rich run headers without losing fidelity.</para>
|
|
466
|
-
<para>Profile-essential defects are validated at receipt: <c>tool.driver.name</c> must
|
|
467
|
-
be a non-empty string; <c>tool.driver.informationUri</c> and
|
|
468
|
-
<c>versionControlProvenance[*].repositoryUri</c> must be <c>https</c>;
|
|
469
|
-
<c>originalUriBaseIds["SRCROOT"].uri</c> must be <c>https</c> or <c>file</c>;
|
|
470
|
-
<c>automationDetails.guid</c> / <c>correlationGuid</c> must be canonical 8-4-4-4-12
|
|
471
|
-
GUIDs; <c>properties["ai/origin"]</c> must be <c>generated</c>, <c>annotated</c>, or
|
|
472
|
-
<c>synthesized</c>. The verb also rejects a SARIF <em>log</em> accidentally supplied in
|
|
473
|
-
place of a <c>Run</c>.</para>
|
|
401
|
+
stdin) and may contain any partial-<c>Run</c> fields the replayer accepts.</para>
|
|
402
|
+
<para>Profile-essential defects are validated at receipt: required <c>tool.driver.name</c>,
|
|
403
|
+
URI schemes, canonical GUIDs, <c>properties["ai/origin"]</c>, and accidental SARIF-log input.</para>
|
|
474
404
|
</remarks>
|
|
475
405
|
</member>
|
|
476
406
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext">
|
|
@@ -546,6 +476,85 @@
|
|
|
546
476
|
<c>branch</c>; absent fields are omitted.
|
|
547
477
|
</summary>
|
|
548
478
|
</member>
|
|
479
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.ReportingDescriptorEmitter">
|
|
480
|
+
<summary>
|
|
481
|
+
Shared implementation behind <c>add-notification-reporting-descriptor</c> and
|
|
482
|
+
<c>add-rule-reporting-descriptor</c>: validates a SARIF reportingDescriptor JSON and
|
|
483
|
+
appends an event to <c><output>.wip.jsonl</c>.
|
|
484
|
+
</summary>
|
|
485
|
+
<remarks>
|
|
486
|
+
Notifications append to <c>run.tool.driver.notifications[]</c>; rules append to
|
|
487
|
+
<c>run.tool.driver.rules[]</c> and require a well-formed <c>NOVEL-</c> id. Each id may
|
|
488
|
+
appear at most once in its target array.
|
|
489
|
+
</remarks>
|
|
490
|
+
</member>
|
|
491
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.ReportingDescriptorEmitter.TryFindDuplicate(System.String,System.String,System.String,System.String,System.String@)">
|
|
492
|
+
<summary>
|
|
493
|
+
Scans the staged event log for a prior descriptor with the same id targeting the
|
|
494
|
+
same array. Returns <c>true</c> with <paramref name="error"/> populated when a
|
|
495
|
+
duplicate is found; <c>false</c> otherwise.
|
|
496
|
+
</summary>
|
|
497
|
+
<remarks>
|
|
498
|
+
The event index in the error matches the event's position in the staged log.
|
|
499
|
+
</remarks>
|
|
500
|
+
</member>
|
|
501
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot">
|
|
502
|
+
<summary>
|
|
503
|
+
Single source of truth for turning a <c>versionControlProvenance.repositoryUri</c> into a
|
|
504
|
+
portable artifact root. <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor"/> mints the root at finalize;
|
|
505
|
+
<see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand"/> validates the repositoryUri shape at receipt so a producer learns
|
|
506
|
+
of a malformed value at authorship rather than after a full run is assembled.
|
|
507
|
+
</summary>
|
|
508
|
+
<remarks>
|
|
509
|
+
Two repository families are recognized:
|
|
510
|
+
<list type="bullet">
|
|
511
|
+
<item><description>
|
|
512
|
+
Azure DevOps: <c>dev.azure.com</c> only, in the exact form
|
|
513
|
+
<c>https://dev.azure.com/<org>/<project>/_git/<repo></c>. The portable root is
|
|
514
|
+
the repository root; commit pinning rides on <c>versionControlProvenance.revisionId</c>
|
|
515
|
+
because Azure DevOps per-file web URLs are query-based
|
|
516
|
+
(<c>?path=&version=GC<sha></c>) and cannot serve as a uriBaseId prefix. The legacy
|
|
517
|
+
<c><org>.visualstudio.com</c> form is rejected; callers must supply the dev.azure.com
|
|
518
|
+
URL, and the derived root is always emitted in that form.
|
|
519
|
+
</description></item>
|
|
520
|
+
<item><description>
|
|
521
|
+
GitHub: <c>github.com</c> (public OSS and Enterprise Managed Users on dotcom) and the
|
|
522
|
+
data-residency / EMU hosts <c><slug>.ghe.com</c>, each with a two-segment
|
|
523
|
+
<c><owner>/<repo></c> path. The portable root is a commit-pinned blob permalink
|
|
524
|
+
(<c>https://<host>/<owner>/<repo>/blob/<revisionId>/</c>). The host set
|
|
525
|
+
is an allow-list: any other host is rejected so a confidently-wrong link is never minted.
|
|
526
|
+
Custom-hostname GitHub Enterprise Server deployments are out of scope.
|
|
527
|
+
</description></item>
|
|
528
|
+
</list>
|
|
529
|
+
SSH and scp-style clone URLs for the GitHub family are normalized to https first. Azure DevOps
|
|
530
|
+
SSH normalization is not supported; such a repositoryUri is rejected with a pointer to the
|
|
531
|
+
https clone URL. The derivation also yields a canonical repositoryUri — the https identity with
|
|
532
|
+
any userinfo stripped — so a credential-bearing or ssh clone URL never ships in the finalized
|
|
533
|
+
run.
|
|
534
|
+
</remarks>
|
|
535
|
+
</member>
|
|
536
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryValidateRepositoryUri(System.Uri,System.String@,System.String@)">
|
|
537
|
+
<summary>
|
|
538
|
+
Validates that <paramref name="rawRepositoryUri"/> has a shape from which a portable root
|
|
539
|
+
can be derived, without minting one (no revisionId required). Used at emit-run receipt.
|
|
540
|
+
</summary>
|
|
541
|
+
</member>
|
|
542
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryGetAzureDevOpsTarget(System.Uri,System.String@,System.String@,System.String@,System.String@)">
|
|
543
|
+
<summary>
|
|
544
|
+
Resolves the Azure DevOps organization, project, and repository from
|
|
545
|
+
<paramref name="rawRepositoryUri"/>, applying the same host and credential guards as
|
|
546
|
+
portable-root derivation. Fails when the repository is not an Azure DevOps target. The
|
|
547
|
+
coordinates are URL-path escaped, ready to compose into a REST endpoint path.
|
|
548
|
+
</summary>
|
|
549
|
+
</member>
|
|
550
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryDerivePortableRoot(System.Uri,System.String,System.Uri@,System.Uri@,System.String@,System.Uri@,System.String@)">
|
|
551
|
+
<summary>
|
|
552
|
+
Mints the portable root for <paramref name="rawRepositoryUri"/>. Used at emit-finalize.
|
|
553
|
+
<paramref name="canonicalRepositoryUri"/> is the clean https identity (userinfo stripped,
|
|
554
|
+
ssh/scp normalized) that should be written back onto the run so the finalized SARIF never
|
|
555
|
+
ships a credential-bearing or non-https repositoryUri.
|
|
556
|
+
</summary>
|
|
557
|
+
</member>
|
|
549
558
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.FileWorkItemsCommand">
|
|
550
559
|
<summary>
|
|
551
560
|
A class that drives SARIF work item filing. This class is responsible for
|
|
@@ -558,6 +567,128 @@
|
|
|
558
567
|
SarifWorkItemFiler in order to complete the work.
|
|
559
568
|
</summary>
|
|
560
569
|
</member>
|
|
570
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetCweCommand">
|
|
571
|
+
<summary>
|
|
572
|
+
Implements <c>get-cwe</c>: serves canonical MITRE CWE data from the SDK's embedded taxonomy.
|
|
573
|
+
</summary>
|
|
574
|
+
<remarks>
|
|
575
|
+
Each record's <c>ruleIdFallback</c> (<c>CWE-<n>/<slug></c>) is the kebab-cased
|
|
576
|
+
CWE name produced by the same helper AI1012 uses, so the two always agree.
|
|
577
|
+
</remarks>
|
|
578
|
+
</member>
|
|
579
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.CweOutputFormat">
|
|
580
|
+
<summary>
|
|
581
|
+
Output format for <c>get-cwe</c>.
|
|
582
|
+
</summary>
|
|
583
|
+
</member>
|
|
584
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetCweOptions">
|
|
585
|
+
<summary>
|
|
586
|
+
Options for <c>get-cwe</c>, which serves canonical MITRE CWE data from the SDK's embedded
|
|
587
|
+
taxonomy. Each record carries a <c>ruleIdFallback</c> — the kebab-cased
|
|
588
|
+
<c>CWE-<n>/<slug></c> a producer can drop into <c>result.ruleId</c> when it will
|
|
589
|
+
not author a sharper sub-id. The fallback is computed the same way AI1012 derives its
|
|
590
|
+
suggestion, so the two always agree.
|
|
591
|
+
</summary>
|
|
592
|
+
</member>
|
|
593
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaCommand">
|
|
594
|
+
<summary>
|
|
595
|
+
Implements <c>get-schema</c>: emits the embedded JSON Schema that validates the
|
|
596
|
+
input to a named emit verb.
|
|
597
|
+
</summary>
|
|
598
|
+
<remarks>
|
|
599
|
+
The served bytes are the assembly's embedded resources, byte-identical to the schema files
|
|
600
|
+
under <c>GetSchema/</c>.
|
|
601
|
+
</remarks>
|
|
602
|
+
</member>
|
|
603
|
+
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaCommand.SchemaByVerb">
|
|
604
|
+
<summary>
|
|
605
|
+
Maps each emit verb to the embedded schema file that validates its input. A null value
|
|
606
|
+
marks a verb whose schema is reserved but not yet available.
|
|
607
|
+
</summary>
|
|
608
|
+
</member>
|
|
609
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaOptions">
|
|
610
|
+
<summary>
|
|
611
|
+
Options for <c>get-schema</c>, which emits the JSON Schema that validates the input to a
|
|
612
|
+
named emit verb. The schema is written verbatim to stdout, or to <c>--output</c>.
|
|
613
|
+
</summary>
|
|
614
|
+
<remarks>
|
|
615
|
+
The schemas served here are the same bytes the emit verbs validate their inputs against,
|
|
616
|
+
so a producer can fetch the contract for the exact verb it is about to call.
|
|
617
|
+
</remarks>
|
|
618
|
+
</member>
|
|
619
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand">
|
|
620
|
+
<summary>
|
|
621
|
+
Implements <c>get-skill</c>: emits an embedded agent skill that drives the multitool emit and
|
|
622
|
+
validate verbs.
|
|
623
|
+
</summary>
|
|
624
|
+
<remarks>
|
|
625
|
+
The source skill under <c>skills/</c> links its references with repository-relative paths so it
|
|
626
|
+
renders correctly in the repo. On the way out those links are rewritten to raw permalinks pinned
|
|
627
|
+
to the build commit SHA, so the emitted skill resolves its references against the exact
|
|
628
|
+
repository state that shipped the running tool.
|
|
629
|
+
</remarks>
|
|
630
|
+
</member>
|
|
631
|
+
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.SkillSourceDirectory">
|
|
632
|
+
<summary>
|
|
633
|
+
Maps each skill to the repository-relative directory of its <c>SKILL.md</c>. The directory
|
|
634
|
+
anchors resolution of the skill's repository-relative links into release-pinned permalinks.
|
|
635
|
+
</summary>
|
|
636
|
+
</member>
|
|
637
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolvePinRef(System.String,System.Version)">
|
|
638
|
+
<summary>
|
|
639
|
+
Resolves the git ref the skill's links are pinned to. Prefers the exact build commit SHA
|
|
640
|
+
that SourceLink stamps into the assembly informational version (<c><version>+<sha></c>),
|
|
641
|
+
so the emitted links resolve to the precise repository state that shipped the running tool —
|
|
642
|
+
the same tree the embedded skill was taken from. Falls back to the version tag when no SHA
|
|
643
|
+
is stamped (e.g. a build with no git metadata).
|
|
644
|
+
</summary>
|
|
645
|
+
</member>
|
|
646
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolveReleaseTag(System.Version)">
|
|
647
|
+
<summary>
|
|
648
|
+
Derives the version tag (e.g. <c>v5.0.2</c>) from the assembly version, which tracks the
|
|
649
|
+
package's <c>VersionPrefix</c>. Used only as a fallback when no build commit SHA is
|
|
650
|
+
available to pin against.
|
|
651
|
+
</summary>
|
|
652
|
+
</member>
|
|
653
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.RewriteRelativeLinks(System.String,System.String,System.String)">
|
|
654
|
+
<summary>
|
|
655
|
+
Rewrites every repository-relative markdown link in <paramref name="markdown"/> to a raw
|
|
656
|
+
permalink pinned to <paramref name="pinRef"/>. Absolute URLs, protocol-relative URLs, and
|
|
657
|
+
bare fragments are left untouched.
|
|
658
|
+
</summary>
|
|
659
|
+
</member>
|
|
660
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolveRepositoryRelative(System.String,System.String)">
|
|
661
|
+
<summary>
|
|
662
|
+
Resolves a relative path against the skill's repository directory into a repository-root
|
|
663
|
+
path, collapsing <c>.</c> and <c>..</c> segments.
|
|
664
|
+
</summary>
|
|
665
|
+
</member>
|
|
666
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.TryGetSkillDescription(System.String)">
|
|
667
|
+
<summary>
|
|
668
|
+
Returns the skill's frontmatter <c>description</c>, or <c>null</c> when the embedded resource
|
|
669
|
+
is missing or declares none. This is the single source of truth for the skill's one-line
|
|
670
|
+
summary — the same scalar a consumer reads from the emitted document's frontmatter.
|
|
671
|
+
</summary>
|
|
672
|
+
</member>
|
|
673
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ExtractFrontmatterDescription(System.String)">
|
|
674
|
+
<summary>
|
|
675
|
+
Extracts the <c>description</c> scalar from a skill document's leading YAML frontmatter block.
|
|
676
|
+
Returns <c>null</c> when the document opens no frontmatter, declares no description, or uses a
|
|
677
|
+
multi-line block scalar (which the terse catalog does not render).
|
|
678
|
+
</summary>
|
|
679
|
+
</member>
|
|
680
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillOptions">
|
|
681
|
+
<summary>
|
|
682
|
+
Options for <c>get-skill</c>, which emits an agent skill that drives the multitool emit and
|
|
683
|
+
validate verbs. The skill markdown is written to stdout, or to <c>--output</c>.
|
|
684
|
+
</summary>
|
|
685
|
+
<remarks>
|
|
686
|
+
The skill ships embedded in the package, so an agent that resolves the tool (for example via
|
|
687
|
+
<c>dotnet dnx</c>) obtains the procedure from the same artifact it runs. Relative links in the
|
|
688
|
+
source skill are rewritten to commit-pinned permalinks on the way out, so the emitted document
|
|
689
|
+
resolves its references against the exact repository state that built the tool.
|
|
690
|
+
</remarks>
|
|
691
|
+
</member>
|
|
561
692
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.MultitoolResources">
|
|
562
693
|
<summary>
|
|
563
694
|
A strongly-typed resource class, for looking up localized strings, etc.
|
|
@@ -641,6 +772,37 @@
|
|
|
641
772
|
inline: We build a map of the input, so we don't want to write inline and immediately invalidate it.
|
|
642
773
|
</remarks>
|
|
643
774
|
</member>
|
|
775
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoCommand">
|
|
776
|
+
<summary>
|
|
777
|
+
Implements <c>publish-to-ghazdo</c>: uploads a SARIF file to GitHub Advanced Security for
|
|
778
|
+
Azure DevOps. The target organization, project, and repository are derived from the run's
|
|
779
|
+
<c>versionControlProvenance</c>, and the bearer secret is read from an environment variable
|
|
780
|
+
named by <c>--token-env-var</c> so it never appears on the command line or in diagnostics.
|
|
781
|
+
</summary>
|
|
782
|
+
<remarks>
|
|
783
|
+
The secret kind selects the authorization scheme: an Entra access token is a JSON Web Token and
|
|
784
|
+
is sent as <c>Bearer</c>; an Azure DevOps personal access token is opaque and is sent as
|
|
785
|
+
<c>Basic</c> with an empty user name. The body is gzip-compressed in memory and posted as
|
|
786
|
+
<c>application/octet-stream</c> with no <c>Content-Encoding</c> header, because the ingestion
|
|
787
|
+
endpoint gunzips the payload itself. The upload targets <c>advsec.dev.azure.com</c> and falls
|
|
788
|
+
back to <c>dev.azure.com</c> on a 404.
|
|
789
|
+
</remarks>
|
|
790
|
+
</member>
|
|
791
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoCommand.DetectScheme(System.String)">
|
|
792
|
+
<summary>
|
|
793
|
+
Selects the authorization scheme for <paramref name="secret"/>. An Entra access token is a
|
|
794
|
+
JSON Web Token (<c>Bearer</c>); an opaque Azure DevOps personal access token is wrapped as
|
|
795
|
+
<c>Basic</c> with an empty user name.
|
|
796
|
+
</summary>
|
|
797
|
+
</member>
|
|
798
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoOptions">
|
|
799
|
+
<summary>
|
|
800
|
+
Options for <c>publish-to-ghazdo</c>, which uploads a finalized SARIF file to GitHub Advanced
|
|
801
|
+
Security for Azure DevOps. The Azure DevOps target is derived from the run's version-control
|
|
802
|
+
provenance, and the bearer secret is read from an environment variable named by
|
|
803
|
+
<c>--token-env-var</c>, never from the command line.
|
|
804
|
+
</summary>
|
|
805
|
+
</member>
|
|
644
806
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.QueryOptions">
|
|
645
807
|
<summary>
|
|
646
808
|
Options for the 'Query' command, which runs a query expression on a SARIF file
|
|
@@ -667,14 +829,14 @@
|
|
|
667
829
|
AI1006
|
|
668
830
|
</summary>
|
|
669
831
|
</member>
|
|
670
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
832
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.DoNotPersistFingerprints.Id">
|
|
671
833
|
<summary>
|
|
672
|
-
|
|
834
|
+
AI1007
|
|
673
835
|
</summary>
|
|
674
836
|
</member>
|
|
675
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
837
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.ProvideEvidenceBackingUri.Id">
|
|
676
838
|
<summary>
|
|
677
|
-
|
|
839
|
+
AI1010
|
|
678
840
|
</summary>
|
|
679
841
|
</member>
|
|
680
842
|
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.ProvideRuleSubId.Id">
|
|
@@ -702,7 +864,7 @@
|
|
|
702
864
|
AI2010
|
|
703
865
|
</summary>
|
|
704
866
|
</member>
|
|
705
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
867
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.DoNotPersistPartialFingerprints.Id">
|
|
706
868
|
<summary>
|
|
707
869
|
AI2011
|
|
708
870
|
</summary>
|
|
@@ -2338,40 +2500,22 @@
|
|
|
2338
2500
|
<returns></returns>
|
|
2339
2501
|
</member>
|
|
2340
2502
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.AIOriginPropertyName">
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
templates, and rule ids ride the <c>NOVEL-</c> / <c>BASE/sub-id</c>
|
|
2347
|
-
convention rather than a fixed tool prefix. Style-class validation rules
|
|
2348
|
-
(e.g. SARIF2002, SARIF2009, SARIF2014, SARIF2015) encode human-authoring
|
|
2349
|
-
guidance whose preconditions don't hold for AI output, so they suppress
|
|
2350
|
-
themselves when this marker is set.
|
|
2351
|
-
|
|
2352
|
-
Correctness-class rules (snippets, hashes, provenance, relative URIs, etc.)
|
|
2353
|
-
must NOT consult this marker — those checks apply uniformly to AI content.
|
|
2354
|
-
</summary>
|
|
2503
|
+
<summary>
|
|
2504
|
+
Run property whose non-empty value declares AI-origin SARIF. Style-class validation
|
|
2505
|
+
rules may suppress human-authoring guidance when this marker is set; correctness-class
|
|
2506
|
+
rules (snippets, hashes, provenance, relative URIs, etc.) must not.
|
|
2507
|
+
</summary>
|
|
2355
2508
|
</member>
|
|
2356
2509
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun(Microsoft.CodeAnalysis.Sarif.Run)">
|
|
2357
2510
|
<summary>
|
|
2358
|
-
Returns true when <paramref name="run"/> declares AI provenance via
|
|
2359
|
-
<c>ai/origin</c> run property.
|
|
2360
|
-
vocabulary (<c>generated</c>, <c>annotated</c>, <c>synthesized</c>, …)
|
|
2361
|
-
is open by design so AI tooling can self-describe at any granularity.
|
|
2511
|
+
Returns true when <paramref name="run"/> declares AI provenance via a non-empty
|
|
2512
|
+
<c>ai/origin</c> run property.
|
|
2362
2513
|
</summary>
|
|
2363
|
-
<exception cref="T:System.ArgumentNullException">
|
|
2364
|
-
<paramref name="run"/> is null. Callers reading AI-origin during rule
|
|
2365
|
-
dispatch should already hold a non-null run; the strict contract makes
|
|
2366
|
-
upstream lifecycle bugs loud rather than masking them as "not AI".
|
|
2367
|
-
</exception>
|
|
2514
|
+
<exception cref="T:System.ArgumentNullException"><paramref name="run"/> is null.</exception>
|
|
2368
2515
|
</member>
|
|
2369
2516
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun">
|
|
2370
2517
|
<summary>
|
|
2371
|
-
|
|
2372
|
-
declares AI provenance. Returns false when there is no current run
|
|
2373
|
-
scope (e.g. an <c>Analyze(SarifLog)</c> dispatch); otherwise defers to
|
|
2374
|
-
<see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun(Microsoft.CodeAnalysis.Sarif.Run)"/>.
|
|
2518
|
+
Reports whether the run currently being visited declares AI provenance.
|
|
2375
2519
|
</summary>
|
|
2376
2520
|
</member>
|
|
2377
2521
|
</members>
|
package/Sarif.Multitool.pdb
CHANGED
|
Binary file
|
package/Sarif.WorkItems.pdb
CHANGED
|
Binary file
|
package/Sarif.pdb
CHANGED
|
Binary file
|
package/Sarif.xml
CHANGED
|
@@ -6871,38 +6871,21 @@
|
|
|
6871
6871
|
Enforces the SARIF SDK AI-authoring convention for <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>.
|
|
6872
6872
|
</summary>
|
|
6873
6873
|
<remarks>
|
|
6874
|
-
<para>
|
|
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>
|
|
6874
|
+
<para>Accepted ruleId forms:</para>
|
|
6877
6875
|
<list type="bullet">
|
|
6878
|
-
<item><description><
|
|
6879
|
-
|
|
6880
|
-
<c>
|
|
6881
|
-
|
|
6882
|
-
(e.g., <c>CWE-89/kql-injection-from-config</c>).</description></item>
|
|
6883
|
-
<item><description><b>NOVEL escape hatch</b> — <c>NOVEL-<sub-id></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>
|
|
6876
|
+
<item><description><c>CWE-<number>/<sub-id></c>, where <c>sub-id</c> is lowercase
|
|
6877
|
+
alphanumeric kebab-case; for example, <c>CWE-89/kql-injection-from-config</c>.</description></item>
|
|
6878
|
+
<item><description><c>NOVEL-<sub-id></c> for findings with no CWE mapping; the
|
|
6879
|
+
NOVEL- form is flat and does not accept a slash.</description></item>
|
|
6888
6880
|
</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
6881
|
<para>Producers using <see cref="T:Microsoft.CodeAnalysis.Sarif.Writers.SarifLogger"/> directly do not flow through
|
|
6896
|
-
this convention
|
|
6882
|
+
this convention; it is specific to the AI-authoring emit verb path.</para>
|
|
6897
6883
|
</remarks>
|
|
6898
6884
|
</member>
|
|
6899
6885
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsNovel(System.String)">
|
|
6900
6886
|
<summary>
|
|
6901
6887
|
Returns true when <paramref name="ruleId"/> starts with the NOVEL- escape-hatch
|
|
6902
|
-
prefix
|
|
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.
|
|
6888
|
+
prefix; the full grammar is enforced by <see cref="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsAcceptable(System.String)"/>.
|
|
6906
6889
|
</summary>
|
|
6907
6890
|
</member>
|
|
6908
6891
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.IsAcceptable(System.String)">
|
|
@@ -6914,16 +6897,13 @@
|
|
|
6914
6897
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.ThrowIfUnacceptable(System.String)">
|
|
6915
6898
|
<summary>
|
|
6916
6899
|
Throws <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> if <paramref name="ruleId"/>
|
|
6917
|
-
does not conform.
|
|
6918
|
-
what was rejected, why, and exactly which two forms are accepted.
|
|
6900
|
+
does not conform.
|
|
6919
6901
|
</summary>
|
|
6920
6902
|
</member>
|
|
6921
6903
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention.ThrowIfAnyUnacceptable(System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.Result})">
|
|
6922
6904
|
<summary>
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
so an AI orchestrator can correct them in one round trip rather than discovering
|
|
6926
|
-
them one at a time.
|
|
6905
|
+
Throws a single <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> listing every result whose
|
|
6906
|
+
<see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/> violates the convention.
|
|
6927
6907
|
</summary>
|
|
6928
6908
|
</member>
|
|
6929
6909
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException">
|
|
@@ -6932,19 +6912,16 @@
|
|
|
6932
6912
|
values violate <see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention"/>.
|
|
6933
6913
|
</summary>
|
|
6934
6914
|
<remarks>
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
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>
|
|
6915
|
+
The exception message lists every offending id, the accepted shapes, and the
|
|
6916
|
+
documentation pointer. <see cref="P:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.OffendingRuleIds"/> exposes the same ids for
|
|
6917
|
+
programmatic consumers.
|
|
6942
6918
|
</remarks>
|
|
6943
6919
|
</member>
|
|
6944
6920
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.ErrorCode">
|
|
6945
6921
|
<summary>
|
|
6946
6922
|
Stable error code so downstream tooling can pattern-match without parsing the
|
|
6947
|
-
human-readable message body.
|
|
6923
|
+
human-readable message body. This is the canonical AI1012 (ProvideRuleSubId)
|
|
6924
|
+
rule id, so the emit-time rejection and the post-hoc validator report one id.
|
|
6948
6925
|
</summary>
|
|
6949
6926
|
</member>
|
|
6950
6927
|
<member name="P:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException.OffendingRuleIds">
|
|
@@ -7010,45 +6987,24 @@
|
|
|
7010
6987
|
replay engine auto-registers descriptors keyed by <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>.
|
|
7011
6988
|
</summary>
|
|
7012
6989
|
</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
6990
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation">
|
|
7028
6991
|
<summary>
|
|
7029
|
-
A complete <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation"/> object.
|
|
7030
|
-
|
|
6992
|
+
A complete <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation"/> object. Producer-supplied <see cref="T:Microsoft.CodeAnalysis.Sarif.Notification"/>
|
|
6993
|
+
objects travel inline on the invocation's <c>toolExecutionNotifications</c> /
|
|
6994
|
+
<c>toolConfigurationNotifications</c> arrays.
|
|
7031
6995
|
</summary>
|
|
7032
6996
|
</member>
|
|
7033
6997
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.RuleDescriptor">
|
|
7034
6998
|
<summary>
|
|
7035
|
-
A
|
|
7036
|
-
|
|
7037
|
-
|
|
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.
|
|
6999
|
+
A <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at <c>run.tool.driver.rules</c>.
|
|
7000
|
+
Explicit descriptors are merged before result-driven auto-registration and are
|
|
7001
|
+
reserved for NOVEL- ruleIds.
|
|
7043
7002
|
</summary>
|
|
7044
7003
|
</member>
|
|
7045
7004
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.NotificationDescriptor">
|
|
7046
7005
|
<summary>
|
|
7047
|
-
A
|
|
7048
|
-
|
|
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.
|
|
7006
|
+
A <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at <c>run.tool.driver.notifications</c>.
|
|
7007
|
+
Notification descriptor ids are opaque non-empty strings.
|
|
7052
7008
|
</summary>
|
|
7053
7009
|
</member>
|
|
7054
7010
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.CurrentSchemaVersion">
|
|
@@ -7075,8 +7031,7 @@
|
|
|
7075
7031
|
</member>
|
|
7076
7032
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogReader.Read(System.String)">
|
|
7077
7033
|
<summary>
|
|
7078
|
-
Streams events from the given path.
|
|
7079
|
-
silently skipped. Unknown <c>v</c> for a known kind throws.
|
|
7034
|
+
Streams events from the given path.
|
|
7080
7035
|
</summary>
|
|
7081
7036
|
</member>
|
|
7082
7037
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter">
|
|
@@ -7123,35 +7078,13 @@
|
|
|
7123
7078
|
<para>v1 contract:</para>
|
|
7124
7079
|
<list type="bullet">
|
|
7125
7080
|
<item><description>At most one <c>run-header</c> event; if present, it SHOULD be first.
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
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><BASE>/<sub-id></c>, e.g., <c>CWE-89/kql-injection-from-config</c>) or
|
|
7136
|
-
NOVEL escape hatch (<c>NOVEL-<sub-id></c>). Violations throw
|
|
7137
|
-
<see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConventionException"/> listing every offender at once.</description></item>
|
|
7081
|
+
Header <c>results</c>, <c>invocations</c>, and <c>notifications</c> are ignored.</description></item>
|
|
7082
|
+
<item><description><c>result</c> events MUST be self-contained. <c>ruleIndex</c> is
|
|
7083
|
+
re-derived from <c>ruleId</c>, and every <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/> MUST conform to
|
|
7084
|
+
<see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention"/>.</description></item>
|
|
7138
7085
|
<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>
|
|
7086
|
+
event order and replayed verbatim.</description></item>
|
|
7150
7087
|
</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
7088
|
</remarks>
|
|
7156
7089
|
</member>
|
|
7157
7090
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.Replay(System.String)">
|
|
@@ -7178,26 +7111,16 @@
|
|
|
7178
7111
|
<c>notification-descriptor</c> events into the target list on the run's driver.
|
|
7179
7112
|
</summary>
|
|
7180
7113
|
<remarks>
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
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>
|
|
7114
|
+
Header entries are preserved by reference, and descriptor events are appended after
|
|
7115
|
+
them. For rules, this method must run before <see cref="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.RegisterDescriptorsFromResults(Microsoft.CodeAnalysis.Sarif.Run,System.Collections.Generic.IList{Microsoft.CodeAnalysis.Sarif.Result})"/>
|
|
7116
|
+
so explicit descriptors seed the <c>idToIndex</c> table.
|
|
7191
7117
|
</remarks>
|
|
7192
7118
|
</member>
|
|
7193
7119
|
<!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[])" -->
|
|
7194
7120
|
<!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[],System.Int32,System.Int32)" -->
|
|
7195
7121
|
<member name="T:Microsoft.CodeAnalysis.Sarif.FileRegionsCache">
|
|
7196
7122
|
<summary>
|
|
7197
|
-
|
|
7198
|
-
regions with comprehensive data, to retrieve file text
|
|
7199
|
-
associated with a SARIF log, and to construct text
|
|
7200
|
-
snippets associated with region instances.
|
|
7123
|
+
Caches file text, hashes, newline indexes, and region snippets for SARIF enrichment.
|
|
7201
7124
|
</summary>
|
|
7202
7125
|
</member>
|
|
7203
7126
|
<member name="P:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.HashAlgorithms">
|
|
@@ -7228,15 +7151,14 @@
|
|
|
7228
7151
|
for files. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default"/> (SHA-256 only).
|
|
7229
7152
|
</param>
|
|
7230
7153
|
</member>
|
|
7231
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.PopulateTextRegionProperties(Microsoft.CodeAnalysis.Sarif.Region,System.Uri,System.Boolean,System.String)">
|
|
7154
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.PopulateTextRegionProperties(Microsoft.CodeAnalysis.Sarif.Region,System.Uri,System.Boolean,System.String,System.Boolean)">
|
|
7232
7155
|
<summary>
|
|
7233
7156
|
Creates a <see cref="T:Microsoft.CodeAnalysis.Sarif.Region"/> object, based on an existing Region, in which all
|
|
7234
7157
|
text-related properties have been populated.
|
|
7235
7158
|
</summary>
|
|
7236
7159
|
<remarks>
|
|
7237
|
-
For example,
|
|
7238
|
-
Region
|
|
7239
|
-
as properties, such as CharOffset, CharLength, etc.
|
|
7160
|
+
For example, a region with only <see cref="P:Microsoft.CodeAnalysis.Sarif.Region.StartLine"/> can receive computed
|
|
7161
|
+
<see cref="P:Microsoft.CodeAnalysis.Sarif.Region.CharOffset"/> and <see cref="P:Microsoft.CodeAnalysis.Sarif.Region.CharLength"/> values.
|
|
7240
7162
|
</remarks>
|
|
7241
7163
|
<param name="inputRegion">
|
|
7242
7164
|
Region object that forms the basis of the returned Region object.
|
|
@@ -7252,6 +7174,12 @@
|
|
|
7252
7174
|
An optional argument that, if present, contains the text contents of the file
|
|
7253
7175
|
specified by <paramref name="uri"/>.
|
|
7254
7176
|
</param>
|
|
7177
|
+
<param name="overwriteExistingData">
|
|
7178
|
+
Controls how an authored region coordinate that diverges from the value computed
|
|
7179
|
+
from the source text is reconciled. When <c>false</c> (the default), the divergence
|
|
7180
|
+
throws an <see cref="T:System.ArgumentException"/>; when <c>true</c>, the authored value is
|
|
7181
|
+
overwritten with the computed value.
|
|
7182
|
+
</param>
|
|
7255
7183
|
<returns>
|
|
7256
7184
|
A Region object whose text-related properties have been fully populated.
|
|
7257
7185
|
</returns>
|
|
@@ -7261,12 +7189,25 @@
|
|
|
7261
7189
|
Clear current cache.
|
|
7262
7190
|
</summary>
|
|
7263
7191
|
</member>
|
|
7264
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.
|
|
7192
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.GetText(System.Uri,System.String)">
|
|
7265
7193
|
<summary>
|
|
7266
|
-
|
|
7194
|
+
Returns the full text of the artifact at <paramref name="uri"/>, reading it from the
|
|
7195
|
+
file system on first access and caching the result. Returns <c>null</c> when the file
|
|
7196
|
+
cannot be read (missing, I/O error, or access denied).
|
|
7197
|
+
</summary>
|
|
7198
|
+
</member>
|
|
7199
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.ReconcileRegionCoordinate(System.Boolean,System.String,System.Int32,System.Int32)">
|
|
7200
|
+
<summary>
|
|
7201
|
+
Reconciles an authored region coordinate against the value computed from the source
|
|
7202
|
+
text. If they agree (including the common case where the value was just computed and
|
|
7203
|
+
assigned because the authored value was absent), the value is returned unchanged.
|
|
7204
|
+
On a genuine divergence the behavior depends on <paramref name="overwriteExistingData"/>.
|
|
7205
|
+
</summary>
|
|
7206
|
+
</member>
|
|
7207
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.ReconcileRegionBounds(System.Boolean,System.Int32,System.Int32,System.Int32)">
|
|
7208
|
+
<summary>
|
|
7209
|
+
Reconciles an authored region whose character span extends beyond the source file.
|
|
7267
7210
|
</summary>
|
|
7268
|
-
<param name="path">Uri.LocalPath for the file to load</param>
|
|
7269
|
-
<returns>Cache entry to add to cache with file contents and NewLineIndex</returns>
|
|
7270
7211
|
</member>
|
|
7271
7212
|
<member name="M:Microsoft.CodeAnalysis.Sarif.FileSearcherHelper.SearchForFileInEnvironmentVariable(System.String,System.String,Microsoft.CodeAnalysis.Sarif.IFileSystem)">
|
|
7272
7213
|
<summary>
|
|
@@ -9919,16 +9860,9 @@
|
|
|
9919
9860
|
taxonomy artifacts.
|
|
9920
9861
|
</summary>
|
|
9921
9862
|
<remarks>
|
|
9922
|
-
<para>
|
|
9923
|
-
|
|
9924
|
-
|
|
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>
|
|
9863
|
+
<para>Producer-supplied descriptor fields are never overwritten.</para>
|
|
9864
|
+
<para>This enricher does not add cross-references via
|
|
9865
|
+
<c>reportingDescriptor.relationships</c> or <c>result.taxa</c>.</para>
|
|
9932
9866
|
</remarks>
|
|
9933
9867
|
</member>
|
|
9934
9868
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomyEnricher.Enrich(Microsoft.CodeAnalysis.Sarif.Run,Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus)">
|
|
@@ -9939,9 +9873,7 @@
|
|
|
9939
9873
|
<param name="run">The run whose <c>tool.driver.rules</c> and <c>tool.extensions[].rules</c> are enriched.</param>
|
|
9940
9874
|
<param name="statuses">
|
|
9941
9875
|
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"
|
|
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.
|
|
9876
|
+
(<c>Stable | Draft | Incomplete</c>), which excludes <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Deprecated"/>.
|
|
9945
9877
|
</param>
|
|
9946
9878
|
<returns>The number of descriptors whose content was modified.</returns>
|
|
9947
9879
|
</member>
|
package/WorkItems.pdb
CHANGED
|
Binary file
|