Commit Graph

60 Commits

Author SHA1 Message Date
Henning Makholm
7bc68c4302 Adapt Go tests to codeql test
These changes make the tests work with the coming `codeql test` support.

The `queries.xml` file defines which extractor the `codeql test`
runner will use to extract databases for the tests. In the future one
will be able to write this information in `qlpack.yml`, but we can't
do that immediately because the _existing_ CodeQL tooling would refuse
to parse a `qlpack.yml` that has the new field in it.
2019-12-06 18:27:47 +01:00
Sauyon Lee
2fc9e37655 Merge pull request #199 from max/notype-test
Add test for handling of expressions without extracted type.
2019-12-06 01:59:32 -08:00
Max Schaefer
594824f19c Add test for handling of expressions without extracted type. 2019-12-06 09:21:55 +00:00
Max Schaefer
47f449cc0c Merge remote-tracking branch 'external/master' 2019-12-06 09:04:16 +00:00
Max Schaefer
80e7376189 Merge pull request #198 from sauyon/hardcoded-cred-fix
HardcodedCredentials: Exclude passwords that include '0123456789'
2019-12-06 09:02:17 +00:00
Max Schaefer
6bda80a47b Merge pull request #197 from Semmle/rc/1.23
Merge rc/1.23 into master
2019-12-06 09:01:18 +00:00
Sauyon Lee
2de7c6f5fc HardcodedCredentials: Exclude passwords that include '0123456789' 2019-12-05 15:37:50 -08:00
Sauyon Lee
eb639c6cf7 Merge pull request #196 from max/no-type
Make `Expr.getType()` robust against incomplete `type_of` table.
2019-12-05 14:31:48 -08:00
Max Schaefer
8364ba3d38 Make Expr.getType() robust against incomplete type_of table. 2019-12-05 17:05:02 +00:00
Sauyon Lee
94ed3ef979 Merge pull request #13 from github/fix-dead-store
Fix a dead assignment.
2019-12-02 10:48:55 -08:00
Max Schaefer
ce6d031ce9 Update .lgtm.yml to classify examples. 2019-12-02 12:04:28 +00:00
Shati Patel
e4346a17de Merge pull request #195 from max/impossible-interface-nil-check
Add new query ImpossibleInterfaceNilCheck
2019-11-27 11:15:05 +00:00
Max Schaefer
ba54cde86e Add two references. 2019-11-27 10:47:42 +00:00
Max Schaefer
e5a12e9738 Add new query ImpossibleInterfaceNilCheck. 2019-11-26 20:28:53 +00:00
Max Schaefer
f4a24b0353 Improve type information for tuple elements.
We would previously rely on the type information of the target variable into which the element is stored, but that could be a more general type.

For example, in the assignment

```go
x, y := f()
```

