Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import {
generateCacheKey,
} from './util'

// Global scanner toggles - set to false to disable a scanner globally
// Set to false to disable SCA globally
const enableScaRunning = true
let enableIacRunning = false

async function runAnalysis() {
const target = getInput('target')
Expand Down Expand Up @@ -55,9 +54,10 @@ async function runAnalysis() {
}

// Skip the IaC scan if there no IaC-related files have been modified in the PR
let enableIacRunning = true
if (modifiedFiles && target == 'new') {
if (shouldRunIaCScanner(modifiedFiles)) {
enableIacRunning = true
if (!shouldRunIaCScanner(modifiedFiles)) {
enableIacRunning = false
}
}

Expand Down Expand Up @@ -171,6 +171,8 @@ async function runAnalysis() {
}

async function displayResults() {
const enableIacRunning = true

info('Displaying results')

// Download artifacts from previous jobs
Expand Down
Loading