Skip to content

Commit

Permalink
fix(artifact): importing @actions/artifact using CommonJS module and …
Browse files Browse the repository at this point in the history
…using only if GITLEAKS_ENABLE_UPLOAD_ARTIFACT set to true

- @actions artifact requires importing DefaultArtifactClient to use client
- creating DefaultArtifactClient instance only if GITLEAKS_ENABLE_UPLOAD_ARTIFACT set to true, client does not need if env options set to false
  • Loading branch information
codykhon committed May 30, 2024
1 parent db1cd20 commit 37a676f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gitleaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ async function Scan(gitleaksEnableUploadArtifact, scanInfo, eventType) {
};

await artifactClient.uploadArtifact(
artifactName,
["results.sarif"],
process.env.HOME,
options
artifactName,
["results.sarif"],
process.env.HOME,
options
);
}

Expand Down

0 comments on commit 37a676f

Please sign in to comment.