State should be cleaned on uninstall

Created on 15 February 2024, over 1 year ago
Updated 29 February 2024, over 1 year ago

Problem/Motivation

I was trying to figure out why the module would not work on my project, and decided to uninstall/reinstall after I did not see any existing issues, only to find that the checks would fail again in the same way. This led me onto the path towards the state variables where the last run information is kept. It looks like something happened to corrupt those in my project. I'm not sure I can even reconstruct how we ever got in this particular situation (I found that the hushed_findings on unset, but findings itself is filled; not sure if there is a legitimate way one might end up in that situation, but it causes new CheckResult to complain that $hushed should be an array and is NULL). However, I figure that at the very least uninstalling the module should get us a clean slate.

Steps to reproduce

  • Install the module
  • Run the checks
  • Uninstall the module
  • Inspect the key value store to see that there are state variables starting with security_review.check left, as well as security.review.server.groups and security_review.server.uid

Proposed resolution

Add an uninstall hook that cleans the state storage.

Remaining tasks

  • Create MR
  • Review
  • Merge

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024