mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add verbose logging setting + setup buffering of logs to prevent interleaving logs with the package manager.
This commit is contained in:
parent
0b393eeb5f
commit
c5e25f4813
4 changed files with 64 additions and 7 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { ui } from "../../environment/userInteraction.js";
|
||||
import {
|
||||
MALWARE_STATUS_MALWARE,
|
||||
openMalwareDatabase,
|
||||
|
|
@ -19,8 +20,14 @@ export async function auditChanges(changes) {
|
|||
);
|
||||
|
||||
if (malwarePackage) {
|
||||
ui.writeVerboseInformation(
|
||||
`Safe-chain: Package ${change.name}@${change.version} is marked as malware: ${malwarePackage.status}`
|
||||
);
|
||||
disallowedChanges.push({ ...change, reason: malwarePackage.status });
|
||||
} else {
|
||||
ui.writeVerboseInformation(
|
||||
`Safe-chain: Package ${change.name}@${change.version} is clean`
|
||||
);
|
||||
allowedChanges.push(change);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue