From 90b9d3531b396416c1caafe43b6e321982943183 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Tue, 28 May 2024 23:02:02 +0200 Subject: [PATCH] action.cjs: bugfix full repo scan --- action.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.cjs b/action.cjs index 5697c7fb..6e3d266b 100644 --- a/action.cjs +++ b/action.cjs @@ -34,7 +34,7 @@ module.exports = async ({ github, context, inputs, actionPath, core }) => { if (inputs.enabled !== 'true') { return } debug('Security Action enabled') // reviewdog-enabled-pr steps - const reviewdogEnabledPr = inputs.baseline_scan_only !== 'false' && process.env.GITHUB_EVENT_NAME === 'pull_request' && context.payload.pull_request.draft === false && context.actor !== 'dependabot[bot]' + const reviewdogEnabledPr = inputs.baseline_scan_only !== 'false' && process.env.GITHUB_EVENT_NAME === 'pull_request' && context.payload.pull_request && context.payload.pull_request.draft === false && context.actor !== 'dependabot[bot]' debug(`Security Action enabled for PR: ${reviewdogEnabledPr}, baseline_scan_only: ${inputs.baseline_scan_only}, GITHUB_EVENT_NAME: ${process.env.GITHUB_EVENT_NAME}, context.actor: ${context.actor}, context.payload.pull_request.draft: ${context.payload.pull_request.draft}`) // reviewdog-enabled-full steps const reviewdogEnabledFull = !reviewdogEnabledPr && (inputs.baseline_scan_only === 'false' || process.env.GITHUB_EVENT_NAME === 'workflow_dispatch')