Skip to content

Commit a11fa26

Browse files
committed
fix: path traversal issue
1 parent e5ff007 commit a11fa26

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/lint-code.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ if (filePath.includes("..")) {
4747
)
4848
process.exit(1)
4949
}
50-
const results = JSON.parse(
51-
fs.readFileSync(process.argv[2], "utf8"),
52-
) as ESLintEntry[]
50+
const results = JSON.parse(fs.readFileSync(filePath, "utf8")) as ESLintEntry[]
5351
const fatalErrors = results.filter((e) => e.fatalErrorCount > 0)
5452
const errors = results.filter((e) => e.errorCount > 0)
5553
const warnings = results.filter((e) => e.warningCount > 0)

0 commit comments

Comments
 (0)