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

DB publishing twice in the same day may produce unexpected results #163

Open
wagoodman opened this issue Sep 18, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@wagoodman
Copy link
Contributor

When baking a DB and adding that value to the listing file there are two things to keep in mind when sorting the listing entries:

  • the date the data was pulled (not when the DB was built)
  • the random suffix for each DB uploaded

Today if you wanted to rebuild a DB and replace todays DB (by adding a new entry in front of the other) then it's random chance if you can do so:

{
  "built": "2023-09-18T01:23:18Z",
  "checksum": "sha256:ce75b915aad4afd07afa499d28f2b9857401d40fabd3cafc25e494d391a5f079",
  "url": "https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v3_2023-09-18T01:23:18Z_c4b2ec45d1433ce7556a.tar.gz",
  "version": 3
}
{
  "built": "2023-09-18T01:23:18Z",
  "checksum": "sha256:2f54bd73618e2a5235263f4bd9f4533e732699aa5962268ec151a08664f12d16",
  "url": "https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v3_2023-09-18T01:23:18Z_5e0fa851d64332a6dfcb.tar.gz",
  "version": 3
}

These two were build 10 hours apart from one another, but you cannot tell this since it's the data age that makes the timestamp. Instead we're relying on good ordering of the suffix (which is random!).

@wagoodman wagoodman added the bug Something isn't working label Sep 18, 2023
willmurphyscode pushed a commit that referenced this issue Mar 27, 2024
Bumps [orjson](https://github.com/ijl/orjson) from 3.8.10 to 3.8.11.
- [Release notes](https://github.com/ijl/orjson/releases)
- [Changelog](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
- [Commits](ijl/orjson@3.8.10...3.8.11)

---
updated-dependencies:
- dependency-name: orjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant