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

Commit c0ef675

Browse files
committed
128: Allow the user to cancel interactive mode
1 parent af23fb0 commit c0ef675

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎pyt/vulnerabilities/vulnerabilities.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,15 @@ def how_vulnerable(
336336
return VulnerabilityType.FALSE
337337
elif interactive:
338338
user_says = input(
339-
'Is the return value of {} with tainted argument "{}" vulnerable? (Y/n)'.format(
339+
'Is the return value of {} with tainted argument "{}" vulnerable? ([Y]es/[N]o/[S]top)'.format(
340340
current_node.label,
341341
chain[i - 1].left_hand_side
342342
)
343343
).lower()
344+
if user_says.startswith('s'):
345+
interactive = False
346+
vuln_deets['unknown_assignment'] = current_node
347+
return VulnerabilityType.UNKNOWN
344348
if user_says.startswith('n'):
345349
blackbox_mapping['does_not_propagate'].append(current_node.func_name)
346350
return VulnerabilityType.FALSE

0 commit comments

Comments
(0)

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