From 52795b8e9339651d5b3351829e0d48e0e89723e7 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Thu, 12 May 2022 11:43:08 +0200 Subject: [PATCH] Print config files. --- .github/dr-action.yml | 8 ++++++++ src/main.ts | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/dr-action.yml diff --git a/.github/dr-action.yml b/.github/dr-action.yml new file mode 100644 index 0000000..d466c24 --- /dev/null +++ b/.github/dr-action.yml @@ -0,0 +1,8 @@ +fail_on_severity: critical +allow_licenses: + - "GPL 3.0" + - "BSD 3 Clause" + - "MIT" +deny_licenses: + - "LGPL 2.0" + - "BSD 2 Clause" \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index bf8fb22..406e6c8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,6 +4,7 @@ import * as github from '@actions/github' import styles from 'ansi-styles' import {RequestError} from '@octokit/request-error' import {PullRequestSchema} from './schemas' +import * as fs from 'fs' async function run(): Promise { try { @@ -46,6 +47,16 @@ async function run(): Promise { } } + // TODO check for file not existing + // TODO check for file with both extensions + + var severity: string + var allowlist, blocklist: [string] + + var data = fs.readFile("./.github/dep-review.yml", "utf-8", (err, data) => { + core.info(data) + }) + if (failed) { throw new Error('Dependency review detected vulnerable packages.') } else {