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

Refactor with modular and configurable scanners #56

Closed
6 tasks done
seanpmorgan opened this issue Nov 21, 2023 · 0 comments · Fixed by #67
Closed
6 tasks done

Refactor with modular and configurable scanners #56

seanpmorgan opened this issue Nov 21, 2023 · 0 comments · Fixed by #67
Labels

Comments

@seanpmorgan
Copy link
Member

seanpmorgan commented Nov 21, 2023

Today, ModelScan has a set of built-in scans with preset configurations. Which scan is ran on a given file is determined by hardcoded logic that inspects the file extensions.

We're going to refactor the library so that:

  1. The settings of a given scanner can be modified by the user (e.g. set a custom vulnerability severity for a given finding)
  2. A user can easily add additional scanners
  3. A user can select which scanners they want to actively run
  4. Each scanner is functional and does not have side effects for other the scans ran. This way, there can be multiple scanners for a certain file type (e.g. one scanner detects pkl vulnerabilities, and another extracts metadata from the file)

Tasks:

  • Add a default config with a list of DEFAULT_SCANNERS of all our current scanners and settings for each
  • Support a settings.toml to select scanners and set custom configurations
  • Refactor ModelScan.scan to take a list of scanners and settings, defaulting to the config if none are provided
  • Have ModelScan.scan run all scanners that have been selected
  • Have self-contained scanners determine if they should run on a given file (re-using utility functions)
  • Refactor CLI to fit new scanner design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant