Skip to content

Commit bdaa28b

Browse files
committed
Revert changing JSON format
1 parent c847e1d commit bdaa28b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export async function processScanResult(result: ScanExecutionResult, opts: Actio
8888
excludeAccepted: opts.excludeAccepted,
8989
};
9090

91+
core.info("Generating SARIF Report...")
9192
generateSARIFReport(report, opts.groupByPackage, filters);
9293

9394
if (!opts.skipSummary) {

src/action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class ActionInputs {
232232
}
233233

234234
if (this.params.mode == ScanMode.vm) {
235-
flags += ` --output=json-file=${cliScannerResult}`
235+
flags += ` --json-scan-result=${cliScannerResult}`
236236
flags += ` ${this.params.imageTag}`;
237237
}
238238

src/sarif.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,11 @@ function vulnerabilities2SARIFResByPackage(data: Report): [SARIFRule[], SARIFRes
219219
return [rules, results];
220220
}
221221

222-
223222
function sanitizeImageName(imageName: string) {
224223
// Replace / and : with -
225224
return imageName.replace(/[\/:]/g, '-');
226225
}
227226

228-
229227
function vulnerabilities2SARIFRes(data: Report): [SARIFRule[], SARIFResult[]] {
230228
let results: SARIFResult[] = [];
231229
let rules: SARIFRule[] = [];

tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ describe("run the full action", () => {
460460

461461
await index.run();
462462
expect(mockExec).toHaveBeenCalledTimes(4);
463-
expect(mockExec.mock.calls[2][0]).toMatch(`${index.cliScannerName} --apiurl https://secure.sysdig.com/ --override-pullstring=my-custom-image:latest --output=json-file=scan-result.json image:tag`);
463+
expect(mockExec.mock.calls[2][0]).toMatch(`${index.cliScannerName} --apiurl https://secure.sysdig.com/ --override-pullstring=my-custom-image:latest --json-scan-result=scan-result.json image:tag`);
464464
});
465465
});
466466

0 commit comments

Comments
 (0)