Skip to content

Commit 2c49e62

Browse files
author
Stephan Brandauer
authored
Merge branch 'main' into java/update-mad-decls-after-triage-2023-03-13T13-21-27
2 parents 0a60563 + f1fe7af commit 2c49e62

File tree

528 files changed

+9804
-4158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

528 files changed

+9804
-4158
lines changed

.github/workflows/check-change-note.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- "*/ql/src/**/*.qll"
99
- "*/ql/lib/**/*.ql"
1010
- "*/ql/lib/**/*.qll"
11+
- "*/ql/lib/**/*.yml"
1112
- "!**/experimental/**"
1213
- "!ql/**"
1314
- "!swift/**"

.github/workflows/close-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/stale@v7
15+
- uses: actions/stale@v8
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

.github/workflows/ruby-build.yml

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
run: |
4949
brew install gnu-tar
5050
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
51+
- name: Install cargo-cross
52+
if: runner.os == 'Linux'
53+
run: cargo install cross --version 0.2.1
5154
- uses: ./.github/actions/os-version
5255
id: os_version
5356
- name: Cache entire extractor
@@ -78,8 +81,13 @@ jobs:
7881
- name: Run tests
7982
if: steps.cache-extractor.outputs.cache-hit != 'true'
8083
run: cd extractor && cargo test --verbose
81-
- name: Release build
82-
if: steps.cache-extractor.outputs.cache-hit != 'true'
84+
# On linux, build the extractor via cross in a centos7 container.
85+
# This ensures we don't depend on glibc > 2.17.
86+
- name: Release build (linux)
87+
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os == 'Linux'
88+
run: cd extractor && cross build --release
89+
- name: Release build (windows and macos)
90+
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
8391
run: cd extractor && cargo build --release
8492
- name: Generate dbscheme
8593
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
@@ -227,3 +235,54 @@ jobs:
227235
shell: bash
228236
run: |
229237
codeql database analyze --search-path "${{ runner.temp }}/ruby-bundle" --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls
238+
239+
# This is a copy of the 'test' job that runs in a centos7 container.
240+
# This tests that the extractor works correctly on systems with an old glibc.
241+
test-centos7:
242+
defaults:
243+
run:
244+
working-directory: ${{ github.workspace }}
245+
strategy:
246+
fail-fast: false
247+
runs-on: ubuntu-latest
248+
container:
249+
image: centos:centos7
250+
env:
251+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252+
needs: [package]
253+
steps:
254+
- name: Install gh cli
255+
run: |
256+
yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
257+
# fetch-codeql requires unzip and jq
258+
# jq is available in epel-release (https://docs.fedoraproject.org/en-US/epel/)
259+
yum install -y gh unzip epel-release
260+
yum install -y jq
261+
- uses: actions/checkout@v3
262+
- name: Fetch CodeQL
263+
uses: ./.github/actions/fetch-codeql
264+
265+
# Due to a bug in Actions, we can't use runner.temp in the run blocks here.
266+
# https://github.com/actions/runner/issues/2185
267+
268+
- name: Download Ruby bundle
269+
uses: actions/download-artifact@v3
270+
with:
271+
name: codeql-ruby-bundle
272+
path: ${{ runner.temp }}
273+
- name: Unzip Ruby bundle
274+
shell: bash
275+
run: unzip -q -d "$RUNNER_TEMP"/ruby-bundle "$RUNNER_TEMP"/codeql-ruby-bundle.zip
276+
277+
- name: Run QL test
278+
shell: bash
279+
run: |
280+
codeql test run --search-path "$RUNNER_TEMP"/ruby-bundle --additional-packs "$RUNNER_TEMP"/ruby-bundle ruby/ql/test/library-tests/ast/constants/
281+
- name: Create database
282+
shell: bash
283+
run: |
284+
codeql database create --search-path "$RUNNER_TEMP"/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
285+
- name: Analyze database
286+
shell: bash
287+
run: |
288+
codeql database analyze --search-path "$RUNNER_TEMP"/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls

cpp/ql/lib/CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
## 0.6.0
2+
3+
### Breaking Changes
4+
5+
* The `semmle.code.cpp.commons.Buffer` and `semmle.code.cpp.commons.NullTermination` libraries no longer expose `semmle.code.cpp.dataflow.DataFlow`. Please import `semmle.code.cpp.dataflow.DataFlow` directly.
6+
7+
### Deprecated APIs
8+
9+
* The `WriteConfig` taint tracking configuration has been deprecated. Please use `WriteFlow`.
10+
11+
### New Features
12+
13+
* Added support for merging two `PathGraph`s via disjoint union to allow results from multiple data flow computations in a single `path-problem` query.
14+
15+
### Major Analysis Improvements
16+
17+
* A new C/C++ dataflow library (`semmle.code.cpp.dataflow.new.DataFlow`) has been added.
18+
The new library behaves much more like the dataflow library of other CodeQL supported
19+
languages by following use-use dataflow paths instead of def-use dataflow paths.
20+
The new library also better supports dataflow through indirections, and new predicates
21+
such as `Node::asIndirectExpr` have been added to facilitate working with indirections.
22+
23+
The `semmle.code.cpp.ir.dataflow.DataFlow` library is now identical to the new
24+
`semmle.code.cpp.dataflow.new.DataFlow` library.
25+
* The main data flow and taint tracking APIs have been changed. The old APIs
26+
remain in place for now and translate to the new through a
27+
backwards-compatible wrapper. If multiple configurations are in scope
28+
simultaneously, then this may affect results slightly. The new API is quite
29+
similar to the old, but makes use of a configuration module instead of a
30+
configuration class.
31+
32+
### Minor Analysis Improvements
33+
34+
* Deleted the deprecated `hasGeneratedCopyConstructor` and `hasGeneratedCopyAssignmentOperator` predicates from the `Folder` class.
35+
* Deleted the deprecated `getPath` and `getFolder` predicates from the `XmlFile` class.
36+
* Deleted the deprecated `getMustlockFunction`, `getTrylockFunction`, `getLockFunction`, and `getUnlockFunction` predicates from the `MutexType` class.
37+
* Deleted the deprecated `getPosInBasicBlock` predicate from the `SubBasicBlock` class.
38+
* Deleted the deprecated `getExpr` predicate from the `PointerDereferenceExpr` class.
39+
* Deleted the deprecated `getUseInstruction` and `getDefinitionInstruction` predicates from the `Operand` class.
40+
* Deleted the deprecated `isInParameter`, `isInParameterPointer`, and `isInQualifier` predicates from the `FunctionInput` class.
41+
* Deleted the deprecated `isOutParameterPointer`, `isOutQualifier`, `isOutReturnValue`, and `isOutReturnPointer` predicate from the `FunctionOutput` class.
42+
* Deleted the deprecated 3-argument `isGuardPhi` predicate from the `RangeSsaDefinition` class.
43+
144
## 0.5.4
245

346
No user-facing changes.

cpp/ql/lib/change-notes/2023-02-10-buffer-and-nill-termination-dataflow.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-03-02-dataflow-conf-module.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-03-03-delete-deps.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-03-08-deprecated-dataflow-configurations.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-03-13-mergepathgraph.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-03-16-use-use-flow.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)