codeql-development-mcp-server 2.25.1 → 2.25.2-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @name Print CFG for rust
3
+ * @description Produces a representation of a file's Control Flow Graph for specified source files.
4
+ * @id rust/tools/print-cfg
5
+ * @kind graph
6
+ * @tags cfg
7
+ */
8
+
9
+ import rust
10
+ import codeql.rust.controlflow.ControlFlowGraph
11
+ import ExternalPredicates
12
+
13
+ /**
14
+ * Gets a single source file from the comma-separated list.
15
+ */
16
+ string getSelectedSourceFile() {
17
+ exists(string s | selectedSourceFiles(s) | result = s.splitAt(",").trim())
18
+ }
19
+
20
+ /**
21
+ * Gets a file by matching against the selected source file paths.
22
+ */
23
+ File getSelectedFile() {
24
+ exists(string selectedFile |
25
+ selectedFile = getSelectedSourceFile() and
26
+ (
27
+ // Match by exact relative path from source root
28
+ result.getRelativePath() = selectedFile
29
+ or
30
+ // Match by file name if no path separators
31
+ not selectedFile.matches("%/%") and result.getBaseName() = selectedFile
32
+ or
33
+ // Match by ending path component
34
+ result.getAbsolutePath().suffix(result.getAbsolutePath().length() - selectedFile.length()) =
35
+ selectedFile
36
+ )
37
+ )
38
+ }
39
+
40
+ /**
41
+ * Holds if this CFG node should be included in output.
42
+ */
43
+ predicate shouldPrintNode(CfgNode node) { node.getLocation().getFile() = getSelectedFile() }
44
+
45
+ /**
46
+ * Configuration for PrintCFG that outputs filtered CFG nodes and edges.
47
+ */
48
+ query predicate nodes(CfgNode node, string property, string value) {
49
+ shouldPrintNode(node) and
50
+ property = "semmle.label" and
51
+ value = node.toString()
52
+ }
53
+
54
+ query predicate edges(CfgNode pred, CfgNode succ) {
55
+ shouldPrintNode(pred) and
56
+ shouldPrintNode(succ) and
57
+ pred.getASuccessor() = succ
58
+ }
@@ -0,0 +1,28 @@
1
+ ---
2
+ lockVersion: 1.0.0
3
+ dependencies:
4
+ codeql/concepts:
5
+ version: 0.0.20
6
+ codeql/controlflow:
7
+ version: 2.0.30
8
+ codeql/dataflow:
9
+ version: 2.1.2
10
+ codeql/mad:
11
+ version: 1.0.46
12
+ codeql/regex:
13
+ version: 1.0.46
14
+ codeql/rust-all:
15
+ version: 0.2.10
16
+ codeql/ssa:
17
+ version: 2.0.22
18
+ codeql/threat-models:
19
+ version: 1.0.46
20
+ codeql/tutorial:
21
+ version: 1.0.46
22
+ codeql/typeinference:
23
+ version: 0.0.27
24
+ codeql/typetracking:
25
+ version: 2.0.30
26
+ codeql/util:
27
+ version: 2.0.33
28
+ compiled: false
@@ -0,0 +1,6 @@
1
+ name: advanced-security/ql-mcp-rust-tools-src
2
+ version: 2.25.2-next.1
3
+ description: 'Queries for codeql-development-mcp-server tools for rust language'
4
+ library: false
5
+ dependencies:
6
+ codeql/rust-all: 0.2.10
@@ -1,5 +1,5 @@
1
1
  name: advanced-security/ql-mcp-swift-tools-src
2
- version: 2.25.1
2
+ version: 2.25.2-next.1
3
3
  description: 'Queries for codeql-development-mcp-server tools for swift language'
4
4
  library: false
5
5
  dependencies:
@@ -31,7 +31,7 @@ Install CodeQL pack dependencies for bundled tool query packs.
31
31
 
32
32
  OPTIONS:
33
33
  --language <lang> Install packs only for the specified language
34
- Valid values: actions, cpp, csharp, go, java, javascript, python, ruby, swift
34
+ Valid values: actions, cpp, csharp, go, java, javascript, python, ruby, rust, swift
35
35
  -h, --help Show this help message
36
36
 
37
37
  By default, installs pack dependencies for all supported languages.
@@ -62,7 +62,7 @@ while [[ $# -gt 0 ]]; do
62
62
  done
63
63
 
64
64
  ## Validate language if provided
65
- VALID_LANGUAGES=("actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "swift")
65
+ VALID_LANGUAGES=("actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "rust" "swift")
66
66
  if [ -n "${LANGUAGE}" ]; then
67
67
  LANGUAGE_VALID=false
68
68
  for valid_lang in "${VALID_LANGUAGES[@]}"; do