Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Deterministic file loading and vulnerability order #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
KevinHock merged 2 commits into python-security:master from bcaller:determinism
Aug 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions pyt/__main__.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ def main(command_line_args=sys.argv[1:]): # noqa: C901

nosec_lines = defaultdict(set)

for path in files:
if args.project_root:
directory = os.path.normpath(args.project_root)
project_modules = get_modules(directory, prepend_module_root=args.prepend_module_root)

for path in sorted(files):
Copy link
Collaborator

@KevinHock KevinHock Aug 14, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a great idea I don't think I would have ever thought of 😁

if not args.ignore_nosec:
nosec_lines[path] = retrieve_nosec_lines(path)

if args.project_root:
directory = os.path.normpath(args.project_root)
else:
if not args.project_root:
directory = os.path.dirname(path)
project_modules = get_modules(directory, prepend_module_root=args.prepend_module_root)
project_modules = get_modules(directory, prepend_module_root=args.prepend_module_root)

local_modules = get_directory_modules(directory)
tree = generate_ast(path)

Expand Down

AltStyle によって変換されたページ (->オリジナル) /