@microsoft/sarif-multitool-darwin 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Sarif.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 +116 -14
- package/Sarif.Multitool.pdb +0 -0
- package/Sarif.WorkItems.pdb +0 -0
- package/Sarif.pdb +0 -0
- package/Sarif.xml +8 -0
- 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
|
|
@@ -4,6 +4,39 @@
|
|
|
4
4
|
<name>Sarif.Multitool.Library</name>
|
|
5
5
|
</assembly>
|
|
6
6
|
<members>
|
|
7
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddInvocationCommand">
|
|
8
|
+
<summary>
|
|
9
|
+
Implements <c>multitool add-invocation</c>: appends a fully-formed SARIF invocation
|
|
10
|
+
JSON to <c><output>.wip.jsonl</c>.
|
|
11
|
+
</summary>
|
|
12
|
+
<remarks>
|
|
13
|
+
<para>The verb performs no schema validation on the invocation payload beyond "must be
|
|
14
|
+
a JSON object" — SARIF §3.20 makes every field on <c>Invocation</c> optional, and AI
|
|
15
|
+
producers vary widely in which fields they have meaningful values for (a daemon may
|
|
16
|
+
know its <c>startTimeUtc</c> but not its <c>exitCode</c>; a one-shot scanner may know
|
|
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>
|
|
22
|
+
</remarks>
|
|
23
|
+
</member>
|
|
24
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddInvocationOptions">
|
|
25
|
+
<summary>
|
|
26
|
+
Options for <c>add-invocation</c>, which appends a fully-formed SARIF <c>invocation</c>
|
|
27
|
+
object to a staged event log (<c><output>.wip.jsonl</c>) created by
|
|
28
|
+
<c>emit-init-run</c>.
|
|
29
|
+
</summary>
|
|
30
|
+
<remarks>
|
|
31
|
+
The invocation is supplied as a JSON document (file via <c>--input</c> or piped on
|
|
32
|
+
stdin). <see cref="!:SarifEventReplayer"/> strips any <c>invocations</c> array carried on
|
|
33
|
+
the run header — invocations must arrive as their own events — so this verb is the
|
|
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).
|
|
38
|
+
</remarks>
|
|
39
|
+
</member>
|
|
7
40
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.AddNotificationCommand">
|
|
8
41
|
<summary>
|
|
9
42
|
Implements <c>multitool add-notification</c>: appends a fully-formed SARIF notification
|
|
@@ -138,7 +171,7 @@
|
|
|
138
171
|
<para>Inside an ADO pipeline three states are possible:</para>
|
|
139
172
|
<list type="bullet">
|
|
140
173
|
<item><see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.DetectionState.Complete"/> — every required logical variable is present
|
|
141
|
-
and well-formed; <see cref="
|
|
174
|
+
and well-formed; <see cref="!:ApplyTo(Run)"/> writes <c>automationDetails.id</c> plus the
|
|
142
175
|
four <c>azuredevops/pipeline/build/*</c> property keys that ADO ingestion validates.</item>
|
|
143
176
|
<item><see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.DetectionState.None"/> — no required variables are populated; nothing is
|
|
144
177
|
stamped (e.g. a manual local invocation that happens to have <c>TF_BUILD</c> set without
|
|
@@ -159,11 +192,41 @@
|
|
|
159
192
|
<param name="context">Populated context when state is <see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.DetectionState.Complete"/>; otherwise <c>null</c>.</param>
|
|
160
193
|
<param name="errorMessage">Human-readable description of present/missing/malformed variables when state is <see cref="F:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.DetectionState.Partial"/>; otherwise <c>null</c>.</param>
|
|
161
194
|
</member>
|
|
162
|
-
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.
|
|
195
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.TryApplyTo(Microsoft.CodeAnalysis.Sarif.Run,System.String@)">
|
|
163
196
|
<summary>
|
|
164
|
-
Stamps the detected pipeline identity onto <paramref name="run"
|
|
165
|
-
|
|
166
|
-
<c>
|
|
197
|
+
Stamps the detected pipeline identity onto <paramref name="run"/>, returning
|
|
198
|
+
<c>true</c> when no conflict was detected. When the run already carries a
|
|
199
|
+
non-conflicting <c>automationDetails.id</c> or any of the four
|
|
200
|
+
<c>azuredevops/pipeline/build/*</c> property values, the existing values are
|
|
201
|
+
preserved. When the run carries a conflicting value, this method returns
|
|
202
|
+
<c>false</c> with a diagnostic on <paramref name="conflictError"/> and leaves
|
|
203
|
+
the run unchanged.
|
|
204
|
+
</summary>
|
|
205
|
+
<remarks>
|
|
206
|
+
<para>The "stamp only when absent, fail on conflict" contract is required because
|
|
207
|
+
callers (notably <c>emit-init-run</c>'s JSON-payload contract) may supply these
|
|
208
|
+
fields directly. An unconditional overwrite would silently clobber a producer's
|
|
209
|
+
declared identity; a conflict is a misconfiguration signal that we want to surface
|
|
210
|
+
at the verb rather than ship in the run.</para>
|
|
211
|
+
<para>Producer-supplied <see cref="P:Microsoft.CodeAnalysis.Sarif.RunAutomationDetails.Guid"/> and
|
|
212
|
+
<see cref="P:Microsoft.CodeAnalysis.Sarif.RunAutomationDetails.CorrelationGuid"/> fields are never touched —
|
|
213
|
+
they name a different scope (run / run-equivalence-class identity) than the
|
|
214
|
+
pipeline identity stamped here.</para>
|
|
215
|
+
</remarks>
|
|
216
|
+
</member>
|
|
217
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.BuildCanonicalAutomationId">
|
|
218
|
+
<summary>
|
|
219
|
+
Computes the canonical <c>automationDetails.id</c>
|
|
220
|
+
(<c>azuredevops/pipeline/build/<org>/<projectId>/<buildDefId>/<phaseId>/<branch>/<buildId></c>)
|
|
221
|
+
for this pipeline context. Exposed so JSON-direct callers can stamp the id without
|
|
222
|
+
constructing a typed <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/>.
|
|
223
|
+
</summary>
|
|
224
|
+
</member>
|
|
225
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext.GetPipelinePropertyValues">
|
|
226
|
+
<summary>
|
|
227
|
+
Returns the four <c>azuredevops/pipeline/build/*</c> property name/value pairs
|
|
228
|
+
validated by <c>GHAzDO1019</c>. Exposed so JSON-direct callers can stamp them
|
|
229
|
+
without constructing a typed <see cref="T:Microsoft.CodeAnalysis.Sarif.Run"/>.
|
|
167
230
|
</summary>
|
|
168
231
|
</member>
|
|
169
232
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitEventLogHelpers">
|
|
@@ -251,10 +314,17 @@
|
|
|
251
314
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunCommand">
|
|
252
315
|
<summary>
|
|
253
316
|
Implements <c>multitool emit-init-run</c>: creates an append-only SARIF event log
|
|
254
|
-
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from
|
|
255
|
-
supplied
|
|
317
|
+
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
318
|
+
caller-supplied SARIF <c>Run</c> JSON document (file via <c>--input</c> or stdin).
|
|
256
319
|
</summary>
|
|
257
320
|
<remarks>
|
|
321
|
+
<para>The JSON-payload contract matches the other emit verbs (<c>add-result</c>,
|
|
322
|
+
<c>add-notification</c>, <c>add-reporting-descriptor</c>). The supplied <c>Run</c> may
|
|
323
|
+
carry any subset of the partial-Run shape the replayer accepts (<c>tool</c>,
|
|
324
|
+
<c>language</c>, <c>columnKind</c>, <c>defaultEncoding</c>, <c>defaultSourceLanguage</c>,
|
|
325
|
+
<c>originalUriBaseIds</c>, <c>versionControlProvenance</c>, <c>automationDetails</c>,
|
|
326
|
+
<c>baselineGuid</c>, <c>redactionTokens</c>, …). <c>results</c>, <c>invocations</c>, and
|
|
327
|
+
notifications on the header are ignored at replay; those belong in their own events.</para>
|
|
258
328
|
<para>State table:</para>
|
|
259
329
|
<list type="table">
|
|
260
330
|
<listheader>
|
|
@@ -285,18 +355,50 @@
|
|
|
285
355
|
</list>
|
|
286
356
|
</remarks>
|
|
287
357
|
</member>
|
|
358
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunCommand.TryRequireOptionalObject(Newtonsoft.Json.Linq.JObject,System.String,Newtonsoft.Json.Linq.JObject@)">
|
|
359
|
+
<summary>
|
|
360
|
+
If <paramref name="parent"/> carries a token at <paramref name="key"/>, requires it to
|
|
361
|
+
be a JSON object and returns it via <paramref name="value"/>. Returns true when the key
|
|
362
|
+
is absent (or explicitly null) without surfacing an error; returns false with a clear
|
|
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.
|
|
366
|
+
</summary>
|
|
367
|
+
</member>
|
|
368
|
+
<member name="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunCommand.TryStampAdoContext(Newtonsoft.Json.Linq.JObject,Microsoft.CodeAnalysis.Sarif.Multitool.AdoPipelineContext,System.String@)">
|
|
369
|
+
<summary>
|
|
370
|
+
Stamps ADO pipeline identity directly onto the JSON payload. Mutating the JObject
|
|
371
|
+
rather than round-tripping through the typed <see cref="M:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunCommand.Run(Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunOptions,Microsoft.CodeAnalysis.Sarif.IFileSystem)"/> model preserves any
|
|
372
|
+
SARIF Run fields the typed model doesn't surface (e.g., <c>redactionTokens</c>) in
|
|
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.)
|
|
375
|
+
</summary>
|
|
376
|
+
</member>
|
|
288
377
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.EmitInitRunOptions">
|
|
289
378
|
<summary>
|
|
290
379
|
Options for <c>emit-init-run</c>, which opens an append-only event log
|
|
291
|
-
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event
|
|
292
|
-
|
|
293
|
-
via <c>multitool emit-finalize</c>.
|
|
380
|
+
(<c><output>.wip.jsonl</c>) seeded with a <c>run-header</c> event built from a
|
|
381
|
+
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>multitool emit-finalize</c>.
|
|
294
383
|
</summary>
|
|
295
384
|
<remarks>
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
<c>
|
|
299
|
-
|
|
385
|
+
<para>The run JSON is supplied as a JSON document (file via <c>--input</c> or piped on
|
|
386
|
+
stdin), matching the contract used by <c>add-result</c>, <c>add-notification</c>, and
|
|
387
|
+
<c>add-reporting-descriptor</c>. SARIF <c>Run</c> is by far the richest object in the
|
|
388
|
+
schema; modeling each field as a CLI flag would require a sprawling and ever-expanding
|
|
389
|
+
surface that still could not express the legal partial-<c>Run</c> shape the replayer
|
|
390
|
+
accepts (multiple <c>versionControlProvenance</c> entries, <c>properties</c> bags,
|
|
391
|
+
<c>language</c>, <c>columnKind</c>, <c>defaultEncoding</c>, <c>redactionTokens</c>, …).
|
|
392
|
+
The JSON-payload contract keeps the verb generic and lets an AI producer emit
|
|
393
|
+
arbitrarily-rich run headers without losing fidelity.</para>
|
|
394
|
+
<para>Profile-essential defects are validated at receipt: <c>tool.driver.name</c> must
|
|
395
|
+
be a non-empty string; <c>tool.driver.informationUri</c> and
|
|
396
|
+
<c>versionControlProvenance[*].repositoryUri</c> must be <c>https</c>;
|
|
397
|
+
<c>originalUriBaseIds["SRCROOT"].uri</c> must be <c>https</c> or <c>file</c>;
|
|
398
|
+
<c>automationDetails.guid</c> / <c>correlationGuid</c> must be canonical 8-4-4-4-12
|
|
399
|
+
GUIDs; <c>properties["ai/origin"]</c> must be <c>generated</c>, <c>annotated</c>, or
|
|
400
|
+
<c>synthesized</c>. The verb also rejects a SARIF <em>log</em> accidentally supplied in
|
|
401
|
+
place of a <c>Run</c>.</para>
|
|
300
402
|
</remarks>
|
|
301
403
|
</member>
|
|
302
404
|
<member name="T:Microsoft.CodeAnalysis.Sarif.Multitool.FileWorkItemsCommand">
|
package/Sarif.Multitool.pdb
CHANGED
|
Binary file
|
package/Sarif.WorkItems.pdb
CHANGED
|
Binary file
|
package/Sarif.pdb
CHANGED
|
Binary file
|
package/Sarif.xml
CHANGED
|
@@ -9274,6 +9274,14 @@
|
|
|
9274
9274
|
</summary>
|
|
9275
9275
|
<param name="underlyingStream"></param>
|
|
9276
9276
|
</member>
|
|
9277
|
+
<member name="T:Microsoft.CodeAnalysis.Sarif.RuleKind">
|
|
9278
|
+
<summary>
|
|
9279
|
+
Identifies the validator family that applies a SARIF reporting-descriptor rule.
|
|
9280
|
+
</summary>
|
|
9281
|
+
<remarks>
|
|
9282
|
+
Not a <c>[Flags]</c> enum; combinations are expressed via <see cref="T:Microsoft.CodeAnalysis.Sarif.RuleKindSet"/>.
|
|
9283
|
+
</remarks>
|
|
9284
|
+
</member>
|
|
9277
9285
|
<member name="F:Microsoft.CodeAnalysis.Sarif.SarifConstants.SarifFileExtension">
|
|
9278
9286
|
<summary>
|
|
9279
9287
|
The standard file extension for SARIF files.
|
package/WorkItems.pdb
CHANGED
|
Binary file
|