Skip to content

Commit bbf60b8

Browse files
authored
Merge pull request github#8476 from RasmusWL/shared-concepts-scaffolding
Python/JS/Ruby: Shared concepts scaffolding
2 parents 01929d4 + 311cbb4 commit bbf60b8

File tree

7 files changed

+63
-1
lines changed

7 files changed

+63
-1
lines changed

config/identical-files.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@
519519
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/AccessPathSyntax.qll",
520520
"ruby/ql/lib/codeql/ruby/dataflow/internal/AccessPathSyntax.qll"
521521
],
522+
"Concepts Python/Ruby/JS": [
523+
"python/ql/lib/semmle/python/internal/ConceptsShared.qll",
524+
"ruby/ql/lib/codeql/ruby/internal/ConceptsShared.qll",
525+
"javascript/ql/lib/semmle/javascript/internal/ConceptsShared.qll"
526+
],
522527
"Hostname Regexp queries": [
523528
"javascript/ql/src/Security/CWE-020/HostnameRegexpShared.qll",
524529
"python/ql/src/Security/CWE-020/HostnameRegexpShared.qll",
@@ -544,4 +549,4 @@
544549
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessCustomizations.qll",
545550
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessCustomizations.qll"
546551
]
547-
}
552+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file contains imports required for the JavaScript version of `ConceptsShared.qll`.
3+
* Since they are language-specific, they can't be placed directly in that file, as it is shared between languages.
4+
*/
5+
6+
import semmle.javascript.dataflow.DataFlow::DataFlow as DataFlow
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Provides Concepts which are shared across languages.
3+
*
4+
* Each language has a language specific `Concepts.qll` file that can import the
5+
* shared concepts from this file. A language can either re-export the concept directly,
6+
* or can add additional member-predicates that are needed for that language.
7+
*
8+
* Moving forward, `Concepts.qll` will be the staging ground for brand new concepts from
9+
* each language, but we will maintain a discipline of moving those concepts to
10+
* `ConceptsShared.qll` ASAP.
11+
*/
12+
13+
private import ConceptsImports
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file contains imports required for the Python version of `ConceptsShared.qll`.
3+
* Since they are language-specific, they can't be placed directly in that file, as it is shared between languages.
4+
*/
5+
6+
import semmle.python.dataflow.new.DataFlow
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Provides Concepts which are shared across languages.
3+
*
4+
* Each language has a language specific `Concepts.qll` file that can import the
5+
* shared concepts from this file. A language can either re-export the concept directly,
6+
* or can add additional member-predicates that are needed for that language.
7+
*
8+
* Moving forward, `Concepts.qll` will be the staging ground for brand new concepts from
9+
* each language, but we will maintain a discipline of moving those concepts to
10+
* `ConceptsShared.qll` ASAP.
11+
*/
12+
13+
private import ConceptsImports
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file contains imports required for the Ruby version of `ConceptsShared.qll`.
3+
* Since they are language-specific, they can't be placed directly in that file, as it is shared between languages.
4+
*/
5+
6+
import codeql.ruby.DataFlow
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Provides Concepts which are shared across languages.
3+
*
4+
* Each language has a language specific `Concepts.qll` file that can import the
5+
* shared concepts from this file. A language can either re-export the concept directly,
6+
* or can add additional member-predicates that are needed for that language.
7+
*
8+
* Moving forward, `Concepts.qll` will be the staging ground for brand new concepts from
9+
* each language, but we will maintain a discipline of moving those concepts to
10+
* `ConceptsShared.qll` ASAP.
11+
*/
12+
13+
private import ConceptsImports

0 commit comments

Comments
 (0)