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

Sort the AffectedCommits #2164

Merged
merged 1 commit into from
May 7, 2024

Conversation

andrewpollock
Copy link
Contributor

Instability in this data structure adds unnecessary noise.

There is currently the potential for variability in the output, which is resulting in unnecessary file copying to GCS (because the checksum of the file changes), and we're trying to get the true modification time of a resultant OSV record to reflect that of the newest constituent input part to combine-to-osv.

Before (for CVE-2016-0502):

[
  {
    "fixed_version": {
      "affect_commits": [
        {
          "repo": "https://github.com/mysql/mysql-server",
          "introduced": "54df0057e18d8c82c23fbd4e0bf5b5dc2e762955"
        },
        {
          "repo": "https://github.com/mysql/mysql-server",
          "fixed": "020dcec4a12e61cf5853623a2cd7b06d6bdb351f"
        },
        {
          "repo": "https://github.com/mariadb/server",
          "introduced": "5bfe1a3917ee1bddc7f2cde0c88961875148873c"
        },
        {
          "repo": "https://github.com/mariadb/server",
          "fixed": "c0c9b92e37d572cc4452970c81199367048ea198"
        },
        {
          "repo": "https://github.com/mariadb/server",
          "introduced": "776555af021e917ce0d6235386b43ae59fdd5161"
        }
      ]
    }
  }
]

After (for CVE-2016-0502):

[
  {
    "fixed_version": {
      "affect_commits": [
        {
          "repo": "https://github.com/mariadb/server",
          "introduced": "5bfe1a3917ee1bddc7f2cde0c88961875148873c"
        },
        {
          "repo": "https://github.com/mariadb/server",
          "introduced": "776555af021e917ce0d6235386b43ae59fdd5161"
        },
        {
          "repo": "https://github.com/mariadb/server",
          "fixed": "c0c9b92e37d572cc4452970c81199367048ea198"
        },
        {
          "repo": "https://github.com/mysql/mysql-server",
          "introduced": "54df0057e18d8c82c23fbd4e0bf5b5dc2e762955"
        },
        {
          "repo": "https://github.com/mysql/mysql-server",
          "fixed": "020dcec4a12e61cf5853623a2cd7b06d6bdb351f"
        }
      ]
    }
  }
]

Instability in this data structure adds unnecessary noise.

There is currently variability in the output, which is resulting in
unnecessary copying to GCS (because the checksum of the file changes),
and we're trying to get the true modification time of a resultant OSV
record to reflect that of the newest constituent input part to
`combine-to-osv`.
@andrewpollock andrewpollock merged commit 5e8ef03 into google:master May 7, 2024
11 checks passed
hogo6002 added a commit that referenced this pull request May 9, 2024
@andrewpollock andrewpollock deleted the sort_affectedcommits branch May 23, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants