@@ -71,44 +71,41 @@ module FileSystemAccess {
7171 }
7272}
7373
74- /**
75- * A data-flow node that performs path normlization. This is often needed in oder
76- * to safely access paths.
77- */
78- class PathNormalization extends DataFlow:: Node {
79- PathNormalization:: Range range ;
80-
81- PathNormalization ( ) { this = range }
82- }
83-
84- /** Provides a class for modeling new path normalization APIs. */
85- module PathNormalization {
74+ /** Provides classes for modeling path-related APIs. */
75+ module Path {
8676 /**
8777 * A data-flow node that performs path normlization. This is often needed in oder
8878 * to safely access paths.
8979 */
90- abstract class Range extends DataFlow:: Node { }
91- }
80+ class PathNormalization extends DataFlow:: Node {
81+ PathNormalization :: Range range ;
9282
93- /**
94- * A data-flow node that checks validates a path, for instance checking that it exists
95- * or that it is safe to access.
96- */
97- class PathCheck extends DataFlow:: BarrierGuard {
98- PathCheck:: Range range ;
83+ PathNormalization ( ) { this = range }
84+ }
9985
100- PathCheck ( ) { this = range }
86+ /** Provides a class for modeling new path normalization APIs. */
87+ module PathNormalization {
88+ /**
89+ * A data-flow node that performs path normlization. This is often needed in oder
90+ * to safely access paths.
91+ */
92+ abstract class Range extends DataFlow:: Node { }
93+ }
10194
102- override predicate checks ( ControlFlowNode node , boolean branch ) { range .checks ( node , branch ) }
103- }
95+ /** A data-flow node that checks that a path is safe to access. */
96+ class SafeAccessCheck extends DataFlow:: BarrierGuard {
97+ SafeAccessCheck:: Range range ;
10498
105- /** Provides a class for modeling new path normalization APIs. */
106- module PathCheck {
107- /**
108- * A data-flow node that checks validates a path, for instance checking that it exists
109- * or that it is safe to access.
110- */
111- abstract class Range extends DataFlow:: BarrierGuard { }
99+ SafeAccessCheck ( ) { this = range }
100+
101+ override predicate checks ( ControlFlowNode node , boolean branch ) { range .checks ( node , branch ) }
102+ }
103+
104+ /** Provides a class for modeling new path safety checks. */
105+ module SafeAccessCheck {
106+ /** A data-flow node that checks that a path is safe to access. */
107+ abstract class Range extends DataFlow:: BarrierGuard { }
108+ }
112109}
113110
114111/**
0 commit comments