Appearance
Advisories
php
final class Zairakai\LaravelDevTools\Update\AdvisoriesThe security advisories of composer audit: their rows, their issues and their notification.
Source: src/Update/Advisories.php
Constants
| Name | Value | Description |
|---|---|---|
ADVISORY_TITLE_PREFIX | 'Security advisory: ' | The start of the title of the issues opened by the audit. |
Methods
advisories()
php
public static function advisories(array $report): arrayThe advisories of the JSON report of composer audit, one row per advisory.
Returns list<array{id: string, package: string, title: string, link: string, cve: string, severity: string, range: string}>
advisoryIssueBody()
php
public static function advisoryIssueBody(array $advisory, string $pipelineUrl, bool $autoFix): stringThe body of the issue opened for an advisory.
advisoryLabels()
php
public static function advisoryLabels(array $advisory, array $base): stringThe labels of the issue of an advisory: kind and area, the priority from the severity, and Status::Ready.
| Parameter | Description |
|---|---|
$base | the labels that every issue has |
advisoryTitle()
php
public static function advisoryTitle(array $advisory): stringThe title of the issue of an advisory. It is also the key that keeps the issue from being opened twice.
auditAlert()
php
public static function auditAlert(array $opened, string $project): arrayThe one notification of an audit, or null when nothing notable was opened. The advisories of a low severity only get their issue: they are counted, not listed.
Returns array{title: string, message: string}|null
isNotable()
php
public static function isNotable(string $severity): boolWhether an advisory is worth a push notification: medium and above. Unknown counts as notable. Composer says medium, npm says moderate.
isUrgent()
php
public static function isUrgent(string $severity): boolWhether an advisory is fixed without waiting for the next weekly update. Composer does not always give a severity: unknown counts as a medium one, it is not.