You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/static-analysis/codeql/10-advanced.md
+9-25Lines changed: 9 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,58 +51,42 @@ If you know you will write more than one query pack, we recommend creating the f
51
51
│ ├── lib
52
52
│ │ ├── qlpack.yml
53
53
│ │ └── scope
54
-
│ │ └── crypto
54
+
│ │ └── security
55
55
│ │ └── someLibrary.qll
56
56
│ ├── src
57
57
│ │ ├── qlpack.yml
58
-
│ │ ├── codeql-suites
58
+
│ │ ├── suites
59
59
│ │ │ ├── scope-cpp-code-scanning.qls
60
60
│ │ │ └── scope-cpp-security.qls
61
-
│ │ ├── crypto
62
-
│ │ │ ├── SomeCryptoAnalysis.ql
63
61
│ │ ├── security
64
-
│ │ │ ├── AppSecAnalysis
65
-
│ │ │ │ ├── AppSecAnalysis.c
66
-
│ │ │ │ ├── AppSecAnalysis.qhelp
67
-
│ │ │ │ └── AppSecAnalysis.ql
68
-
│ │ ├── docs
69
-
│ │ │ ├── crypto
70
-
│ │ │ │ ├── SomeCryptoAnalysis.md
71
-
│ │ │ └── security
72
-
│ │ │ └── AppSecAnalysis.md
62
+
│ │ │ └── AppSecAnalysis
63
+
│ │ │ ├── AppSecAnalysis.c
64
+
│ │ │ ├── AppSecAnalysis.qhelp
65
+
│ │ │ └── AppSecAnalysis.ql
73
66
│ └── test
74
67
│ ├── qlpack.yml
75
68
│ ├── include
76
69
│ │ ├── libc
77
70
│ │ │ ├── stubs.h
78
71
│ ├── library-tests
79
-
│ │ └── crypto
72
+
│ │ └── security
80
73
│ │ ├── someLibrary
74
+
│ │ │ ├── someLibrary.c
81
75
│ │ │ ├── someLibrary.expected
82
-
│ │ │ ├── someLibrary.ql
83
-
│ │ │ └── someLibrary.c
76
+
│ │ │ └── someLibrary.ql
84
77
│ └── query-tests
85
-
│ ├── crypto
86
-
│ │ ├── SomeCryptoAnalysis
87
-
│ │ │ ├── SomeCryptoAnalysis.expected
88
-
│ │ │ ├── SomeCryptoAnalysis.qlref
89
-
│ │ │ └── SomeCryptoAnalysis.c
90
78
│ └── security
91
79
│ └── AppSecAnalysis
92
80
│ ├── AppSecAnalysis.c
93
81
│ ├── AppSecAnalysis.expected
94
82
│ └── AppSecAnalysis.qlref
95
-
├── go
96
-
│ ├── src
97
83
...
98
84
```
99
85
100
86
We divide query packs per-language, but also per-type (security, cryptographic, etc.). This also follows the convention used by the GitHub query suites.
101
87
102
88
For recommendations on how to set up query unit tests, see the [Unit testing custom queries](#unit-testing-custom-queries) section.
103
89
104
-
Finally, you can use [our bash script for generating new queries](https://github.com/trailofbits/codeql-queries/tree/main/scripts/new_query.sh) when you have the structure above.
0 commit comments