Skip to content

Commit

Permalink
#1: Create a CodeQL query pack
Browse files Browse the repository at this point in the history
#3: Implement a CodeQL rule for insecure CORS HTTP origin
#4: Implement a CodeQL rule for CORS misconfigurations that allow wildcard origins
#5: Implement a CodeQL rule for insecure HTTP server connections

* Added query pack.
* Added CodeQL queries for CORS misconfigurations and insecure HTTP connections.
  • Loading branch information
carlspring committed Jun 9, 2023
1 parent 2cca08a commit 3ca0e58
Show file tree
Hide file tree
Showing 879 changed files with 197,500 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: "Vert.X CodeQL config"
queries:
- name: Run Vert.X queries
uses: ./vertx-codeql-queries

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Contains customizations to the standard library.
*
* This module is imported by `java.qll`, so any customizations defined here automatically
* apply to all queries.
*
* Typical examples of customizations include adding new subclasses of abstract classes such as
* the `RemoteFlowSource` and `AdditionalTaintStep` classes associated with the security queries
* to model frameworks that are not covered by the standard library.
*/

import java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Provides shared predicates related to contextual queries in the code viewer.
*/

import semmle.files.FileSystem

/**
* Returns the `File` matching the given source file name as encoded by the VS
* Code extension.
*/
cached
File getFileBySourceArchiveName(string name) {
// The name provided for a file in the source archive by the VS Code extension
// has some differences from the absolute path in the database:
// 1. colons are replaced by underscores
// 2. there's a leading slash, even for Windows paths: "C:/foo/bar" ->
// "/C_/foo/bar"
// 3. double slashes in UNC prefixes are replaced with a single slash
// We can handle 2 and 3 together by unconditionally adding a leading slash
// before replacing double slashes.
name = ("/" + result.getAbsolutePath().replaceAll(":", "_")).replaceAll("//", "/")
}
Loading

0 comments on commit 3ca0e58

Please sign in to comment.