Repository navigation
fix(watchlist): vendor and product_id are the vendor source's, as inventory.py meant - #62
Closed
maksimtech wants to merge 1 commit into
Conversation
…entory.py meant inventory.py named the watchlist columns before they existed: vendor, product_id, installed_version, channel, cpe. There a vendor source is a feed that answers by version (Chrome's, Edge's, MSRC, Mozilla's) and product_id is the product it needs; NVD by CPE is the other route. #58 filled vendor and product_id with the CPE's fields instead - a misreading of the design it rebuilt - which would have had the inventory import write one over the other. No release carried it. - The CPE's vendor and product are read from `cpe` (WatchEntry.cpe_vendor, cpe_product, installed()), not stored. - set_source records the vendor source, product and channel a person confirmed, for the import to call; it never adds a name. - DESIGN.md section 5.1 says which column is which, and why. Tests first, seen failing; the mutants that swap source and product or drop the version from installed() are killed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This was referenced Oct 17, 2026
Owner
Author
|
Folded into #64, which now targets main with every commit of the stack: one review, one merge, no conflicts from squash merges. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Correction to PR-01a (#58, merged): I misread the design in my own reconstruction of it. Stacked on #61; it goes after #59 → #60 → #61.
What was wrong
inventory.pynamed the watchlist columns before they existed:vendor,product_id,installed_version,channelandcpe. There, a vendor source is a feed that answers by version (Chrome's, Edge's, MSRC, Mozilla's), andproduct_idis the product it needs ("chrome","Edge"). The CPE is the other route, "NVD by CPE".In #58,
docs/DESIGN.md§5.1 andset_installedfilledvendorandproduct_idwith the CPE's vendor and product. The inventory import (PR-01c) would then have written a vendor source over the CPE's vendor, or the other way round. No release contains #58, so there is no installed database to migrate.What changes
cpewhen the scan needs them (WatchEntry.cpe_vendor,cpe_product,installed()), not stored.set_source(name, vendor=, product_id=, channel=)records the vendor source a person confirmed, for the import to call. It never adds a name.docs/DESIGN.md§5.1 says which column is which, why there are two routes, and that until today the table was misread.Tests (strict TDD)
tests/test_vendor_source_columns.py, 5 tests: a CPE does not fill the source columns; source and CPE side by side; a source alone is not judgeable; a CPE without a version is not judgeable;set_sourcenever adds a name.entry.vendor == "notepad-plus-plus"). They now checkcpe_vendor/installed().vendorback intoset_installed, or drop the version frominstalled()are killed.🤖 Generated with Claude Code