Skip to content
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

Make certain invocation and versionControlDetails properties redactable #390

Closed
ghost opened this issue Apr 18, 2019 · 5 comments
Closed
Labels
2.1.0-CSD.1 Will be fixed in SARIF v2.1.0 CSD.1. design-improvement impact-breaks-consumers merged Changes merged into provisional draft. resolved-fixed

Comments

@ghost
Copy link

ghost commented Apr 18, 2019

NOTE: This description comment is OBSOLETE. See the REVISED PROPOSAL below.

Per feedback from Ykaterina and validated by discussion with @michaelcfanning:

Make the following properties of the invocation object redactable:

  • machine (replace the entire string with a redaction token)
  • account (replace the entire string with a redaction token)
  • processId (replace the entire string with a redaction token)
  • executableLocation (uri property is redactable; that is, replace selected segments of the uri with a redaction token)
  • workingDirectory (uri property is redactable; that is, replace selected segments of the uri with a redaction token)
  • environmentVariables (replace selected property names with distinct redaction tokens; replace selected portions of property values with redaction tokens)

NOTE: To cover executableLocation and workingDirectory, we should state in the section about artifactLocation.uri that any uri is redactable.

Consider making the following properties of the versionControlDetails object redactable:

  • repositoryUri
  • revisionId
  • branch
  • revisionTag

UPDATES

  • inovcation.processId is an integer, so not redactable.
  • We now allow artifactLocation.uri to be redactable, which covers invocation.executableLocation and invocation.workingDirectory.
  • In fact the spec now says that every URI-valued string (even if it doesn't occur as a value of artifactLocation.uri) is redactable.
@ghost ghost self-assigned this Apr 18, 2019
@ghost ghost changed the title Should certain invocation properties be redactable Make certain invocation properties redactable Apr 18, 2019
ghost pushed a commit that referenced this issue Apr 18, 2019
This draft contains only the editorial changes. I opened separate issues
#381 and #390 for her substantive suggestions.
@ghost ghost changed the title Make certain invocation properties redactable Make certain invocation and versionControlDetails properties redactable Apr 18, 2019
ghost pushed a commit that referenced this issue Apr 26, 2019
@ghost ghost closed this as completed Apr 26, 2019
@kupsch
Copy link

kupsch commented Apr 26, 2019

The uri value for a nested file should not be required to start with a an absolute path as was added to this draft (I had commented on this earlier). Both tar and zip support relative paths and absolute paths in the same archive. This means that an archive can contain both "/foo.txt" and "foo.txt" and that these are distinct archive member with distinct values. If you require absolute paths how are the two distinguished. The guidance should be to have the uri (not a uri, but the member name) use the member name or path as is from the archive. Generally this will be a relative path as this is the most commonly used type.

@michaelcfanning
Copy link
Contributor

michaelcfanning commented Apr 26, 2019 via email

@michaelcfanning
Copy link
Contributor

michaelcfanning commented Apr 26, 2019 via email

@ghost ghost removed merged Changes merged into provisional draft. resolved-fixed labels Apr 26, 2019
@ghost ghost reopened this Apr 26, 2019
@ghost
Copy link
Author

ghost commented Apr 26, 2019

REVISED PROPOSAL

Make the following properties of the invocation object redactable:

  • machine
  • account
  • environmentVariables (replace selected property names with distinct redaction tokens; replace selected portions of property values with redaction tokens)

Make the following properties of the versionControlDetails object redactable:

  • revisionId
  • branch
  • revisionTag

Make artifactLocation.uri optional (with no default value) in the specific case where the artifactLocation is a top-level value in originalUriBaseIds. This improves the usefulness of originalUriBaseIds in representing sanitized URIs. That is, given this:

"originalUriBaseIds": {
 "PROJECTROOT": {
    "uri": "file:///C:/Users/Larry/code/OurProject",
    "description": "The root directory for all project files."
 },
  "SRCROOT": {
    "uri": "src",
    "uriBaseId": "PROJECTROOT",
    "description": "The root of the source tree."
  }
}

... we will now be able to write this:

"originalUriBaseIds": {
 "PROJECTROOT": {
    "description": "The root directory for all project files. (Look, no uri!)"
 },
  "SRCROOT": {
    "uri": "src",
    "uriBaseId": "PROJECTROOT",
    "description": "The root of the source tree."
  }
}

... rather than having to remove the PROJECTROOT property entirely, like this:

"originalUriBaseIds": {
  "SRCROOT": {
    "uri": "src",
    "uriBaseId": "PROJECTROOT",
    "description": "The root of the source tree."
  }
}

We get the security benefit without losing the documentation for the uriBaseId value.

ghost pushed a commit that referenced this issue Apr 27, 2019
ghost pushed a commit that referenced this issue Apr 27, 2019
@ghost ghost added merged Changes merged into provisional draft. resolved-fixed labels Apr 27, 2019
@ghost ghost closed this as completed Apr 27, 2019
@ghost ghost removed the schema-todo label Apr 29, 2019
@ghost
Copy link
Author

ghost commented Apr 29, 2019

This became a schema change when we allowed a top-level artifactLocation object in originalUriBaseIds to have neither a uri nor an index. So I removed the anyOf that required one of those two properties.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.0-CSD.1 Will be fixed in SARIF v2.1.0 CSD.1. design-improvement impact-breaks-consumers merged Changes merged into provisional draft. resolved-fixed
Projects
None yet
Development

No branches or pull requests

2 participants