@microsoft/sarif 0.0.1 → 5.3.0
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/README.md +76 -7
- package/dist/aiRuleId.d.ts +27 -0
- package/dist/aiRuleId.js +60 -0
- package/dist/canonicalize.d.ts +12 -0
- package/dist/canonicalize.js +141 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.js +12 -5
- package/dist/insertOptionalData.d.ts +39 -0
- package/dist/insertOptionalData.js +173 -0
- package/dist/io.d.ts +20 -0
- package/dist/io.js +77 -0
- package/dist/regions.d.ts +51 -0
- package/dist/regions.js +281 -0
- package/dist/rollingHash.d.ts +7 -0
- package/dist/rollingHash.js +111 -0
- package/dist/sarif.d.ts +227 -0
- package/dist/sarif.js +3 -0
- package/dist/serialization-model.json +949 -0
- package/dist/skill.d.ts +12 -0
- package/dist/skill.js +81 -0
- package/dist/vcp.d.ts +34 -0
- package/dist/vcp.js +227 -0
- package/package.json +4 -3
package/dist/sarif.d.ts
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sparse, open-typed subset of the SARIF 2.1.0 object model — only the nodes
|
|
3
|
+
* the emit verbs read or mutate. Every type is intersection-open so caller-
|
|
4
|
+
* supplied fields (including `properties` bags and any unrecognized keys)
|
|
5
|
+
* round-trip verbatim through the emit chain. This file is NOT a schema;
|
|
6
|
+
* validation is the .NET `sarif validate` verb's job (see README).
|
|
7
|
+
*/
|
|
8
|
+
/** Every SARIF node may carry a property bag and unknown extra keys. */
|
|
9
|
+
export type PropertyBagHolder = {
|
|
10
|
+
properties?: Record<string, unknown>;
|
|
11
|
+
[extra: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type Message = PropertyBagHolder & {
|
|
14
|
+
text?: string;
|
|
15
|
+
markdown?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
arguments?: string[];
|
|
18
|
+
};
|
|
19
|
+
export type MultiformatMessageString = PropertyBagHolder & {
|
|
20
|
+
text: string;
|
|
21
|
+
markdown?: string;
|
|
22
|
+
};
|
|
23
|
+
export type ArtifactContent = PropertyBagHolder & {
|
|
24
|
+
text?: string;
|
|
25
|
+
binary?: string;
|
|
26
|
+
rendered?: MultiformatMessageString;
|
|
27
|
+
};
|
|
28
|
+
export type Region = PropertyBagHolder & {
|
|
29
|
+
startLine?: number;
|
|
30
|
+
startColumn?: number;
|
|
31
|
+
endLine?: number;
|
|
32
|
+
endColumn?: number;
|
|
33
|
+
charOffset?: number;
|
|
34
|
+
charLength?: number;
|
|
35
|
+
byteOffset?: number;
|
|
36
|
+
byteLength?: number;
|
|
37
|
+
snippet?: ArtifactContent;
|
|
38
|
+
message?: Message;
|
|
39
|
+
sourceLanguage?: string;
|
|
40
|
+
};
|
|
41
|
+
export type ArtifactLocation = PropertyBagHolder & {
|
|
42
|
+
uri?: string;
|
|
43
|
+
uriBaseId?: string;
|
|
44
|
+
index?: number;
|
|
45
|
+
description?: Message;
|
|
46
|
+
};
|
|
47
|
+
export type PhysicalLocation = PropertyBagHolder & {
|
|
48
|
+
artifactLocation?: ArtifactLocation;
|
|
49
|
+
region?: Region;
|
|
50
|
+
contextRegion?: Region;
|
|
51
|
+
address?: PropertyBagHolder;
|
|
52
|
+
};
|
|
53
|
+
export type Location = PropertyBagHolder & {
|
|
54
|
+
id?: number;
|
|
55
|
+
physicalLocation?: PhysicalLocation;
|
|
56
|
+
logicalLocations?: PropertyBagHolder[];
|
|
57
|
+
message?: Message;
|
|
58
|
+
annotations?: Region[];
|
|
59
|
+
relationships?: PropertyBagHolder[];
|
|
60
|
+
};
|
|
61
|
+
export type Artifact = PropertyBagHolder & {
|
|
62
|
+
location?: ArtifactLocation;
|
|
63
|
+
parentIndex?: number;
|
|
64
|
+
offset?: number;
|
|
65
|
+
length?: number;
|
|
66
|
+
roles?: string[];
|
|
67
|
+
mimeType?: string;
|
|
68
|
+
contents?: ArtifactContent;
|
|
69
|
+
encoding?: string;
|
|
70
|
+
sourceLanguage?: string;
|
|
71
|
+
hashes?: Record<string, string>;
|
|
72
|
+
lastModifiedTimeUtc?: string;
|
|
73
|
+
description?: Message;
|
|
74
|
+
};
|
|
75
|
+
export type ReportingConfiguration = PropertyBagHolder & {
|
|
76
|
+
enabled?: boolean;
|
|
77
|
+
level?: 'none' | 'note' | 'warning' | 'error';
|
|
78
|
+
rank?: number;
|
|
79
|
+
parameters?: Record<string, unknown>;
|
|
80
|
+
};
|
|
81
|
+
export type ReportingDescriptorReference = PropertyBagHolder & {
|
|
82
|
+
id?: string;
|
|
83
|
+
index?: number;
|
|
84
|
+
guid?: string;
|
|
85
|
+
toolComponent?: PropertyBagHolder;
|
|
86
|
+
};
|
|
87
|
+
export type ReportingDescriptorRelationship = PropertyBagHolder & {
|
|
88
|
+
target: ReportingDescriptorReference;
|
|
89
|
+
kinds?: string[];
|
|
90
|
+
description?: Message;
|
|
91
|
+
};
|
|
92
|
+
export type ReportingDescriptor = PropertyBagHolder & {
|
|
93
|
+
id: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
guid?: string;
|
|
96
|
+
deprecatedIds?: string[];
|
|
97
|
+
shortDescription?: MultiformatMessageString;
|
|
98
|
+
fullDescription?: MultiformatMessageString;
|
|
99
|
+
messageStrings?: Record<string, MultiformatMessageString>;
|
|
100
|
+
defaultConfiguration?: ReportingConfiguration;
|
|
101
|
+
helpUri?: string;
|
|
102
|
+
help?: MultiformatMessageString;
|
|
103
|
+
relationships?: ReportingDescriptorRelationship[];
|
|
104
|
+
};
|
|
105
|
+
export type ToolComponent = PropertyBagHolder & {
|
|
106
|
+
name: string;
|
|
107
|
+
guid?: string;
|
|
108
|
+
version?: string;
|
|
109
|
+
semanticVersion?: string;
|
|
110
|
+
fullName?: string;
|
|
111
|
+
organization?: string;
|
|
112
|
+
product?: string;
|
|
113
|
+
informationUri?: string;
|
|
114
|
+
rules?: ReportingDescriptor[];
|
|
115
|
+
notifications?: ReportingDescriptor[];
|
|
116
|
+
taxa?: ReportingDescriptor[];
|
|
117
|
+
language?: string;
|
|
118
|
+
contents?: string[];
|
|
119
|
+
supportedTaxonomies?: PropertyBagHolder[];
|
|
120
|
+
};
|
|
121
|
+
export type Tool = PropertyBagHolder & {
|
|
122
|
+
driver: ToolComponent;
|
|
123
|
+
extensions?: ToolComponent[];
|
|
124
|
+
};
|
|
125
|
+
export type Notification = PropertyBagHolder & {
|
|
126
|
+
locations?: Location[];
|
|
127
|
+
message: Message;
|
|
128
|
+
level?: 'none' | 'note' | 'warning' | 'error';
|
|
129
|
+
threadId?: number;
|
|
130
|
+
timeUtc?: string;
|
|
131
|
+
exception?: PropertyBagHolder;
|
|
132
|
+
descriptor?: ReportingDescriptorReference;
|
|
133
|
+
associatedRule?: ReportingDescriptorReference;
|
|
134
|
+
};
|
|
135
|
+
export type Invocation = PropertyBagHolder & {
|
|
136
|
+
commandLine?: string;
|
|
137
|
+
arguments?: string[];
|
|
138
|
+
startTimeUtc?: string;
|
|
139
|
+
endTimeUtc?: string;
|
|
140
|
+
exitCode?: number;
|
|
141
|
+
executionSuccessful: boolean;
|
|
142
|
+
workingDirectory?: ArtifactLocation;
|
|
143
|
+
environmentVariables?: Record<string, string>;
|
|
144
|
+
toolExecutionNotifications?: Notification[];
|
|
145
|
+
toolConfigurationNotifications?: Notification[];
|
|
146
|
+
machine?: string;
|
|
147
|
+
account?: string;
|
|
148
|
+
processId?: number;
|
|
149
|
+
};
|
|
150
|
+
export type VersionControlDetails = PropertyBagHolder & {
|
|
151
|
+
repositoryUri: string;
|
|
152
|
+
revisionId?: string;
|
|
153
|
+
branch?: string;
|
|
154
|
+
revisionTag?: string;
|
|
155
|
+
asOfTimeUtc?: string;
|
|
156
|
+
mappedTo?: ArtifactLocation;
|
|
157
|
+
};
|
|
158
|
+
export type RunAutomationDetails = PropertyBagHolder & {
|
|
159
|
+
id?: string;
|
|
160
|
+
guid?: string;
|
|
161
|
+
correlationGuid?: string;
|
|
162
|
+
description?: Message;
|
|
163
|
+
};
|
|
164
|
+
export type Result = PropertyBagHolder & {
|
|
165
|
+
ruleId?: string;
|
|
166
|
+
ruleIndex?: number;
|
|
167
|
+
rule?: ReportingDescriptorReference;
|
|
168
|
+
kind?: 'notApplicable' | 'pass' | 'fail' | 'review' | 'open' | 'informational';
|
|
169
|
+
level?: 'none' | 'note' | 'warning' | 'error';
|
|
170
|
+
message: Message;
|
|
171
|
+
analysisTarget?: ArtifactLocation;
|
|
172
|
+
locations?: Location[];
|
|
173
|
+
guid?: string;
|
|
174
|
+
correlationGuid?: string;
|
|
175
|
+
occurrenceCount?: number;
|
|
176
|
+
partialFingerprints?: Record<string, string>;
|
|
177
|
+
fingerprints?: Record<string, string>;
|
|
178
|
+
stacks?: PropertyBagHolder[];
|
|
179
|
+
codeFlows?: PropertyBagHolder[];
|
|
180
|
+
graphs?: PropertyBagHolder[];
|
|
181
|
+
graphTraversals?: PropertyBagHolder[];
|
|
182
|
+
relatedLocations?: Location[];
|
|
183
|
+
suppressions?: PropertyBagHolder[];
|
|
184
|
+
baselineState?: 'new' | 'unchanged' | 'updated' | 'absent';
|
|
185
|
+
rank?: number;
|
|
186
|
+
attachments?: PropertyBagHolder[];
|
|
187
|
+
hostedViewerUri?: string;
|
|
188
|
+
workItemUris?: string[];
|
|
189
|
+
provenance?: PropertyBagHolder;
|
|
190
|
+
fixes?: PropertyBagHolder[];
|
|
191
|
+
taxa?: ReportingDescriptorReference[];
|
|
192
|
+
};
|
|
193
|
+
export type Run = PropertyBagHolder & {
|
|
194
|
+
tool: Tool;
|
|
195
|
+
invocations?: Invocation[];
|
|
196
|
+
conversion?: PropertyBagHolder;
|
|
197
|
+
language?: string;
|
|
198
|
+
versionControlProvenance?: VersionControlDetails[];
|
|
199
|
+
originalUriBaseIds?: Record<string, ArtifactLocation>;
|
|
200
|
+
artifacts?: Artifact[];
|
|
201
|
+
logicalLocations?: PropertyBagHolder[];
|
|
202
|
+
graphs?: PropertyBagHolder[];
|
|
203
|
+
results?: Result[];
|
|
204
|
+
automationDetails?: RunAutomationDetails;
|
|
205
|
+
runAggregates?: RunAutomationDetails[];
|
|
206
|
+
baselineGuid?: string;
|
|
207
|
+
redactionTokens?: string[];
|
|
208
|
+
defaultEncoding?: string;
|
|
209
|
+
defaultSourceLanguage?: string;
|
|
210
|
+
newlineSequences?: string[];
|
|
211
|
+
columnKind?: 'utf16CodeUnits' | 'unicodeCodePoints';
|
|
212
|
+
taxonomies?: ToolComponent[];
|
|
213
|
+
addresses?: PropertyBagHolder[];
|
|
214
|
+
translations?: ToolComponent[];
|
|
215
|
+
policies?: ToolComponent[];
|
|
216
|
+
webRequests?: PropertyBagHolder[];
|
|
217
|
+
webResponses?: PropertyBagHolder[];
|
|
218
|
+
specialLocations?: PropertyBagHolder;
|
|
219
|
+
threadFlowLocations?: PropertyBagHolder[];
|
|
220
|
+
};
|
|
221
|
+
export type SarifLog = PropertyBagHolder & {
|
|
222
|
+
$schema?: string;
|
|
223
|
+
version: '2.1.0';
|
|
224
|
+
runs: Run[];
|
|
225
|
+
inlineExternalProperties?: PropertyBagHolder[];
|
|
226
|
+
};
|
|
227
|
+
export declare const SARIF_SCHEMA_URI = "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0.json";
|
package/dist/sarif.js
ADDED