Skip to content

Commit

Permalink
test security check
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelMor25 committed Dec 12, 2023
1 parent 17efe36 commit 953f82d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/security-checker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class SecurityChecker {
}

createAlertDictionary (existedIssues) {
console.log(existedIssues)
return existedIssues.reduce((res, issue) => {
const [, repo] = issue.body.match(/Repository:\s*(.*)(\n)/);
const [, url, type] = issue.body.match(/Link:\s*(https:.*\/(dependabot|code-scanning)\/(\d+))/);
Expand Down Expand Up @@ -193,7 +192,7 @@ class SecurityChecker {
}

needCreateIssue (alert) {
return !this.alertDictionary[alert.rule.description] && Date.now() - new Date(alert.created_at) <= 1000 * 60 * 60 * 24;
return !this.alertDictionary[alert.security_advisory.summary] && Date.now() - new Date(alert.created_at) <= 1000 * 60 * 60 * 24;
}

async createIssue ({ labels, originRepo, summary, description, link, issuePackage = '', cveId, ghsaId }) {
Expand Down

0 comments on commit 953f82d

Please sign in to comment.