mirror of
https://github.com/github/codeql.git
synced 2026-01-28 22:02:57 +01:00
There's so little in this query that it may not be worth sharing, but it's an interesting exercise in figuring out how we do it nicely.
20 lines
769 B
Plaintext
20 lines
769 B
Plaintext
/**
|
|
* Provides imports and classes needed for `HttpToFileAccessQuery` and `HttpToFileAccessCustomizations`.
|
|
*/
|
|
|
|
import javascript
|
|
import semmle.javascript.security.dataflow.RemoteFlowSources
|
|
private import HttpToFileAccessCustomizations::HttpToFileAccess
|
|
|
|
/**
|
|
* An access to a user-controlled HTTP request input, considered as a flow source for writing user-controlled data to files
|
|
*/
|
|
private class RequestInputAccessAsSource extends Source {
|
|
RequestInputAccessAsSource() { this instanceof HTTP::RequestInputAccess }
|
|
}
|
|
|
|
/** A response from a server, considered as a flow source for writing user-controlled data to files. */
|
|
private class ServerResponseAsSource extends Source {
|
|
ServerResponseAsSource() { this = any(ClientRequest r).getAResponseDataNode() }
|
|
}
|