Skip to content

Failing vuln_attempt_registration_spec in Verify workflow due to module metadata cache error #21773

Description

@dwelch-r7

Failing vuln_attempt_registration_spec in Verify workflow due to module metadata cache error

The Verify workflow is failing in spec/lib/msf/core/vuln_attempt_registration_spec.rb on the example:

  • Vuln and VulnAttempt registration when running an exploit module
  • exploit module with prepend AutoCheck when check returns Vulnerable and exploit runs
  • sets check_detail on the vuln attempt

Failing job

GitHub Actions job #93844208506

Failure details

The job log shows the spec fails with:

Failure/Error: @module_metadata_cache[cache_key] = metadata_obj

RuntimeError:

This occurs while running the exploit-module AutoCheck test, specifically during module setup / metadata caching.

Relevant context

The failing spec is in:

spec/lib/msf/core/vuln_attempt_registration_spec.rb

The failing example is around line 1068, and it uses a dynamically constructed exploit module class with prepend Msf::Exploit::Remote::AutoCheck, then runs cmd_exploit and expects check_detail to be persisted on the vuln attempt.

Impact

This causes the Verify job to fail with 1 RSpec failure, blocking CI for the affected change set.

Suspected cause

The failure appears related to module metadata caching while the test is loading or refreshing module definitions. The dynamic test module setup may be interacting badly with framework.modules.refresh_cache_from_module_files or cached module metadata state during the AutoCheck exploit path.

Suggested next steps

  • Reproduce the failure locally with the failing spec.
  • Inspect module cache behavior for dynamically created test modules.
  • Consider isolating the test from module cache refresh, or using a stable fixture-backed module definition.
  • Verify whether the failing example depends on module state leaked from previous setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions