@@ -10,18 +10,15 @@ import javascript
1010module CorsPermissiveConfiguration {
1111 private newtype TFlowState =
1212 TTaint ( ) or
13- TTrueOrNull ( ) or
14- TWildcard ( )
13+ TPermissive ( )
1514
16- /** A flow state to asociate with a tracked value. */
15+ /** A flow state to associate with a tracked value. */
1716 class FlowState extends TFlowState {
1817 /** Gets a string representation of this flow state. */
1918 string toString ( ) {
2019 this = TTaint ( ) and result = "taint"
2120 or
22- this = TTrueOrNull ( ) and result = "true-or-null"
23- or
24- this = TWildcard ( ) and result = "wildcard"
21+ this = TPermissive ( ) and result = "permissive"
2522 }
2623 }
2724
@@ -30,11 +27,8 @@ module CorsPermissiveConfiguration {
3027 /** A tainted value. */
3128 FlowState taint ( ) { result = TTaint ( ) }
3229
33- /** A `true` or `null` value. */
34- FlowState trueOrNull ( ) { result = TTrueOrNull ( ) }
35-
36- /** A `"*"` value. */
37- FlowState wildcard ( ) { result = TWildcard ( ) }
30+ /** A permissive value (true, null, or "*"). */
31+ FlowState permissive ( ) { result = TPermissive ( ) }
3832 }
3933
4034 /**
@@ -59,14 +53,13 @@ module CorsPermissiveConfiguration {
5953 ActiveThreatModelSourceAsSource ( ) { not this instanceof ClientSideRemoteFlowSource }
6054 }
6155
62- /** An overly permissive value for `origin` (Apollo) */
63- class TrueNullValue extends Source {
64- TrueNullValue ( ) { this .mayHaveBooleanValue ( true ) or this .asExpr ( ) instanceof NullLiteral }
65- }
66-
67- /** An overly permissive value for `origin` (Express) */
68- class WildcardValue extends Source {
69- WildcardValue ( ) { this .mayHaveStringValue ( "*" ) }
56+ /** An overly permissive value for `origin` configuration. */
57+ class PermissiveValue extends Source {
58+ PermissiveValue ( ) {
59+ this .mayHaveBooleanValue ( true ) or
60+ this .asExpr ( ) instanceof NullLiteral or
61+ this .mayHaveStringValue ( "*" )
62+ }
7063 }
7164
7265 /**
0 commit comments