Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
michelelizzit committed Jan 22, 2024
1 parent e481015 commit 96f0343
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/semgrep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export async function runSemgrepHcl(context: vscode.ExtensionContext, wspath: st
iacpath = path.relative(wspath, iacpath);
console.log(`[IaC Semgrep] Semgrep CWD: ${iacpath}`);

if (iacpath.trim() === "") {
iacpath = "./";
}

let semgrepArgsArray: string[] = ["--config", context.asAbsolutePath("tfparse_rules/")];
semgrepArgsArray = ["--no-git-ignore", "--json", "--quiet"].concat(semgrepArgsArray).concat([iacpath]);
console.log(`[IaC Semgrep] Running Semgrep with args: ${semgrepArgsArray}`);
Expand Down

0 comments on commit 96f0343

Please sign in to comment.