-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide mechanism for inlining externalized properties data into the root log #321
Comments
Disposition: add a taxonomies property to the run object externalPropertyFiles object. Taxonomies is externalizable. Any externalized property reference can utilize the SARIF protocol to refer to data within the log file. |
Below is an example SARIF file, for my proposal to inline external data that can be shared between runs. Add a new top level property whose value is an array of externalPropertyFile objects. The sarif URI protocol is used to reference the location in the array. Each run is unchanged except for the fileLocation of the external property, and the contents of the external file is unchanged. There is no coupling of runs using this scheme, and file location in an external property file is always an externalPropertyFile object. A further step would be to not require the externalPropertyFiles fileLocation in a run to change its fileLocation, but to inform consumers that if an inlineExternalFiles property exists with a matching instanceGuid then this is the externalPropertyFile object; this makes inline and externalizing simple.
|
Michael: did you capture any other changes than these?
Per discussion:
1. Remove the “run.” prefix from the property names in an externalProperties object (section 4.3.6 of the spec).
2. Use JPointer in the SARIF protocol (it’s designed to work with URIs).
3. Accept Jim’s proposal with these renames:
{
...
"inlineExternalProperties": [
{
"$schema":
"http:///json.schemastore.org/sarif-external-property-file-2.0.0 <http://json.schemastore.org/sarif-external-property-file-2.0.0> ",
"version": "2.0.0",
"instanceGuid": "22222222-2222-2222-2222-222222222222",
"run.files": {
"apple.png": {
"mimeType": "image/png"
},
"banana.png": {
"mimeType": "image/png"
}
}
}
],
"runs": [
{
"originalUriBaseIds": {
"INLINE": {
"uri": "sarif:///inlineExternalProperties/"
}
},
"externalPropertyLocators": {
"files": [
{
"fileLocation": {
"baseUriId": "INLINE",
"uri": "0",
"fileIndex": 1
},
"instanceGuid": "22222222-2222-2222-2222-222222222222",
"itemCount": 2
}
]
}
]
}
From: kupsch <[email protected]>
Sent: Friday, February 22, 2019 7:23 AM
To: oasis-tcs/sarif-spec <[email protected]>
Cc: Larry Golding <[email protected]>; Mention <[email protected]>
Subject: Re: [oasis-tcs/sarif-spec] Consider moving externalFiles to log object (#321)
Below is an example SARIF file, for my proposal to inline external data that can be shared between runs. Add a new top level property whose value is an array of externalPropertyFile objects. The sarif URI protocol is used to reference the location in the array. Each run is unchanged except for the fileLocation of the external property, and the contents of the external file is unchanged. There is no coupling of runs using this scheme, and file location in an external property file is always an externalPropertyFile object.
A further step would be to not require the externalPropertyFiles fileLocation in a run to change its fileLocation, but to inform consumers that if an inlineExternalFiles property exists with a matching instanceGuid then this is the externalPropertyFile object; this makes inline and externalizing simple.
{
...
"inlineExternalFiles": [
{
"$schema":
"http:///json.schemastore.org/sarif-external-property-file-2.0.0 <http://json.schemastore.org/sarif-external-property-file-2.0.0> ",
"version": "2.0.0",
"instanceGuid": "22222222-2222-2222-2222-222222222222",
"run.files": {
"apple.png": {
"mimeType": "image/png"
},
"banana.png": {
"mimeType": "image/png"
}
}
}
],
"runs": [
{
"originalUriBaseIds": {
"INLINE": {
"uri": "sarif:///inlineExternalPropertyFiles/"
}
},
"externalPropertyFiles": {
"files": [
{
"fileLocation": {
"baseUriId": "INLINE",
"uri": "0",
"fileIndex": 1
},
"instanceGuid": "22222222-2222-2222-2222-222222222222",
"itemCount": 2
}
]
}
]
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#321 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ALN73XWfCMsGH8HHfID6Pdbkspeh85bdks5vQAtBgaJpZM4aZGsq> . <https://github.com/notifications/beacon/ALN73Xn-gt49OIJGMc2avcCOhchHlwtNks5vQAtBgaJpZM4aZGsq.gif>
|
EBALLOT PROPOSALProvide a mechanism for inlining externalized property data at the log level. This facility allows for shared data between runs that is itself persisted to the log (e.g., common taxonomy metadata will be useful to store in this way). API IMPACTSDK PR: microsoft/sarif-sdk#1319 NOTESThe run-level property
POST-BALLOT NOTES:
|
* adding inline externalpropertyfiles at root level * Update release notes * Tweak release history
The change draft said that if an externalProperties object occurs as an element of sarifLog.inlineExternalProperties, then if its $schema property is omitted, it inherits the value from the containing sarifLog.$schema. But this is wrong, because sarifLog.$schema is the schema for a SARIF log file, while externalProperties.$schema is the schema for an external properties file. The change draft correctly said that externalProperties.version can inherit from sarifLog.version. This is right because both properties refer to a version of the SARIF specification.
In 3.10.3, the sentence describing the sarif sheme ("Such a URI..."), would be more specific as:
|
The sarif scheme should be registered with IANA. If not on someone list of task already. |
This draft contains all the changes through "e-ballot #2," which opened on Friday March 15 and will close on Friday March 22. It contains changes for ballot issues #168, #291, #309, #320, #321, #326, #335, and #341, as well as for previously approved issue #340. It does _not_ contain changes for any issues from "e-ballot #3," which will open on Friday March 22 and close on Friday March 29.
Approved in e-ballot #2. |
This required in order to accommodate sarifLog.taxonomies metadata, which will be a log level construct, as the data itself is entirely external to any tool execution (e.g., the CWE definitions).
The property names would be a JSON path to the construct which has been externalized.
@lgolding per discussion
The text was updated successfully, but these errors were encountered: