Skip to content

Commit fe058b0

Browse files
bcallerBen Caller
authored andcommitted
Deterministic file loading and vulnerability order
os.walk is not deterministic (though often on the same computer it will walk in the same order). This means that the vulnerabilities appear in different orders on different machines, making it hard to compare output. Process files in alphabetical order.
1 parent 7e7b9f1 commit fe058b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyt/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def main(command_line_args=sys.argv[1:]): # noqa: C901
7979

8080
nosec_lines = defaultdict(set)
8181

82-
for path in files:
82+
for path in sorted(files):
8383
if not args.ignore_nosec:
8484
nosec_lines[path] = retrieve_nosec_lines(path)
8585

0 commit comments

Comments
 (0)