Marcono1234
5a8ffa5a85
Use .inc.qhelp extension for included help files
2021-03-04 22:04:48 +01:00
Mathias Vorreiter Pedersen
0f7256752a
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.qhelp
...
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com >
2021-02-26 19:16:28 +01:00
Mathias Vorreiter Pedersen
42d2a673c7
C++: Respond to review comments.
2021-02-26 10:06:05 +01:00
Mathias Vorreiter Pedersen
faadcd913e
C++: Exclude memsets that clear a variable that has no other uses.
2021-02-25 21:27:12 +01:00
Mathias Vorreiter Pedersen
2777ca445e
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2021-02-25 19:49:58 +01:00
Mathias Vorreiter Pedersen
9e7c9d0ea0
C++: Respond to review comments. Relax the escaping requirements on the local variable being used in memset.
2021-02-25 18:22:48 +01:00
Mathias Vorreiter Pedersen
3f26b2940d
Update cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2021-02-25 15:48:48 +01:00
Mathias Vorreiter Pedersen
d33209388d
C++: Fix test annotations. Also exclude static locals from the query and add a testcase for this.
2021-02-25 13:25:11 +01:00
Mathias Vorreiter Pedersen
c44fbaaf3c
C++: Promote memset query out of experimental.
2021-02-24 18:01:41 +01:00
Geoffrey White
79338052ad
C++: Add CWE-676 tag.
2021-02-19 14:55:31 +00:00
Mathias Vorreiter Pedersen
fa44cedd38
C++: Add isBarrier to CgiXss.ql.
2021-02-16 18:58:28 +01:00
Mathias Vorreiter Pedersen
b1c7cb6396
C++: Address review comments.
2021-02-12 10:37:27 +01:00
NateD-MSFT
9470a99092
Add KeGetCurrentProcessorNumberEx to CQE-457 whitelist
...
Windows driver developers may call KeGetCurrentProcessorNumberEx in their driver. This function optionally may initialize a provided structure, but this initialization always occurs. The return value is the current processor being run on. As such, this query incorrectly marks calls to KeGetCurrentProcessorNumberEx that initialize a structure that is later used as risky, even though in reality the initialization always succeeds.
See https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-kegetcurrentprocessornumberex
2021-02-04 13:32:09 -08:00
Mathias Vorreiter Pedersen
cf0e464ab9
Merge branch 'promote-UnsignedDifferenceExpressionComparedZero' of github.com:MathiasVP/ql into promote-UnsignedDifferenceExpressionComparedZero
2021-02-04 17:24:59 +01:00
Mathias Vorreiter Pedersen
6a97d02247
C++: Address review comments.
2021-02-04 17:24:14 +01:00
Mathias Vorreiter Pedersen
161e5679a7
Apply suggestions from code review
...
Co-authored-by: hubwriter <hubwriter@github.com >
2021-02-04 16:47:45 +01:00
Mathias Vorreiter Pedersen
707f532e10
C++: Fix bad join-order using a poor man's unbind operator.
2021-02-04 16:11:34 +01:00
Mathias Vorreiter Pedersen
fd596ebbbb
C++: Move cpp/unsigned-difference-expression-compared-zero out of experimental.
2021-02-04 16:10:34 +01:00
Geoffrey White
b5bcbd303e
C++: Cleaner solution.
2021-01-06 18:22:31 +00:00
Geoffrey White
18890c4a77
C++: Use isAdditionalBarrier in the SqlTainted query.
2021-01-05 11:33:39 +00:00
Mathias Vorreiter Pedersen
f4f96fe257
C++: Use isSource in queries. These were the only queries that restrict the source after dataflow terminates.
2020-12-21 16:35:35 +01:00
Geoffrey White
998eaf90ee
C++: Run through updated autoformat.
2020-12-04 18:53:24 +00:00
Geoffrey White
13d9d5dc45
C++: Use [,] more in general.
2020-12-03 18:50:43 +00:00
Anders Schack-Mulligen
8f2094f0bf
Autoformat.
2020-11-30 14:42:38 +01:00
Mathias Vorreiter Pedersen
b02ac7f523
C++: Use SideEffectFunction (instead of ArrayFunction) to define DefaultSafeExternalAPIFunction.
2020-11-26 11:02:47 +01:00
Mathias Vorreiter Pedersen
7730f5dfcf
C++: Use model interfaces in SafeExternalAPIFunction and make the three previosuly-used implementation models private.
2020-11-25 18:20:55 +01:00
Geoffrey White
8184f76d1f
C++: Sync identical files.
2020-11-24 16:29:14 +00:00
Geoffrey White
7015a9cf53
C++: Un-private a few classes that are now used by the current DefaultSafeExternalAPIFunction implementation.
2020-11-23 14:47:22 +00:00
Mathias Vorreiter Pedersen
715f233360
C++: Add a new model class describing pure memory functions, and use this new model in DefaultSafeExternalAPIFunction.
2020-11-18 12:47:33 +01:00
Mathias Vorreiter Pedersen
09c5caa3bd
C++: Move ExternalAPI files into query directory to prevent out-of-tree use.
2020-11-18 10:18:03 +01:00
Mathias Vorreiter Pedersen
f16591dffc
C++: Respond to qhelp review comments.
2020-11-18 09:18:14 +01:00
Mathias Vorreiter Pedersen
52bbb326ca
QLDoc: Wrap lines and disambiguate explanation.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
d93d3c8699
C++: Use the getSourceType predicate on RemoteFlowSources for better alert messages.
2020-11-17 16:23:27 +01:00
Mathias Vorreiter Pedersen
dea16d4d62
QLDoc/C++: Rename {IR}ExternalAPIsUsedWithUntrustedData to {IR}CountUntrustedDataToExternalAPI
2020-11-17 16:23:13 +01:00
Mathias Vorreiter Pedersen
c37093f4bc
C++: Add copies of qhelp files for IR.
2020-11-17 12:28:31 +01:00
Mathias Vorreiter Pedersen
3b8580efaf
C++: Add qhelp and example files (modeled after the Java examples).
2020-11-17 12:27:53 +01:00
Mathias Vorreiter Pedersen
5ad18eb748
C++: Add ExternalAPI query files (for AST and IR).
2020-11-17 12:27:40 +01:00
Mathias Vorreiter Pedersen
d0dd71ba10
Apply suggestions from code review
...
Co-authored-by: hubwriter <54933897+hubwriter@users.noreply.github.com >
2020-10-22 12:53:35 +02:00
Mathias Vorreiter Pedersen
056a553976
C++: Fix broken qhelp links
2020-10-21 17:26:46 +02:00
Geoffrey White
493b80c44d
C++: Fix incorrect translations to hasQualifiedName.
2020-10-08 17:56:57 +01:00
Geoffrey White
d93b37d5c5
C++: Autoformat some more files.
2020-10-05 15:11:23 +01:00
Geoffrey White
3536d84bdf
C++: Use [, ...] syntax more widely.
2020-10-02 18:04:03 +01:00
Chris Smowton
578ea1ae43
Fix OWASP broken links
2020-10-01 13:09:52 +01:00
Geoffrey White
3d60756d40
C++: Downgrade the query precision.
2020-08-13 15:45:57 +01:00
Geoffrey White
fc69c16ba6
C++: Deprecate some old terminology.
2020-06-29 18:03:16 +01:00
Jonas Jensen
e0ba23d2c7
C++: @precision high for tainted-format-string*
...
I think these queries have excellent results on lgtm.com. Many of the
results come from projects that use `sprintf` like it's a templating
engine, trusting that values from `argv` or `getenv` contain the correct
number of `%s`. I think we want to flag that.
The structure of the change note is modeled after 91af51cf46 .
2020-06-17 09:03:13 +02:00
Geoffrey White
9b4884dfaf
C++: Backticks.
2020-05-01 14:26:34 +01:00
Shati Patel
5c80cd5032
Merge branch 'rc/1.24' into mergeback
2020-04-29 08:05:53 +01:00
Jonas Jensen
718f4cd3f9
C++: Speed up SuspiciousAddWithSizeof select
...
This `select` clause had become very slow after we started caching
`ElementBase::toString` because the query used string concatenation to
produce alert messages, and those string concatenations were done very
early in the pipeline, producing lots of strings that would be discarded
moments later.
By using `$@` to interpolate elements into strings, the concatenation is
done outside of QL.
Testing on a Chromium snapshot, this commit takes us from
#select#ff ................ 6m2s
to
#select#cpe#134#fff ....... 15.2s
2020-04-24 16:18:18 +02:00
Jonas Jensen
c970e8a52e
Merge remote-tracking branch 'upstream/rc/1.24' into mergeback-2020-04-17
2020-04-17 10:42:27 +02:00