From be220b0f11b9fde27557c72ecdb038d46cd2d4d0 Mon Sep 17 00:00:00 2001 From: Brian Weaver Date: Tue, 29 Mar 2022 12:17:53 -0400 Subject: [PATCH] [CMS-590] check for WPSCAN_API_TOKEN constant: --- php/pantheon/checks/plugins.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/pantheon/checks/plugins.php b/php/pantheon/checks/plugins.php index 51b7323..3e5af0b 100644 --- a/php/pantheon/checks/plugins.php +++ b/php/pantheon/checks/plugins.php @@ -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.