@@ -969,6 +969,76 @@ module HTTP {
969969 abstract DataFlow:: Node getValueArg ( ) ;
970970 }
971971 }
972+
973+ /**
974+ * A data-flow node that enables or disables Cross-site request forgery protection
975+ * in a global manner.
976+ *
977+ * Extend this class to refine existing API models. If you want to model new APIs,
978+ * extend `CsrfProtectionSetting::Range` instead.
979+ */
980+ class CsrfProtectionSetting extends DataFlow:: Node instanceof CsrfProtectionSetting:: Range {
981+ /**
982+ * Gets the boolean value corresponding to if CSRF protection is enabled
983+ * (`true`) or disabled (`false`) by this node.
984+ */
985+ boolean getVerificationSetting ( ) { result = super .getVerificationSetting ( ) }
986+ }
987+
988+ /** Provides a class for modeling new CSRF protection setting APIs. */
989+ module CsrfProtectionSetting {
990+ /**
991+ * A data-flow node that enables or disables Cross-site request forgery protection
992+ * in a global manner.
993+ *
994+ * Extend this class to model new APIs. If you want to refine existing API models,
995+ * extend `CsrfProtectionSetting` instead.
996+ */
997+ abstract class Range extends DataFlow:: Node {
998+ /**
999+ * Gets the boolean value corresponding to if CSRF protection is enabled
1000+ * (`true`) or disabled (`false`) by this node.
1001+ */
1002+ abstract boolean getVerificationSetting ( ) ;
1003+ }
1004+ }
1005+
1006+ /**
1007+ * A data-flow node that enables or disables Cross-site request forgery protection
1008+ * for a specific part of an application.
1009+ *
1010+ * Extend this class to refine existing API models. If you want to model new APIs,
1011+ * extend `CsrfLocalProtectionSetting::Range` instead.
1012+ */
1013+ class CsrfLocalProtectionSetting extends DataFlow:: Node instanceof CsrfLocalProtectionSetting:: Range {
1014+ /**
1015+ * Gets a request handler whose CSRF protection is changed.
1016+ */
1017+ Function getRequestHandler ( ) { result = super .getRequestHandler ( ) }
1018+
1019+ /** Holds if CSRF protection is enabled by this setting */
1020+ predicate csrfEnabled ( ) { super .csrfEnabled ( ) }
1021+ }
1022+
1023+ /** Provides a class for modeling new CSRF protection setting APIs. */
1024+ module CsrfLocalProtectionSetting {
1025+ /**
1026+ * A data-flow node that enables or disables Cross-site request forgery protection
1027+ * for a specific part of an application.
1028+ *
1029+ * Extend this class to model new APIs. If you want to refine existing API models,
1030+ * extend `CsrfLocalProtectionSetting` instead.
1031+ */
1032+ abstract class Range extends DataFlow:: Node {
1033+ /**
1034+ * Gets a request handler whose CSRF protection is changed.
1035+ */
1036+ abstract Function getRequestHandler ( ) ;
1037+
1038+ /** Holds if CSRF protection is enabled by this setting */
1039+ abstract predicate csrfEnabled ( ) ;
1040+ }
1041+ }
9721042 }
9731043
9741044 /** Provides classes for modeling HTTP clients. */
0 commit comments