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

Discuss what to do about hitting duplicate facts when gathering for insights #3

Open
timclifford opened this issue Mar 4, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@timclifford
Copy link
Contributor

Since fact names need to be unique per environment we have an issue where the facts gathering will pick up facts with the same name from different sources/images.

The issue is even though we deleteFactsFromSource prior to adding new ones in insights, this does not cover those facts with a different source name.

@timclifford
Copy link
Contributor Author

Duplicate facts from source - solved
We've updated the source definition of facts to be more generic (rather than tied to a particular service), therefore all facts for a given insight type are now cleared on every scan. For example, all 'sboms' will be deleted from source (sbom:[service]) before a new syft scan is ran preventing having duplicate facts from this instance.

Remaining issues:

  • What happens if multiple images being scanned contain the same facts. For example, two node.js images are found with differing npm package versions. Which version do we store and how do we avoid duplication issues?

Current thinking:

  • We improve the parsing/fact filtering process to be more dynamic

@timclifford timclifford added the question Further information is requested label Mar 8, 2022
@tobybellwood
Copy link
Member

Right now, given we're only getting key facts in to the API, we should define which service the fact should come from, which would avoid this issue.

One complication I've just thought of, is that we may have to check the service type instead of just the service name, but I'll think on it a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants