
| Current Path : /var/www/html/vendor/enlightn/security-checker/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/vendor/enlightn/security-checker/src/SecurityChecker.php |
<?php
namespace Enlightn\SecurityChecker;
class SecurityChecker
{
/**
* @var string
*/
private $tempDir;
public function __construct($tempDir = null)
{
$this->tempDir = $tempDir;
}
/**
* @param string $composerLockPath
* @param false $excludeDev
* @param array $allowList
* @return array
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function check($composerLockPath, $excludeDev = false, $allowList = [])
{
$parser = new AdvisoryParser((new AdvisoryFetcher($this->tempDir))->fetchAdvisories());
$dependencies = (new Composer)->getDependencies($composerLockPath, $excludeDev);
return (new AdvisoryAnalyzer($parser->getAdvisories($allowList)))->analyzeDependencies($dependencies);
}
}