mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Handle PR Comments
This commit is contained in:
parent
ea383a18de
commit
240123372a
5 changed files with 24 additions and 14 deletions
|
|
@ -65,8 +65,7 @@ export async function scanCommand(args) {
|
|||
return 0;
|
||||
} else {
|
||||
printMaliciousChanges(audit.disallowedChanges, spinner);
|
||||
await onMalwareFound();
|
||||
return 1;
|
||||
return await onMalwareFound();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,11 +89,11 @@ async function onMalwareFound() {
|
|||
|
||||
if (continueInstall) {
|
||||
ui.writeWarning("Continuing with the installation despite the risks...");
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ui.writeError("Exiting without installing malicious packages.");
|
||||
ui.emptyLine();
|
||||
process.exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ export async function openMalwareDatabase() {
|
|||
return packageData.reason;
|
||||
}
|
||||
|
||||
// This implicitely caches the malware database
|
||||
// that's closed over by the getPackageStatus function
|
||||
cachedMalwareDatabase = {
|
||||
getPackageStatus,
|
||||
isMalware: (name, version) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue