Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix issue detecting
  • Loading branch information
ihormandzyuk committed Jul 2, 2025
commit 0b458493988f3756593358463ed32f425830a951
4 changes: 2 additions & 2 deletions Model/SecurityChecker/CheckArchiveInRootAndSubFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct(
File $file,
SecurityStatusCacheFactory $securityStatusCacheFactory,
Json $json,
$position = null
$position = null
) {
$this->directoryList = $directoryList;
$this->file = $file;
Expand Down Expand Up @@ -172,7 +172,7 @@ private function isExcluded(string $path): bool
$result = false;

foreach ($this->exclude as $excludePath) {
if (strpos($path, $this->directoryList->getRoot() . '/' . $excludePath) === 0) {
if (strpos($path, $excludePath) !== false) {
$result = true;
break;
}
Expand Down
7 changes: 5 additions & 2 deletions Model/SecurityChecker/CheckMagentoAndPhpVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
Curl $curl,
SecurityStatusCacheFactory $securityStatusCacheFactory,
Json $json,
$position = null
$position = null
) {
$this->productMetadata = $productMetadata;
$this->curl = $curl;
Expand Down Expand Up @@ -96,7 +96,10 @@ public function updateCache()
$tags = json_decode($response, true);
if (json_last_error() == JSON_ERROR_NONE) {
foreach ($tags as $key => $tag) {
if (!isset($tag['name']) || (false !== strpos($tag['name'], 'beta'))) {
if (!isset($tag['name']) ||
(false !== strpos($tag['name'], 'alpha')) ||
(false !== strpos($tag['name'], 'beta'))
) {
continue;
}

Expand Down
9 changes: 5 additions & 4 deletions Model/SecurityChecker/CheckSQLInRootAndSubFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class CheckSQLInRootAndSubFolder extends AbstractChecker
private $exclude = [
'vendor/laminas/laminas-db/',
'vendor/magento/magento2-base/dev/',
'vendor/magento/magento-zf-db',
'dev/tests/'
];

Expand All @@ -71,7 +72,7 @@ public function __construct(
File $file,
Json $json,
SecurityStatusCacheFactory $securityStatusCacheFactory,
$position = null
$position = null
) {
$this->directoryList = $directoryList;
$this->file = $file;
Expand Down Expand Up @@ -106,7 +107,7 @@ public function updateCache()
$filterIterator = new \RecursiveCallbackFilterIterator($directoryIterator, [$this, 'filterCallback']);

$iterator = new \RecursiveIteratorIterator($filterIterator);

$sqlPathFiles = [];

foreach ($iterator as $file) {
Expand Down Expand Up @@ -134,7 +135,7 @@ public function updateCache()
return $this;
}

/**
/**
* @param mixed $current
* @param mixed $key
* @param mixed $iterator
Expand All @@ -158,7 +159,7 @@ private function isExcluded(string $path): bool
$result = false;

foreach ($this->exclude as $excludePath) {
if (strpos($path, $this->directoryList->getRoot() . '/' . $excludePath) === 0) {
if (strpos($path, $excludePath) !== false) {
$result = true;
break;
}
Expand Down