the type of `x` might be an interface while the type of `f()[0]` is a concrete type implementing that interface.
2019-11-26 16:19:17 +00:00
Sauyon Lee
1d21347578 Merge pull request #194 from max/field-write-through-embedded-pointer
Fix DeadStoreOfField false positive.
2019-11-25 13:14:24 -08:00
Max Schaefer
ee723d8a4f Fix DeadStoreOfField false positive.
We should look into properly desugaring embedded types in the IR, but for now this workaround should suffice.
2019-11-25 20:21:16 +00:00
Sauyon Lee
2c921d9418 Merge pull request #193 from max/header-xss
Don't flag header injection as XSS.
2019-11-25 11:56:54 -08:00
Sauyon Lee
61c2478541 Merge pull request #12 from github/rc/1.23
Merge rc/1.23 into master
2019-11-25 09:20:17 -08:00
Max Schaefer
8bd45593e0 Merge pull request #11 from github/1.23/SD-4095-finalize-change-notes-go
1.23: SD-4095 Minor text changes to analysis change notes
2019-11-25 15:56:17 +00:00
Felicity Chapman
de2c7d8884 Minor text changes 2019-11-25 15:48:58 +00:00
Max Schaefer
adf9764085 Don't flag header injection as XSS.
All results I have seen from this are uninteresting.
2019-11-25 15:06:53 +00:00
Shati Patel
b21e4404b5 Merge pull request #192 from max/constant-length-comparison
Add new query ConstantLengthComparison.
2019-11-25 11:07:58 +00:00
Max Schaefer
db4e6789bb Address doc review comment.
Co-Authored-By: Shati Patel <shati@semmle.com>
2019-11-25 10:44:41 +00:00
Max Schaefer
e16a81cba9 Apply review suggestions. 2019-11-25 09:15:57 +00:00
Max Schaefer
cdb843516a Introduce DataFlow::Node.getBasicBlock() and use it. 2019-11-25 09:14:15 +00:00
Max Schaefer
1ff032d11e Add new query ConstantLengthComparison. 2019-11-22 20:55:14 +00:00
Max Schaefer
26a656b838 Merge pull request #189 from sauyon/use-taint-split
Use split taint predicates to emulate taint
2019-11-22 17:51:09 +00:00
Sauyon Lee
50b48e1c9e Merge pull request #191 from max/isEmptyInterfaceNoInline
Mark `isEmptyInterface` as `noinline`.
2019-11-22 09:45:06 -08:00
Max Schaefer
e367a48f6e Mark isEmptyInterface as noinline. 2019-11-22 09:19:34 +00:00
Sauyon Lee
4ea45dbf34 Use data-flow API in stringConcatStep 2019-11-21 23:48:23 -08:00
Sauyon Lee
9651a0bfc4 Use the split taint predicate to emulate taint where required
In particular, the OpenUrlRedirect and CleartextLogging queries, which both have taint flow into
an object when one of its fields is written.
2019-11-21 22:58:36 -08:00
Sauyon Lee
c0730fe4cc Make taintStep public 2019-11-21 22:58:25 -08:00
Sauyon Lee
73922e98d7 Merge pull request #188 from Semmle/rc/1.23
Merge rc/1.23 into master
2019-11-21 22:52:12 -08:00
Max Schaefer
228e95a646 Merge pull request #185 from sauyon/open-redirect-fp1
OpenRedirect: treat assignments to Url.Path as a barrier
2019-11-21 16:51:16 +00:00
Sauyon Lee
81ba71e47b Address review comments 2019-11-21 08:29:01 -08:00
Shati Patel
d8c6361312 Merge pull request #187 from max/rc/1.23
Add change notes for 1.23.
2019-11-21 16:07:21 +00:00
Max Schaefer
7136713a5f Add change notes for 1.23. 2019-11-21 15:50:40 +00:00
Max Schaefer
a54d30c053 Merge pull request #186 from sauyon/taint-split
Split taintStep into many predicates
2019-11-20 20:39:27 +00:00
Sauyon Lee
3f437612e1 Add qldoc to all taint step predicates. 2019-11-20 11:27:24 -08:00
Sauyon Lee
1092fe5870 Move SsaWithFields to the Ssa file and rework it for public use
Also use it in OpenRedirect
2019-11-20 11:20:55 -08:00
Sauyon Lee
4c9bf2265e OpenRedirect: treat assignments to Url.Path as a barrier 2019-11-20 11:20:54 -08:00
Max Schaefer
215fe26a73 Fix a dead assignment. 2019-11-20 10:28:12 +00:00
Max Schaefer
f94ce88ea4 Add .lgtm.yml to classify tests. 2019-11-20 10:24:54 +00:00
Sauyon Lee
09865a5f5c Add a field read taint step 2019-11-18 23:58:01 -08:00
Sauyon Lee
e0c589060a Split taintStep into many predicates 2019-11-18 23:58:00 -08:00
Max Schaefer
8cc60ba543 Add more codeql metadata files. 2019-11-14 10:35:21 +00:00
Sauyon Lee
eda858eafb Merge pull request #184 from max/cleartext-logging-constant
Teach `CleartextLogging` not to flag constant sources.
2019-11-14 01:21:04 -05:00
Max Schaefer
616d78e2a5 Teach CleartextLogging not to flag constant sources. 2019-11-13 14:25:32 +00:00
Max Schaefer
50cde34878 Merge pull request #181 from sauyon/hardcoded-sensitive
HardcodedCredentials: Use SensitiveActions
2019-11-13 09:21:45 +00:00