Make security checks into plugins

Created on 25 November 2015, over 9 years ago
Updated 13 January 2024, over 1 year ago

Currently, checks are classes that are registered with hook_security_review_checks() and have special methods for returning meta-data about the checks.

Instead, let's:

  1. Make each check into a plugin, with the meta-data in the annotation
  2. Add a Plugin manager service
  3. Create a CheckInterface which Check will implement (should we renamed to CheckBase to match similar systems in D8 core?)
  4. Inject dependencies into the checks, rather than directly accessing the container
  5. Implement ConfigurablePluginInterface rather than accessing config objects directly

This will make the checks be more inline with similarly extensible systems in D8 core!

As a side benefit, this will make the meta-data about the plugins translatable, because (per best practices) we'll use @Translation() in the annotations.

This replaces previous issues on GitHub: https://github.com/banviktor/security_review/issues/21 and https://github.com/banviktor/security_review/issues/25

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024