File tree Expand file tree Collapse file tree
python/ql/src/experimental/semmle/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,6 +371,39 @@ class HeaderDeclaration extends DataFlow::Node {
371371 DataFlow:: Node getValueArg ( ) { result = range .getValueArg ( ) }
372372}
373373
374+ /** Provides classes for modeling HTTP Header APIs. */
375+ module HeaderCollection {
376+ /**
377+ * A data-flow node that collects functions getting HTTP Headers.
378+ *
379+ * Extend this class to model new APIs. If you want to refine existing API models,
380+ * extend `HeaderCollection` instead.
381+ */
382+ abstract class Range extends DataFlow:: Node {
383+ /**
384+ * Gets the argument containing the header name.
385+ */
386+ abstract DataFlow:: Node getNameArg ( ) ;
387+ }
388+ }
389+
390+ /**
391+ * A data-flow node that collects functions getting HTTP Headers.
392+ *
393+ * Extend this class to refine existing API models. If you want to model new APIs,
394+ * extend `HeaderCollection::Range` instead.
395+ */
396+ class HeaderCollection extends DataFlow:: Node {
397+ HeaderCollection:: Range range ;
398+
399+ HeaderCollection ( ) { this = range }
400+
401+ /**
402+ * Gets the argument containing the header name.
403+ */
404+ DataFlow:: Node getNameArg ( ) { result = range .getNameArg ( ) }
405+ }
406+
374407/** Provides classes for modeling Csv writer APIs. */
375408module CsvWriter {
376409 /**
You can’t perform that action at this time.
0 commit comments