Update dist

This commit is contained in:
Justin Hutchings
2024-03-08 01:30:46 +00:00
parent 296bf3ab1b
commit cb0a0415fb
2 changed files with 12 additions and 1 deletions
Generated Vendored
+11
View File
@@ -658,6 +658,7 @@ function run() {
const scorecard = yield (0, scorecard_1.getScorecardLevels)(filteredChanges);
summary.addScorecardToSummary(scorecard, config);
printScorecardBlock(scorecard, config);
createScorecardWarnings(scorecard, config);
}
summary.addScannedDependencies(changes);
printScannedDependencies(changes);
@@ -805,6 +806,16 @@ function printDeniedDependencies(changes, config) {
}
}));
}
function createScorecardWarnings(scorecards, config) {
var _a, _b, _c;
// Iterate through the list of scorecards, and if the score is less than the threshold, send a warning
for (const dependency of scorecards.dependencies) {
if (((_a = dependency.scorecard) === null || _a === void 0 ? void 0 : _a.score) &&
((_b = dependency.scorecard) === null || _b === void 0 ? void 0 : _b.score) < config.warn_on_openssf_scorecard_level) {
core.warning(`${dependency.ecosystem}/${dependency.packageName} has an OpenSSF Scorecard of ${(_c = dependency.scorecard) === null || _c === void 0 ? void 0 : _c.score} is less than this repository's threshold of ${config.warn_on_openssf_scorecard_level}.`);
}
}
}
run();
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long