Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Deleted Snyk projects not removed from cache #52

Open
ebickle opened this issue Feb 18, 2022 · 0 comments
Open

Deleted Snyk projects not removed from cache #52

ebickle opened this issue Feb 18, 2022 · 0 comments

Comments

@ebickle
Copy link

ebickle commented Feb 18, 2022

The sync() function in cli.py will load all existing repos from the cache (load_watchlist()), list all GitHub repositories, then list all Snyk projects matching those repositories and add or update information as appropriate.

However, it does not check whether a Snyk project no longer exists for a repository and, if so, remove it from the cache. Regardless of the intent, it leads to multiple issues:

  • If a Snyk project is accidentally deleted or intentionally deleted to force the importer to reimport it, the importer might believe it's already imported and skip it.
  • The "tag" command will fail with a 404 when it tries to add a tag to a project that does not exist.

The later is causing our synchronization to fail - it continually tries to add tags to projects that don't exist and crashes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant