From d052ce197cc56fed06e971736417bdac88c85235 Mon Sep 17 00:00:00 2001 From: Linpeng Zhang Date: Tue, 31 Oct 2023 13:34:32 +0000 Subject: [PATCH] feat(COD-2102): Add an option to use CAA data --- action.yaml | 4 ++++ src/index.ts | 4 ++++ src/util.ts | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/action.yaml b/action.yaml index cacdbf84..6f2bdaee 100644 --- a/action.yaml +++ b/action.yaml @@ -39,6 +39,10 @@ inputs: description: 'Set to true to enable automated pull-requests for fix suggestions' required: false default: false + dynamic: + description: 'Set to true to integrate SCA results with dynamic data, such as package activity' + required: false + default: false outputs: old-completed: description: 'If running a target called old, whether the analysis for this was completed' diff --git a/src/index.ts b/src/index.ts index 6e11b479..4382e7e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ import { import { compareResults, createPRs, printResults } from './tool' import { autofix, + dynamic, callCommand, callLaceworkCli, debug, @@ -67,6 +68,9 @@ async function runAnalysis() { if (autofix()) { args.push('--fix-suggestions') } + if (dynamic()) { + args.push('--dynamic') + } await callLaceworkCli(...args) // make a copy of the sarif file args = [scaSarifReport, scaReport] diff --git a/src/util.ts b/src/util.ts index 44e51fac..5659a716 100644 --- a/src/util.ts +++ b/src/util.ts @@ -27,6 +27,10 @@ export function autofix() { return getBooleanInput('autofix') } +export function dynamic() { + return getBooleanInput('dynamic') +} + export function getRunUrl(): string { let result = getRequiredEnvVariable('GITHUB_SERVER_URL') result += '/'