Validating User Discovery Implementation in WPScan
This test suite validates the user discovery functionality in WPScan, focusing on the base finder class and its associated finder methods. It ensures proper initialization and verification of various user detection mechanisms employed by the security scanning tool.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/users_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::Users::Base do
subject(:user) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
let(:url) { 'http://ex.lo/' }
describe '#finders' do
it 'contains the expected finders' do
expect(user.finders.map { |f| f.class.to_s.demodulize })
.to eq %w[AuthorPosts WpJsonApi OembedApi RSSGenerator AuthorSitemap YoastSeoAuthorSitemap
AuthorIdBruteForcing LoginErrorMessages]
end
end
end