Skip to content

Commit cb49adc

Browse files
committed
Migrate git-repo-scanner to esm
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
1 parent 92a415c commit cb49adc

5 files changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ jobs:
421421
- amass
422422
- cmseek
423423
- ffuf
424-
# - git-repo-scanner
424+
- git-repo-scanner
425425
# - gitleaks
426426
# - kube-hunter
427427
# - ncrack

scanners/git-repo-scanner/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ appVersion: "1.1"
1313
kubeVersion: ">=v1.11.0-0"
1414
annotations:
1515
# supported cpu architectures for which docker images for the scanner should be build
16-
supported-platforms: linux/amd64
16+
supported-platforms: linux/amd64,linux/arm64
1717

1818
keywords:
1919
- git

scanners/git-repo-scanner/integration-tests/git-repo-scanner.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
const { scan } = require("../../../tests/integration/helpers.js");
6-
7-
jest.retryTimes(3);
5+
import { scan } from "../../../tests/integration/helpers.js";
86

97
test(
108
"gitleaks should find at least 1 repository in the GitHub secureCodeBox organisation",
@@ -20,5 +18,7 @@ test(
2018
// There must be >= 28 Repositories found in the GitHub secureCodeBox organisation.
2119
expect(count).toBeGreaterThanOrEqual(28);
2220
},
23-
3 * 60 * 1000,
21+
{
22+
timeout: 3 * 60 * 1000,
23+
},
2424
);

scanners/git-repo-scanner/parser/parser.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
async function parse(fileContent) {
5+
export async function parse(fileContent) {
66
return fileContent;
77
}
8-
9-
module.exports.parse = parse;

scanners/git-repo-scanner/parser/parser.test.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
const { readFile } = require("fs/promises");
6-
const {
7-
validateParser,
8-
} = require("@securecodebox/parser-sdk-nodejs/parser-utils");
5+
import { readFile } from "fs/promises";
6+
import { validateParser } from "@securecodebox/parser-sdk-nodejs/parser-utils";
97

10-
const { parse } = require("./parser");
8+
import { parse } from "./parser";
119

1210
test("should properly parse empty json file", async () => {
1311
const fileContent = await readFile(

0 commit comments

Comments
 (0)