Fetch WordPress vulnerability information from Wordfence vulnerability data feed.
Built with ♥ by Typist Tech
use \TypistTech\WordfenceAPI\{Client, Feed, Record};
$client = new Client;
// Alternatively, use `Feed::Scanner`` for the scanner feed.
$records = $client->fetch(Feed::Production);
foreach($records as $record) {
/** @var Record $record */
echo $record->title;
}
composer require typisttech/wordfence-api
Tip
Set memory_limit
on the fly as a temporary fix:
php -d memory_limit=512MB your-script.php
As of December 2024, the production Wordfence vulnerability data feed is over 80 MB.
Client
downloads the feed into memory and json_decode()
the entire feed all in one go.
It causes PHP to run out of memory.
A possible solution is to use a streaming JSON parser like json.Decoder
in Go.
If you know how to do that in PHP, please send pull requests. 🙇
Wordfence API
is a Typist Tech project and
maintained by Tang Rufus, freelance developer for hire.
Full list of contributors can be found here.
This project is a free software distributed under the terms of the MIT license. For the full license, see LICENSE.
Before using Wordfence Vulnerability Data Feed API, you must read and agree to the Wordfence Intelligence Terms and Conditions.
Learn more at Wordfence help documentation.
If you have any questions about the terms and conditions, please contact Wordfence directly.
Any company or individual who uses Wordfence vulnerability database API needs to display the MITRE copyright claims included in that vulnerability record for any MITRE vulnerabilities that they display to their end user.
Learn more at Wordfence help documentation.
If you have any questions about the attribution requirement, please contact Wordfence directly.
Feedbacks / bug reports / pull requests are welcome.