@microsoft/sarif-multitool-darwin 5.0.1 → 5.0.3
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 +432 -200
- package/Sarif.Multitool.pdb +0 -0
- package/Sarif.WorkItems.pdb +0 -0
- package/Sarif.pdb +0 -0
- package/Sarif.xml +54 -130
- 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 AI-RULEID-001) 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
|
|
@@ -183,6 +115,18 @@
|
|
|
183
115
|
</list>
|
|
184
116
|
</remarks>
|
|
185
117
|
</member>
|
|
118
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.RepositoryUri">
|
|
119
|
+
<summary>
|
|
120
|
+
Absolute URL identifier of the source repository. Lifted from
|
|
121
|
+
<c>BUILD_REPOSITORY_URI</c> when present and well-formed; otherwise null.
|
|
122
|
+
</summary>
|
|
123
|
+
</member>
|
|
124
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.RevisionId">
|
|
125
|
+
<summary>
|
|
126
|
+
The commit identifier (typically a 40-character SHA-1) the pipeline is building.
|
|
127
|
+
Lifted from <c>BUILD_SOURCEVERSION</c> when present and well-formed; otherwise null.
|
|
128
|
+
</summary>
|
|
129
|
+
</member>
|
|
186
130
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.TryDetect(Microsoft.CodeAnalysis.Sarif.Multitool.IEnvironmentVariableGetter,Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext@,System.String@)">
|
|
187
131
|
<summary>
|
|
188
132
|
Reads ADO predefined environment variables via <paramref name="environment"/> and
|
|
@@ -204,7 +148,7 @@
|
|
|
204
148
|
</summary>
|
|
205
149
|
<remarks>
|
|
206
150
|
<para>The "stamp only when absent, fail on conflict" contract is required because
|
|
207
|
-
callers (notably <c>emit-
|
|
151
|
+
callers (notably <c>emit-run</c>'s JSON-payload contract) may supply these
|
|
208
152
|
fields directly. An unconditional overwrite would silently clobber a producer's
|
|
209
153
|
declared identity; a conflict is a misconfiguration signal that we want to surface
|
|
210
154
|
at the verb rather than ship in the run.</para>
|
|
@@ -229,17 +173,35 @@
|
|
|
229
173
|
without constructing a typed <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/>.
|
|
230
174
|
</summary>
|
|
231
175
|
</member>
|
|
176
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.HasVcpFields">
|
|
177
|
+
<summary>
|
|
178
|
+
True when this context carries at least one <c>versionControlProvenance</c>
|
|
179
|
+
field (repository URI, revision id, or branch ref) lifted from the pipeline
|
|
180
|
+
environment. False indicates the VCP enrichment path is a no-op for this
|
|
181
|
+
context and callers should leave any caller-supplied VCP untouched.
|
|
182
|
+
</summary>
|
|
183
|
+
</member>
|
|
184
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.GetVcpFieldValues">
|
|
185
|
+
<summary>
|
|
186
|
+
Returns the non-null <c>versionControlProvenance</c> field name/value pairs
|
|
187
|
+
for this pipeline context. Pairs are ordered <c>repositoryUri</c>,
|
|
188
|
+
<c>revisionId</c>, <c>branch</c>; absent fields are omitted (the caller
|
|
189
|
+
should treat the list as the set we know about). Exposed so JSON-direct
|
|
190
|
+
callers can enrich without constructing a typed
|
|
191
|
+
<see cref="T:Microsoft.CodeAnalysis.Sarif.VersionControlDetails"/>.
|
|
192
|
+
</summary>
|
|
193
|
+
</member>
|
|
232
194
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers">
|
|
233
195
|
<summary>
|
|
234
|
-
Shared plumbing for the emit verb chain (<c>emit-
|
|
235
|
-
<c>add-
|
|
236
|
-
|
|
237
|
-
|
|
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.
|
|
238
201
|
</summary>
|
|
239
202
|
<remarks>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
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.
|
|
243
205
|
</remarks>
|
|
244
206
|
</member>
|
|
245
207
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.TryValidateUri(System.String,System.String,System.String[],System.String@)">
|
|
@@ -248,12 +210,8 @@
|
|
|
248
210
|
absolute URI whose scheme appears in <paramref name="allowedSchemes"/>.
|
|
249
211
|
</summary>
|
|
250
212
|
<remarks>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
values would never resolve meaningfully into a SARIF reader downstream) and we
|
|
254
|
-
constrain the scheme to a documented allow-list so a typo like <c>"htps://..."</c>
|
|
255
|
-
or an inappropriate scheme like <c>"file:..."</c> on a public-facing URL surfaces
|
|
256
|
-
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.
|
|
257
215
|
</remarks>
|
|
258
216
|
</member>
|
|
259
217
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.TryResolveWipPath(System.String,Microsoft.CodeAnalysis.Sarif.IFileSystem,System.String@)">
|
|
@@ -282,18 +240,13 @@
|
|
|
282
240
|
</member>
|
|
283
241
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers.ReadStandardInputAsUtf8">
|
|
284
242
|
<summary>
|
|
285
|
-
Reads redirected stdin as UTF-8, bypassing <see cref="P:System.Console.InputEncoding"
|
|
286
|
-
|
|
287
|
-
(often cp437 or cp850), which would mangle non-ASCII content in a piped
|
|
288
|
-
SARIF payload. AI orchestrators routinely emit messages, URIs, and properties
|
|
289
|
-
containing non-ASCII characters, so we must decode the raw byte stream as UTF-8
|
|
290
|
-
regardless of the console's current code page. A BOM-stamped input is still
|
|
291
|
-
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.
|
|
292
245
|
</summary>
|
|
293
246
|
</member>
|
|
294
247
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeCommand">
|
|
295
248
|
<summary>
|
|
296
|
-
Implements <c>
|
|
249
|
+
Implements <c>emit-finalize</c>: replays <c><output>.wip.jsonl</c>,
|
|
297
250
|
optionally enriches CWE-as-rule-id descriptors, and atomically writes the destination
|
|
298
251
|
SARIF file.
|
|
299
252
|
</summary>
|
|
@@ -311,15 +264,41 @@
|
|
|
311
264
|
writes the destination SARIF file.
|
|
312
265
|
</summary>
|
|
313
266
|
</member>
|
|
314
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
267
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor">
|
|
315
268
|
<summary>
|
|
316
|
-
|
|
269
|
+
Rewrites absolute local file paths in a run into relative URIs plus portable, per-repository
|
|
270
|
+
<c>uriBaseId</c>s derived from <c>versionControlProvenance</c>. Each artifact location is
|
|
271
|
+
resolved against the run's input <c>originalUriBaseIds</c>, attributed to the owning
|
|
272
|
+
repository by longest-prefix match on the mapped local root, and re-expressed relative to
|
|
273
|
+
that repository's minted output base. The rebuilt <c>originalUriBaseIds</c> anchor each base
|
|
274
|
+
at a portable root — a GitHub-compatible blob permalink (commit-pinned in the URL) or an Azure
|
|
275
|
+
DevOps repository root (commit pinning carried by <c>versionControlProvenance.revisionId</c>),
|
|
276
|
+
derived from the repositoryUri by <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot"/> — so the finalized SARIF
|
|
277
|
+
carries no machine-specific path.
|
|
278
|
+
</summary>
|
|
279
|
+
<remarks>
|
|
280
|
+
One repository collapses to the bare <c>SRCROOT</c> base. Multiple repositories each receive
|
|
281
|
+
<c>SRCROOT_<REPO-LEAF></c>, disambiguated by an ordinal suffix on collision. A result URI
|
|
282
|
+
that resolves to a local file path under no declared repository root fails finalize (it would
|
|
283
|
+
leak); an unmatched URI under a portable scheme is inlined as an absolute reference.
|
|
284
|
+
</remarks>
|
|
285
|
+
</member>
|
|
286
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInputOptionsBase">
|
|
287
|
+
<summary>
|
|
288
|
+
Shared options for the emit verbs that append a JSON object to a staged event log: the
|
|
289
|
+
destination SARIF path and the JSON input (file or stdin).
|
|
290
|
+
</summary>
|
|
291
|
+
</member>
|
|
292
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand">
|
|
293
|
+
<summary>
|
|
294
|
+
Implements <c>emit-run</c>: creates an append-only SARIF event log
|
|
317
295
|
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
318
296
|
caller-supplied SARIF <c>Run</c> JSON document (file via <c>--input</c> or stdin).
|
|
319
297
|
</summary>
|
|
320
298
|
<remarks>
|
|
321
299
|
<para>The JSON-payload contract matches the other emit verbs (<c>add-result</c>,
|
|
322
|
-
<c>add-
|
|
300
|
+
<c>add-invocation</c>, <c>add-notification-reporting-descriptor</c>,
|
|
301
|
+
<c>add-rule-reporting-descriptor</c>). The supplied <c>Run</c> may
|
|
323
302
|
carry any subset of the partial-Run shape the replayer accepts (<c>tool</c>,
|
|
324
303
|
<c>language</c>, <c>columnKind</c>, <c>defaultEncoding</c>, <c>defaultSourceLanguage</c>,
|
|
325
304
|
<c>originalUriBaseIds</c>, <c>versionControlProvenance</c>, <c>automationDetails</c>,
|
|
@@ -355,52 +334,207 @@
|
|
|
355
334
|
</list>
|
|
356
335
|
</remarks>
|
|
357
336
|
</member>
|
|
358
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
337
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryValidateVcpRepositoryShapes(Newtonsoft.Json.Linq.JObject)">
|
|
338
|
+
<summary>
|
|
339
|
+
Confirms that every present <c>versionControlProvenance[].repositoryUri</c> has a shape
|
|
340
|
+
from which <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor"/> can later derive a portable root. Runs
|
|
341
|
+
after header validation (which proves each value is an absolute https URI) and after env
|
|
342
|
+
stamping, so both caller-supplied and stamped entries are covered. Entries without a
|
|
343
|
+
repositoryUri are left to the finalize-time contract.
|
|
344
|
+
</summary>
|
|
345
|
+
</member>
|
|
346
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryRequireOptionalObject(Newtonsoft.Json.Linq.JObject,System.String,Newtonsoft.Json.Linq.JObject@)">
|
|
347
|
+
<summary>
|
|
348
|
+
Requires an optional token to be null/absent or a JSON object; returns the object via
|
|
349
|
+
<paramref name="value"/>.
|
|
350
|
+
</summary>
|
|
351
|
+
</member>
|
|
352
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryStampAdoContext(Newtonsoft.Json.Linq.JObject,Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext,System.String@)">
|
|
353
|
+
<summary>
|
|
354
|
+
Stamps ADO pipeline identity directly onto the JSON payload, preserving fields not
|
|
355
|
+
surfaced by the typed <see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.Run(Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunOptions,Microsoft.CodeAnalysis.Sarif.IFileSystem)"/> model.
|
|
356
|
+
</summary>
|
|
357
|
+
</member>
|
|
358
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand.TryStampVcp(Newtonsoft.Json.Linq.JObject,System.Uri,System.String,System.String,System.String@)">
|
|
359
359
|
<summary>
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
is
|
|
363
|
-
AI-consumable diagnostic when the key is present but the wrong shape (e.g.
|
|
364
|
-
<c>"tool": "x"</c>). Walking parent shapes up front prevents JValue indexer accesses
|
|
365
|
-
further down the validator chain from throwing InvalidOperationException.
|
|
360
|
+
Enriches <c>versionControlProvenance</c> with resolved repository URI, revision id,
|
|
361
|
+
and branch fields. Empty VCP arrays receive a synthesized entry only when a repository
|
|
362
|
+
URI is known; single-entry arrays are enriched; multi-entry arrays are left untouched.
|
|
366
363
|
</summary>
|
|
367
364
|
</member>
|
|
368
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
365
|
+
<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@)">
|
|
369
366
|
<summary>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
the wip line. (The replayer materializes a typed <c>Run</c> at finalize time, so
|
|
374
|
-
non-typed fields are durable only up to that boundary.)
|
|
367
|
+
Resolves VCP fields from ADO and GitHub Actions contexts. ADO seeds each field; GHA
|
|
368
|
+
fills only the fields ADO left empty. Any field both sources publish must agree, or
|
|
369
|
+
stamping is refused.
|
|
375
370
|
</summary>
|
|
376
371
|
</member>
|
|
377
|
-
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.
|
|
372
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunOptions">
|
|
378
373
|
<summary>
|
|
379
|
-
Options for <c>emit-
|
|
374
|
+
Options for <c>emit-run</c>, which opens an append-only event log
|
|
380
375
|
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
381
376
|
caller-supplied SARIF <c>Run</c> JSON document. Subsequent producers append events to the
|
|
382
|
-
log via the SARIF emit API and finalize via <c>
|
|
377
|
+
log via the SARIF emit API and finalize via <c>emit-finalize</c>.
|
|
383
378
|
</summary>
|
|
384
379
|
<remarks>
|
|
385
380
|
<para>The run JSON is supplied as a JSON document (file via <c>--input</c> or piped on
|
|
386
|
-
stdin)
|
|
387
|
-
<
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<
|
|
395
|
-
|
|
396
|
-
<c>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
<
|
|
401
|
-
|
|
381
|
+
stdin) and may contain any partial-<c>Run</c> fields the replayer accepts.</para>
|
|
382
|
+
<para>Profile-essential defects are validated at receipt: required <c>tool.driver.name</c>,
|
|
383
|
+
URI schemes, canonical GUIDs, <c>properties["ai/origin"]</c>, and accidental SARIF-log input.</para>
|
|
384
|
+
</remarks>
|
|
385
|
+
</member>
|
|
386
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext">
|
|
387
|
+
<summary>
|
|
388
|
+
Detects a GitHub Actions execution context from environment variables and surfaces the
|
|
389
|
+
<c>versionControlProvenance</c> fields the workflow runner publishes
|
|
390
|
+
(<c>GITHUB_SERVER_URL</c>/<c>GITHUB_REPOSITORY</c> compose the repository URI;
|
|
391
|
+
<c>GITHUB_SHA</c> supplies the revision; <c>GITHUB_REF</c> supplies the branch
|
|
392
|
+
ref).
|
|
393
|
+
</summary>
|
|
394
|
+
<remarks>
|
|
395
|
+
<para>This context is VCP-scoped: it does not stamp <c>automationDetails</c> for GitHub
|
|
396
|
+
Actions. The runner exposes <c>GITHUB_RUN_ID</c> / <c>GITHUB_WORKFLOW</c> / etc., but
|
|
397
|
+
downstream ingestion conventions for the GitHub-side automationDetails shape are out of
|
|
398
|
+
scope for this verb today.</para>
|
|
399
|
+
<para>Detection is gated on the standard runner sentinel <c>GITHUB_ACTIONS=true</c>. When
|
|
400
|
+
not inside a GitHub Actions workflow, <see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.None"/> is returned and no
|
|
401
|
+
stamping occurs. Inside a workflow three states are possible:</para>
|
|
402
|
+
<list type="bullet">
|
|
403
|
+
<item><see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.Complete"/> — the runner is active and every populated
|
|
404
|
+
VCP variable parses cleanly. Absent VCP variables are tolerated: in that case the context
|
|
405
|
+
is Complete but <see cref="P:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.HasVcpFields"/> returns <c>false</c> and the verb's VCP
|
|
406
|
+
stamping is a no-op for this source.</item>
|
|
407
|
+
<item><see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.Partial"/> — one or more present VCP variables are
|
|
408
|
+
malformed (e.g. a non-hex <c>GITHUB_SHA</c>, an unparseable
|
|
409
|
+
<c>GITHUB_SERVER_URL</c>); the verb should fail loudly rather than stamp a half-derived
|
|
410
|
+
VCP entry.</item>
|
|
411
|
+
<item><see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.None"/> — <c>GITHUB_ACTIONS</c> is unset or not
|
|
412
|
+
truthy.</item>
|
|
413
|
+
</list>
|
|
402
414
|
</remarks>
|
|
403
415
|
</member>
|
|
416
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.RepositoryUri">
|
|
417
|
+
<summary>
|
|
418
|
+
Absolute URL of the source repository, composed from <c>GITHUB_SERVER_URL</c> and
|
|
419
|
+
<c>GITHUB_REPOSITORY</c> when both are present and well-formed; otherwise null.
|
|
420
|
+
</summary>
|
|
421
|
+
</member>
|
|
422
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.RevisionId">
|
|
423
|
+
<summary>
|
|
424
|
+
The commit identifier (typically a 40-character SHA-1) the workflow run is building.
|
|
425
|
+
Lifted from <c>GITHUB_SHA</c> when present and well-formed; otherwise null.
|
|
426
|
+
</summary>
|
|
427
|
+
</member>
|
|
428
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.BranchRef">
|
|
429
|
+
<summary>
|
|
430
|
+
The branch ref (e.g. <c>refs/heads/main</c>, <c>refs/pull/42/merge</c>) that
|
|
431
|
+
triggered the workflow. Lifted from <c>GITHUB_REF</c> when present; null when
|
|
432
|
+
absent. Pass-through with no normalization — the value is whatever the runner
|
|
433
|
+
(or hand-built env) published.
|
|
434
|
+
</summary>
|
|
435
|
+
</member>
|
|
436
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.TryDetect(Microsoft.CodeAnalysis.Sarif.Multitool.IEnvironmentVariableGetter,Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext@,System.String@)">
|
|
437
|
+
<summary>
|
|
438
|
+
Reads GitHub Actions predefined environment variables via
|
|
439
|
+
<paramref name="environment"/> and returns one of <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState"/>.
|
|
440
|
+
</summary>
|
|
441
|
+
<param name="environment">Env getter (test seam).</param>
|
|
442
|
+
<param name="context">Populated context when state is <see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.Complete"/>; otherwise <c>null</c>.</param>
|
|
443
|
+
<param name="errorMessage">Human-readable description of present/malformed variables when state is <see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.DetectionState.Partial"/>; otherwise <c>null</c>.</param>
|
|
444
|
+
</member>
|
|
445
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.HasVcpFields">
|
|
446
|
+
<summary>
|
|
447
|
+
True when this context carries at least one <c>versionControlProvenance</c> field
|
|
448
|
+
(repository URI, revision id, or branch ref) lifted from the workflow
|
|
449
|
+
environment. False indicates the VCP enrichment path is a no-op for this context.
|
|
450
|
+
</summary>
|
|
451
|
+
</member>
|
|
452
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GitHubActionsContext.GetVcpFieldValues">
|
|
453
|
+
<summary>
|
|
454
|
+
Returns the non-null <c>versionControlProvenance</c> field name/value pairs for this
|
|
455
|
+
workflow context. Pairs are ordered <c>repositoryUri</c>, <c>revisionId</c>,
|
|
456
|
+
<c>branch</c>; absent fields are omitted.
|
|
457
|
+
</summary>
|
|
458
|
+
</member>
|
|
459
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.ReportingDescriptorEmitter">
|
|
460
|
+
<summary>
|
|
461
|
+
Shared implementation behind <c>add-notification-reporting-descriptor</c> and
|
|
462
|
+
<c>add-rule-reporting-descriptor</c>: validates a SARIF reportingDescriptor JSON and
|
|
463
|
+
appends an event to <c><output>.wip.jsonl</c>.
|
|
464
|
+
</summary>
|
|
465
|
+
<remarks>
|
|
466
|
+
Notifications append to <c>run.tool.driver.notifications[]</c>; rules append to
|
|
467
|
+
<c>run.tool.driver.rules[]</c> and require a well-formed <c>NOVEL-</c> id. Each id may
|
|
468
|
+
appear at most once in its target array.
|
|
469
|
+
</remarks>
|
|
470
|
+
</member>
|
|
471
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.ReportingDescriptorEmitter.TryFindDuplicate(System.String,System.String,System.String,System.String,System.String@)">
|
|
472
|
+
<summary>
|
|
473
|
+
Scans the staged event log for a prior descriptor with the same id targeting the
|
|
474
|
+
same array. Returns <c>true</c> with <paramref name="error"/> populated when a
|
|
475
|
+
duplicate is found; <c>false</c> otherwise.
|
|
476
|
+
</summary>
|
|
477
|
+
<remarks>
|
|
478
|
+
The event index in the error matches the event's position in the staged log.
|
|
479
|
+
</remarks>
|
|
480
|
+
</member>
|
|
481
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot">
|
|
482
|
+
<summary>
|
|
483
|
+
Single source of truth for turning a <c>versionControlProvenance.repositoryUri</c> into a
|
|
484
|
+
portable artifact root. <see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitFinalizeRebaseVisitor"/> mints the root at finalize;
|
|
485
|
+
<see cref="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitRunCommand"/> validates the repositoryUri shape at receipt so a producer learns
|
|
486
|
+
of a malformed value at authorship rather than after a full run is assembled.
|
|
487
|
+
</summary>
|
|
488
|
+
<remarks>
|
|
489
|
+
Two repository families are recognized:
|
|
490
|
+
<list type="bullet">
|
|
491
|
+
<item><description>
|
|
492
|
+
Azure DevOps: <c>dev.azure.com</c> only, in the exact form
|
|
493
|
+
<c>https://dev.azure.com/<org>/<project>/_git/<repo></c>. The portable root is
|
|
494
|
+
the repository root; commit pinning rides on <c>versionControlProvenance.revisionId</c>
|
|
495
|
+
because Azure DevOps per-file web URLs are query-based
|
|
496
|
+
(<c>?path=&version=GC<sha></c>) and cannot serve as a uriBaseId prefix. The legacy
|
|
497
|
+
<c><org>.visualstudio.com</c> form is rejected; callers must supply the dev.azure.com
|
|
498
|
+
URL, and the derived root is always emitted in that form.
|
|
499
|
+
</description></item>
|
|
500
|
+
<item><description>
|
|
501
|
+
GitHub: <c>github.com</c> (public OSS and Enterprise Managed Users on dotcom) and the
|
|
502
|
+
data-residency / EMU hosts <c><slug>.ghe.com</c>, each with a two-segment
|
|
503
|
+
<c><owner>/<repo></c> path. The portable root is a commit-pinned blob permalink
|
|
504
|
+
(<c>https://<host>/<owner>/<repo>/blob/<revisionId>/</c>). The host set
|
|
505
|
+
is an allow-list: any other host is rejected so a confidently-wrong link is never minted.
|
|
506
|
+
Custom-hostname GitHub Enterprise Server deployments are out of scope.
|
|
507
|
+
</description></item>
|
|
508
|
+
</list>
|
|
509
|
+
SSH and scp-style clone URLs for the GitHub family are normalized to https first. Azure DevOps
|
|
510
|
+
SSH normalization is not supported; such a repositoryUri is rejected with a pointer to the
|
|
511
|
+
https clone URL. The derivation also yields a canonical repositoryUri — the https identity with
|
|
512
|
+
any userinfo stripped — so a credential-bearing or ssh clone URL never ships in the finalized
|
|
513
|
+
run.
|
|
514
|
+
</remarks>
|
|
515
|
+
</member>
|
|
516
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryValidateRepositoryUri(System.Uri,System.String@,System.String@)">
|
|
517
|
+
<summary>
|
|
518
|
+
Validates that <paramref name="rawRepositoryUri"/> has a shape from which a portable root
|
|
519
|
+
can be derived, without minting one (no revisionId required). Used at emit-run receipt.
|
|
520
|
+
</summary>
|
|
521
|
+
</member>
|
|
522
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryGetAzureDevOpsTarget(System.Uri,System.String@,System.String@,System.String@,System.String@)">
|
|
523
|
+
<summary>
|
|
524
|
+
Resolves the Azure DevOps organization, project, and repository from
|
|
525
|
+
<paramref name="rawRepositoryUri"/>, applying the same host and credential guards as
|
|
526
|
+
portable-root derivation. Fails when the repository is not an Azure DevOps target. The
|
|
527
|
+
coordinates are URL-path escaped, ready to compose into a REST endpoint path.
|
|
528
|
+
</summary>
|
|
529
|
+
</member>
|
|
530
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.VcpPortableRoot.TryDerivePortableRoot(System.Uri,System.String,System.Uri@,System.Uri@,System.String@,System.String@)">
|
|
531
|
+
<summary>
|
|
532
|
+
Mints the portable root for <paramref name="rawRepositoryUri"/>. Used at emit-finalize.
|
|
533
|
+
<paramref name="canonicalRepositoryUri"/> is the clean https identity (userinfo stripped,
|
|
534
|
+
ssh/scp normalized) that should be written back onto the run so the finalized SARIF never
|
|
535
|
+
ships a credential-bearing or non-https repositoryUri.
|
|
536
|
+
</summary>
|
|
537
|
+
</member>
|
|
404
538
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.FileWorkItemsCommand">
|
|
405
539
|
<summary>
|
|
406
540
|
A class that drives SARIF work item filing. This class is responsible for
|
|
@@ -413,6 +547,91 @@
|
|
|
413
547
|
SarifWorkItemFiler in order to complete the work.
|
|
414
548
|
</summary>
|
|
415
549
|
</member>
|
|
550
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaCommand">
|
|
551
|
+
<summary>
|
|
552
|
+
Implements <c>get-schema</c>: emits the embedded JSON Schema that validates the
|
|
553
|
+
input to a named emit verb.
|
|
554
|
+
</summary>
|
|
555
|
+
<remarks>
|
|
556
|
+
The served bytes are the assembly's embedded resources, byte-identical to the schema files
|
|
557
|
+
under <c>GetSchema/</c>.
|
|
558
|
+
</remarks>
|
|
559
|
+
</member>
|
|
560
|
+
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaCommand.SchemaByVerb">
|
|
561
|
+
<summary>
|
|
562
|
+
Maps each emit verb to the embedded schema file that validates its input. A null value
|
|
563
|
+
marks a verb whose schema is reserved but not yet available.
|
|
564
|
+
</summary>
|
|
565
|
+
</member>
|
|
566
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSchemaOptions">
|
|
567
|
+
<summary>
|
|
568
|
+
Options for <c>get-schema</c>, which emits the JSON Schema that validates the input to a
|
|
569
|
+
named emit verb. The schema is written verbatim to stdout, or to <c>--output</c>.
|
|
570
|
+
</summary>
|
|
571
|
+
<remarks>
|
|
572
|
+
The schemas served here are the same bytes the emit verbs validate their inputs against,
|
|
573
|
+
so a producer can fetch the contract for the exact verb it is about to call.
|
|
574
|
+
</remarks>
|
|
575
|
+
</member>
|
|
576
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand">
|
|
577
|
+
<summary>
|
|
578
|
+
Implements <c>get-skill</c>: emits an embedded agent skill that drives the multitool emit and
|
|
579
|
+
validate verbs.
|
|
580
|
+
</summary>
|
|
581
|
+
<remarks>
|
|
582
|
+
The source skill under <c>skills/</c> links its references with repository-relative paths so it
|
|
583
|
+
renders correctly in the repo. On the way out those links are rewritten to raw permalinks pinned
|
|
584
|
+
to the build commit SHA, so the emitted skill resolves its references against the exact
|
|
585
|
+
repository state that shipped the running tool.
|
|
586
|
+
</remarks>
|
|
587
|
+
</member>
|
|
588
|
+
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.SkillSourceDirectory">
|
|
589
|
+
<summary>
|
|
590
|
+
Maps each skill to the repository-relative directory of its <c>SKILL.md</c>. The directory
|
|
591
|
+
anchors resolution of the skill's repository-relative links into release-pinned permalinks.
|
|
592
|
+
</summary>
|
|
593
|
+
</member>
|
|
594
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolvePinRef(System.String,System.Version)">
|
|
595
|
+
<summary>
|
|
596
|
+
Resolves the git ref the skill's links are pinned to. Prefers the exact build commit SHA
|
|
597
|
+
that SourceLink stamps into the assembly informational version (<c><version>+<sha></c>),
|
|
598
|
+
so the emitted links resolve to the precise repository state that shipped the running tool —
|
|
599
|
+
the same tree the embedded skill was taken from. Falls back to the version tag when no SHA
|
|
600
|
+
is stamped (e.g. a build with no git metadata).
|
|
601
|
+
</summary>
|
|
602
|
+
</member>
|
|
603
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolveReleaseTag(System.Version)">
|
|
604
|
+
<summary>
|
|
605
|
+
Derives the version tag (e.g. <c>v5.0.2</c>) from the assembly version, which tracks the
|
|
606
|
+
package's <c>VersionPrefix</c>. Used only as a fallback when no build commit SHA is
|
|
607
|
+
available to pin against.
|
|
608
|
+
</summary>
|
|
609
|
+
</member>
|
|
610
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.RewriteRelativeLinks(System.String,System.String,System.String)">
|
|
611
|
+
<summary>
|
|
612
|
+
Rewrites every repository-relative markdown link in <paramref name="markdown"/> to a raw
|
|
613
|
+
permalink pinned to <paramref name="pinRef"/>. Absolute URLs, protocol-relative URLs, and
|
|
614
|
+
bare fragments are left untouched.
|
|
615
|
+
</summary>
|
|
616
|
+
</member>
|
|
617
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillCommand.ResolveRepositoryRelative(System.String,System.String)">
|
|
618
|
+
<summary>
|
|
619
|
+
Resolves a relative path against the skill's repository directory into a repository-root
|
|
620
|
+
path, collapsing <c>.</c> and <c>..</c> segments.
|
|
621
|
+
</summary>
|
|
622
|
+
</member>
|
|
623
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.GetSkillOptions">
|
|
624
|
+
<summary>
|
|
625
|
+
Options for <c>get-skill</c>, which emits an agent skill that drives the multitool emit and
|
|
626
|
+
validate verbs. The skill markdown is written to stdout, or to <c>--output</c>.
|
|
627
|
+
</summary>
|
|
628
|
+
<remarks>
|
|
629
|
+
The skill ships embedded in the package, so an agent that resolves the tool (for example via
|
|
630
|
+
<c>dotnet dnx</c>) obtains the procedure from the same artifact it runs. Relative links in the
|
|
631
|
+
source skill are rewritten to commit-pinned permalinks on the way out, so the emitted document
|
|
632
|
+
resolves its references against the exact repository state that built the tool.
|
|
633
|
+
</remarks>
|
|
634
|
+
</member>
|
|
416
635
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.MultitoolResources">
|
|
417
636
|
<summary>
|
|
418
637
|
A strongly-typed resource class, for looking up localized strings, etc.
|
|
@@ -496,6 +715,37 @@
|
|
|
496
715
|
inline: We build a map of the input, so we don't want to write inline and immediately invalidate it.
|
|
497
716
|
</remarks>
|
|
498
717
|
</member>
|
|
718
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoCommand">
|
|
719
|
+
<summary>
|
|
720
|
+
Implements <c>publish-to-ghazdo</c>: uploads a SARIF file to GitHub Advanced Security for
|
|
721
|
+
Azure DevOps. The target organization, project, and repository are derived from the run's
|
|
722
|
+
<c>versionControlProvenance</c>, and the bearer secret is read from an environment variable
|
|
723
|
+
named by <c>--token-env-var</c> so it never appears on the command line or in diagnostics.
|
|
724
|
+
</summary>
|
|
725
|
+
<remarks>
|
|
726
|
+
The secret kind selects the authorization scheme: an Entra access token is a JSON Web Token and
|
|
727
|
+
is sent as <c>Bearer</c>; an Azure DevOps personal access token is opaque and is sent as
|
|
728
|
+
<c>Basic</c> with an empty user name. The body is gzip-compressed in memory and posted as
|
|
729
|
+
<c>application/octet-stream</c> with no <c>Content-Encoding</c> header, because the ingestion
|
|
730
|
+
endpoint gunzips the payload itself. The upload targets <c>advsec.dev.azure.com</c> and falls
|
|
731
|
+
back to <c>dev.azure.com</c> on a 404.
|
|
732
|
+
</remarks>
|
|
733
|
+
</member>
|
|
734
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoCommand.DetectScheme(System.String)">
|
|
735
|
+
<summary>
|
|
736
|
+
Selects the authorization scheme for <paramref name="secret"/>. An Entra access token is a
|
|
737
|
+
JSON Web Token (<c>Bearer</c>); an opaque Azure DevOps personal access token is wrapped as
|
|
738
|
+
<c>Basic</c> with an empty user name.
|
|
739
|
+
</summary>
|
|
740
|
+
</member>
|
|
741
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.PublishToGhazdoOptions">
|
|
742
|
+
<summary>
|
|
743
|
+
Options for <c>publish-to-ghazdo</c>, which uploads a finalized SARIF file to GitHub Advanced
|
|
744
|
+
Security for Azure DevOps. The Azure DevOps target is derived from the run's version-control
|
|
745
|
+
provenance, and the bearer secret is read from an environment variable named by
|
|
746
|
+
<c>--token-env-var</c>, never from the command line.
|
|
747
|
+
</summary>
|
|
748
|
+
</member>
|
|
499
749
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.QueryOptions">
|
|
500
750
|
<summary>
|
|
501
751
|
Options for the 'Query' command, which runs a query expression on a SARIF file
|
|
@@ -522,14 +772,14 @@
|
|
|
522
772
|
AI1006
|
|
523
773
|
</summary>
|
|
524
774
|
</member>
|
|
525
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
775
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.DoNotPersistFingerprints.Id">
|
|
526
776
|
<summary>
|
|
527
|
-
|
|
777
|
+
AI1007
|
|
528
778
|
</summary>
|
|
529
779
|
</member>
|
|
530
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
780
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.ProvideEvidenceBackingUri.Id">
|
|
531
781
|
<summary>
|
|
532
|
-
|
|
782
|
+
AI1010
|
|
533
783
|
</summary>
|
|
534
784
|
</member>
|
|
535
785
|
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.ProvideRuleSubId.Id">
|
|
@@ -557,7 +807,7 @@
|
|
|
557
807
|
AI2010
|
|
558
808
|
</summary>
|
|
559
809
|
</member>
|
|
560
|
-
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.
|
|
810
|
+
<member name="P:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.DoNotPersistPartialFingerprints.Id">
|
|
561
811
|
<summary>
|
|
562
812
|
AI2011
|
|
563
813
|
</summary>
|
|
@@ -2193,40 +2443,22 @@
|
|
|
2193
2443
|
<returns></returns>
|
|
2194
2444
|
</member>
|
|
2195
2445
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.AIOriginPropertyName">
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
templates, and rule ids ride the <c>NOVEL-</c> / <c>BASE/sub-id</c>
|
|
2202
|
-
convention rather than a fixed tool prefix. Style-class validation rules
|
|
2203
|
-
(e.g. SARIF2002, SARIF2009, SARIF2014, SARIF2015) encode human-authoring
|
|
2204
|
-
guidance whose preconditions don't hold for AI output, so they suppress
|
|
2205
|
-
themselves when this marker is set.
|
|
2206
|
-
|
|
2207
|
-
Correctness-class rules (snippets, hashes, provenance, relative URIs, etc.)
|
|
2208
|
-
must NOT consult this marker — those checks apply uniformly to AI content.
|
|
2209
|
-
</summary>
|
|
2446
|
+
<summary>
|
|
2447
|
+
Run property whose non-empty value declares AI-origin SARIF. Style-class validation
|
|
2448
|
+
rules may suppress human-authoring guidance when this marker is set; correctness-class
|
|
2449
|
+
rules (snippets, hashes, provenance, relative URIs, etc.) must not.
|
|
2450
|
+
</summary>
|
|
2210
2451
|
</member>
|
|
2211
2452
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun(Microsoft.CodeAnalysis.Sarif.Run)">
|
|
2212
2453
|
<summary>
|
|
2213
|
-
Returns true when <paramref name="run"/> declares AI provenance via
|
|
2214
|
-
<c>ai/origin</c> run property.
|
|
2215
|
-
vocabulary (<c>generated</c>, <c>annotated</c>, <c>synthesized</c>, …)
|
|
2216
|
-
is open by design so AI tooling can self-describe at any granularity.
|
|
2454
|
+
Returns true when <paramref name="run"/> declares AI provenance via a non-empty
|
|
2455
|
+
<c>ai/origin</c> run property.
|
|
2217
2456
|
</summary>
|
|
2218
|
-
<exception cref="T:System.ArgumentNullException">
|
|
2219
|
-
<paramref name="run"/> is null. Callers reading AI-origin during rule
|
|
2220
|
-
dispatch should already hold a non-null run; the strict contract makes
|
|
2221
|
-
upstream lifecycle bugs loud rather than masking them as "not AI".
|
|
2222
|
-
</exception>
|
|
2457
|
+
<exception cref="T:System.ArgumentNullException"><paramref name="run"/> is null.</exception>
|
|
2223
2458
|
</member>
|
|
2224
2459
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun">
|
|
2225
2460
|
<summary>
|
|
2226
|
-
|
|
2227
|
-
declares AI provenance. Returns false when there is no current run
|
|
2228
|
-
scope (e.g. an <c>Analyze(SarifLog)</c> dispatch); otherwise defers to
|
|
2229
|
-
<see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.Rules.SarifValidationSkimmerBase.IsAIOriginRun(Microsoft.CodeAnalysis.Sarif.Run)"/>.
|
|
2461
|
+
Reports whether the run currently being visited declares AI provenance.
|
|
2230
2462
|
</summary>
|
|
2231
2463
|
</member>
|
|
2232
2464
|
</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,13 +6912,9 @@
|
|
|
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">
|
|
@@ -7010,45 +6986,24 @@
|
|
|
7010
6986
|
replay engine auto-registers descriptors keyed by <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/>.
|
|
7011
6987
|
</summary>
|
|
7012
6988
|
</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
6989
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation">
|
|
7028
6990
|
<summary>
|
|
7029
|
-
A complete <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation"/> object.
|
|
7030
|
-
|
|
6991
|
+
A complete <see cref="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.Invocation"/> object. Producer-supplied <see cref="T:Microsoft.CodeAnalysis.Sarif.Notification"/>
|
|
6992
|
+
objects travel inline on the invocation's <c>toolExecutionNotifications</c> /
|
|
6993
|
+
<c>toolConfigurationNotifications</c> arrays.
|
|
7031
6994
|
</summary>
|
|
7032
6995
|
</member>
|
|
7033
6996
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.RuleDescriptor">
|
|
7034
6997
|
<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.
|
|
6998
|
+
A <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at <c>run.tool.driver.rules</c>.
|
|
6999
|
+
Explicit descriptors are merged before result-driven auto-registration and are
|
|
7000
|
+
reserved for NOVEL- ruleIds.
|
|
7043
7001
|
</summary>
|
|
7044
7002
|
</member>
|
|
7045
7003
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.NotificationDescriptor">
|
|
7046
7004
|
<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.
|
|
7005
|
+
A <see cref="T:Microsoft.CodeAnalysis.Sarif.ReportingDescriptor"/> targeted at <c>run.tool.driver.notifications</c>.
|
|
7006
|
+
Notification descriptor ids are opaque non-empty strings.
|
|
7052
7007
|
</summary>
|
|
7053
7008
|
</member>
|
|
7054
7009
|
<member name="F:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventKinds.CurrentSchemaVersion">
|
|
@@ -7075,8 +7030,7 @@
|
|
|
7075
7030
|
</member>
|
|
7076
7031
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogReader.Read(System.String)">
|
|
7077
7032
|
<summary>
|
|
7078
|
-
Streams events from the given path.
|
|
7079
|
-
silently skipped. Unknown <c>v</c> for a known kind throws.
|
|
7033
|
+
Streams events from the given path.
|
|
7080
7034
|
</summary>
|
|
7081
7035
|
</member>
|
|
7082
7036
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventLogWriter">
|
|
@@ -7123,35 +7077,13 @@
|
|
|
7123
7077
|
<para>v1 contract:</para>
|
|
7124
7078
|
<list type="bullet">
|
|
7125
7079
|
<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>
|
|
7080
|
+
Header <c>results</c>, <c>invocations</c>, and <c>notifications</c> are ignored.</description></item>
|
|
7081
|
+
<item><description><c>result</c> events MUST be self-contained. <c>ruleIndex</c> is
|
|
7082
|
+
re-derived from <c>ruleId</c>, and every <see cref="P:Microsoft.CodeAnalysis.Sarif.Result.RuleId"/> MUST conform to
|
|
7083
|
+
<see cref="T:Microsoft.CodeAnalysis.Sarif.Emit.AIRuleIdConvention"/>.</description></item>
|
|
7138
7084
|
<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>
|
|
7085
|
+
event order and replayed verbatim.</description></item>
|
|
7150
7086
|
</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
7087
|
</remarks>
|
|
7156
7088
|
</member>
|
|
7157
7089
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Emit.SarifEventReplayer.Replay(System.String)">
|
|
@@ -7178,26 +7110,16 @@
|
|
|
7178
7110
|
<c>notification-descriptor</c> events into the target list on the run's driver.
|
|
7179
7111
|
</summary>
|
|
7180
7112
|
<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>
|
|
7113
|
+
Header entries are preserved by reference, and descriptor events are appended after
|
|
7114
|
+
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})"/>
|
|
7115
|
+
so explicit descriptors seed the <c>idToIndex</c> table.
|
|
7191
7116
|
</remarks>
|
|
7192
7117
|
</member>
|
|
7193
7118
|
<!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[])" -->
|
|
7194
7119
|
<!-- Badly formed XML comment ignored for member "M:Microsoft.CodeAnalysis.Sarif.FileEncoding.IsTextualData(System.Byte[],System.Int32,System.Int32)" -->
|
|
7195
7120
|
<member name="T:Microsoft.CodeAnalysis.Sarif.FileRegionsCache">
|
|
7196
7121
|
<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.
|
|
7122
|
+
Caches file text, hashes, newline indexes, and region snippets for SARIF enrichment.
|
|
7201
7123
|
</summary>
|
|
7202
7124
|
</member>
|
|
7203
7125
|
<member name="P:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.HashAlgorithms">
|
|
@@ -7228,15 +7150,14 @@
|
|
|
7228
7150
|
for files. Defaults to <see cref="F:Microsoft.CodeAnalysis.Sarif.HashAlgorithms.Default"/> (SHA-256 only).
|
|
7229
7151
|
</param>
|
|
7230
7152
|
</member>
|
|
7231
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.PopulateTextRegionProperties(Microsoft.CodeAnalysis.Sarif.Region,System.Uri,System.Boolean,System.String)">
|
|
7153
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.PopulateTextRegionProperties(Microsoft.CodeAnalysis.Sarif.Region,System.Uri,System.Boolean,System.String,System.Boolean)">
|
|
7232
7154
|
<summary>
|
|
7233
7155
|
Creates a <see cref="T:Microsoft.CodeAnalysis.Sarif.Region"/> object, based on an existing Region, in which all
|
|
7234
7156
|
text-related properties have been populated.
|
|
7235
7157
|
</summary>
|
|
7236
7158
|
<remarks>
|
|
7237
|
-
For example,
|
|
7238
|
-
Region
|
|
7239
|
-
as properties, such as CharOffset, CharLength, etc.
|
|
7159
|
+
For example, a region with only <see cref="P:Microsoft.CodeAnalysis.Sarif.Region.StartLine"/> can receive computed
|
|
7160
|
+
<see cref="P:Microsoft.CodeAnalysis.Sarif.Region.CharOffset"/> and <see cref="P:Microsoft.CodeAnalysis.Sarif.Region.CharLength"/> values.
|
|
7240
7161
|
</remarks>
|
|
7241
7162
|
<param name="inputRegion">
|
|
7242
7163
|
Region object that forms the basis of the returned Region object.
|
|
@@ -7252,6 +7173,12 @@
|
|
|
7252
7173
|
An optional argument that, if present, contains the text contents of the file
|
|
7253
7174
|
specified by <paramref name="uri"/>.
|
|
7254
7175
|
</param>
|
|
7176
|
+
<param name="overwriteExistingData">
|
|
7177
|
+
Controls how an authored region coordinate that diverges from the value computed
|
|
7178
|
+
from the source text is reconciled. When <c>false</c> (the default), the divergence
|
|
7179
|
+
throws an <see cref="T:System.ArgumentException"/>; when <c>true</c>, the authored value is
|
|
7180
|
+
overwritten with the computed value.
|
|
7181
|
+
</param>
|
|
7255
7182
|
<returns>
|
|
7256
7183
|
A Region object whose text-related properties have been fully populated.
|
|
7257
7184
|
</returns>
|
|
@@ -7261,12 +7188,18 @@
|
|
|
7261
7188
|
Clear current cache.
|
|
7262
7189
|
</summary>
|
|
7263
7190
|
</member>
|
|
7264
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.
|
|
7191
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.ReconcileRegionCoordinate(System.Boolean,System.String,System.Int32,System.Int32)">
|
|
7265
7192
|
<summary>
|
|
7266
|
-
|
|
7193
|
+
Reconciles an authored region coordinate against the value computed from the source
|
|
7194
|
+
text. If they agree (including the common case where the value was just computed and
|
|
7195
|
+
assigned because the authored value was absent), the value is returned unchanged.
|
|
7196
|
+
On a genuine divergence the behavior depends on <paramref name="overwriteExistingData"/>.
|
|
7197
|
+
</summary>
|
|
7198
|
+
</member>
|
|
7199
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.FileRegionsCache.ReconcileRegionBounds(System.Boolean,System.Int32,System.Int32,System.Int32)">
|
|
7200
|
+
<summary>
|
|
7201
|
+
Reconciles an authored region whose character span extends beyond the source file.
|
|
7267
7202
|
</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
7203
|
</member>
|
|
7271
7204
|
<member name="M:Microsoft.CodeAnalysis.Sarif.FileSearcherHelper.SearchForFileInEnvironmentVariable(System.String,System.String,Microsoft.CodeAnalysis.Sarif.IFileSystem)">
|
|
7272
7205
|
<summary>
|
|
@@ -9919,16 +9852,9 @@
|
|
|
9919
9852
|
taxonomy artifacts.
|
|
9920
9853
|
</summary>
|
|
9921
9854
|
<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>
|
|
9855
|
+
<para>Producer-supplied descriptor fields are never overwritten.</para>
|
|
9856
|
+
<para>This enricher does not add cross-references via
|
|
9857
|
+
<c>reportingDescriptor.relationships</c> or <c>result.taxa</c>.</para>
|
|
9932
9858
|
</remarks>
|
|
9933
9859
|
</member>
|
|
9934
9860
|
<member name="M:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweTaxonomyEnricher.Enrich(Microsoft.CodeAnalysis.Sarif.Run,Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus)">
|
|
@@ -9939,9 +9865,7 @@
|
|
|
9939
9865
|
<param name="run">The run whose <c>tool.driver.rules</c> and <c>tool.extensions[].rules</c> are enriched.</param>
|
|
9940
9866
|
<param name="statuses">
|
|
9941
9867
|
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.
|
|
9868
|
+
(<c>Stable | Draft | Incomplete</c>), which excludes <see cref="F:Microsoft.CodeAnalysis.Sarif.Taxonomies.CweStatus.Deprecated"/>.
|
|
9945
9869
|
</param>
|
|
9946
9870
|
<returns>The number of descriptors whose content was modified.</returns>
|
|
9947
9871
|
</member>
|
package/WorkItems.pdb
CHANGED
|
Binary file
|