Skip to content

Commit

Permalink
[CMS-590] check for WPSCAN_API_TOKEN constant:
Browse files Browse the repository at this point in the history
  • Loading branch information
namespacebrian committed Mar 29, 2022
1 parent 7daa420 commit be220b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion php/pantheon/checks/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ protected function getPluginVulnerability( $plugin_slug )
{
// Get the vulnerability API token from the platform
$wpvulndb_api_token = getenv('PANTHEON_WPVULNDB_API_TOKEN');

if(defined("WPSCAN_API_TOKEN")) {
$wpvulndb_api_token = WPSCAN_API_TOKEN;
}

// Throw an exception if there is no token
if( false === $wpvulndb_api_token || empty( $wpvulndb_api_token ) ) {
//TODO: return a value indicating no scan was performed.
Expand Down

0 comments on commit be220b0

Please sign in to comment.