Skip to content

Commit 0ac3e5c

Browse files
committed
Merge QL for QL into github/codeql
2 parents 8d91ba2 + 9363d64 commit 0ac3e5c

File tree

28,336 files changed

+2615843
-0
lines changed

Some content is hidden

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

28,336 files changed

+2615843
-0
lines changed

.codeqlmanifest.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"provide": [
3+
"*/ql/src/qlpack.yml",
4+
"*/ql/lib/qlpack.yml",
5+
"*/ql/test/qlpack.yml",
6+
"*/ql/examples/qlpack.yml",
7+
"*/upgrades/qlpack.yml",
8+
"cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml",
9+
"javascript/ql/experimental/adaptivethreatmodeling/lib/qlpack.yml",
10+
"javascript/ql/experimental/adaptivethreatmodeling/src/qlpack.yml",
11+
"misc/legacy-support/*/qlpack.yml",
12+
"misc/suite-helpers/qlpack.yml",
13+
"ruby/extractor-pack/codeql-extractor.yml",
14+
"ruby/ql/consistency-queries/qlpack.yml"
15+
],
16+
"versionPolicies": {
17+
"default": {
18+
"requireChangeNotes": true,
19+
"committedPrereleaseSuffix": "dev",
20+
"committedVersion": "nextPatchRelease"
21+
}
22+
}
23+
}

.devcontainer/devcontainer.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extensions": [
3+
"rust-lang.rust",
4+
"bungcip.better-toml",
5+
"github.vscode-codeql",
6+
"slevesque.vscode-zipexplorer"
7+
],
8+
"settings": {
9+
"files.watcherExclude": {
10+
"**/target/**": true
11+
},
12+
"codeQL.runningQueries.memory": 2048
13+
}
14+
}

.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*]
2+
end_of_line = lf

.gitattributes

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Text files will be normalized to LF line endings in the Git database, and will keep those LF line
2+
# endings in the working tree even on Windows. If you make changes below, you should renormalize the
3+
# affected files by running the following from the root of this repo (requires Git 2.16 or greater):
4+
#
5+
# git add --renormalize .
6+
# git status [just to show what files were renormalized]
7+
# git commit -m "Normalize line endings"
8+
9+
# Anything Git auto-detects as text gets normalized and checked out as LF
10+
* text=auto eol=lf
11+
12+
# Explicitly set a bunch of known extensions to text, in case auto detection gets confused.
13+
*.ql text
14+
*.qll text
15+
*.qlref text
16+
*.dbscheme text
17+
*.qhelp text
18+
*.html text
19+
*.htm text
20+
*.xhtml text
21+
*.xhtm text
22+
*.js text
23+
*.mjs text
24+
*.ts text
25+
*.json text
26+
*.yml text
27+
*.yaml text
28+
*.c text
29+
*.cpp text
30+
*.h text
31+
*.hpp text
32+
*.md text
33+
*.stats text
34+
*.xml text
35+
*.sh text
36+
*.pl text
37+
*.java text
38+
*.cs text
39+
*.py text
40+
*.lua text
41+
*.expected text
42+
43+
# Explicitly set a bunch of known extensions to binary, because Git < 2.10 will treat
44+
# `* text=auto eol=lf` as `* text eol=lf`
45+
*.png -text
46+
*.jpg -text
47+
*.jpeg -text
48+
*.gif -text
49+
*.dll -text
50+
*.pdb -text
51+
52+
java/ql/test/stubs/**/*.java linguist-generated=true
53+
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: LGTM.com - false positive
3+
about: Tell us about an alert that shouldn't be reported
4+
title: LGTM.com - false positive
5+
labels: false-positive
6+
assignees: ''
7+
8+
---
9+
10+
**Description of the false positive**
11+
12+
<!-- Please explain briefly why you think it shouldn't be included. -->
13+
14+
**URL to the alert on the project page on LGTM.com**
15+
16+
<!--
17+
1. Open the project on LGTM.com.
18+
For example, https://lgtm.com/projects/g/pallets/click/.
19+
2. Switch to the `Alerts` tab. For example, https://lgtm.com/projects/g/pallets/click/alerts/.
20+
3. Scroll to the alert that you would like to report.
21+
4. Click on the right most icon `View this alert within the complete file`.
22+
5. A new browser tab opens. Copy and paste the page URL here.
23+
For example, https://lgtm.com/projects/g/pallets/click/snapshot/719fb7d8322b0767cdd1e5903ba3eb3233ba8dd5/files/click/_winconsole.py#xa08d213ab3289f87:1.
24+
-->
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: General issue
3+
about: Tell us if you think something is wrong or if you have a question
4+
title: General issue
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
**Description of the issue**
11+
12+
<!-- Please explain briefly what is the problem.
13+
If it is about an LGTM project, please include its URL.-->
14+
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Fetch CodeQL
2+
description: Fetches the latest version of CodeQL
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Fetch CodeQL
7+
shell: bash
8+
run: |
9+
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
10+
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
11+
unzip -q -d "${RUNNER_TEMP}" codeql-linux64.zip
12+
echo "${RUNNER_TEMP}/codeql" >> "${GITHUB_PATH}"
13+
env:
14+
GITHUB_TOKEN: ${{ github.token }}

.github/codeql/codeql-config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "CodeQL config"
2+
3+
queries:
4+
- uses: security-and-quality
5+
6+
paths-ignore:
7+
- '/cpp/'
8+
- '/java/'
9+
- '/python/'
10+
- '/javascript/ql/test'
11+
- '/javascript/extractor/tests'

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "ruby/node-types"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "cargo"
8+
directory: "ruby/generator"
9+
schedule:
10+
interval: "daily"
11+
- package-ecosystem: "cargo"
12+
directory: "ruby/extractor"
13+
schedule:
14+
interval: "daily"
15+
- package-ecosystem: "cargo"
16+
directory: "ruby/autobuilder"
17+
schedule:
18+
interval: "daily"

.github/labeler.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"C++":
2+
- cpp/**/*
3+
- change-notes/**/*cpp*
4+
5+
"C#":
6+
- csharp/**/*
7+
- change-notes/**/*csharp*
8+
9+
Java:
10+
- java/**/*
11+
- change-notes/**/*java.*
12+
13+
JS:
14+
- javascript/**/*
15+
- change-notes/**/*javascript*
16+
17+
Python:
18+
- python/**/*
19+
- change-notes/**/*python*
20+
21+
Ruby:
22+
- ruby/**/*
23+
- change-notes/**/*ruby*
24+
25+
documentation:
26+
- "**/*.qhelp"
27+
- "**/*.md"
28+
- docs/**/*
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check change note
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
6+
paths:
7+
- "*/ql/src/**/*.ql"
8+
- "*/ql/src/**/*.qll"
9+
- "!**/experimental/**"
10+
11+
jobs:
12+
check-change-note:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
16+
if: |
17+
github.event.pull_request.draft == false &&
18+
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
23+
grep true -c

.github/workflows/close-stale.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Mark stale issues
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 1 * * *"
7+
8+
jobs:
9+
stale:
10+
if: github.repository == 'github/codeql'
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/stale@v3
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
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.'
19+
close-issue-message: 'This issue was closed because it has been inactive for 7 days.'
20+
days-before-stale: 14
21+
days-before-close: 7
22+
only-labels: awaiting-response
23+
24+
# do not mark PRs as stale
25+
days-before-pr-stale: -1
26+
days-before-pr-close: -1
27+
28+
# Uncomment for dry-run
29+
# debug-only: true
30+
# operations-per-run: 1000

.github/workflows/codeql-analysis.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'rc/*'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'rc/*'
12+
paths:
13+
- 'csharp/**'
14+
- '.github/codeql/**'
15+
- '.github/workflows/codeql-analysis.yml'
16+
schedule:
17+
- cron: '0 9 * * 1'
18+
19+
jobs:
20+
CodeQL-Build:
21+
22+
runs-on: ubuntu-latest
23+
24+
permissions:
25+
contents: read
26+
security-events: write
27+
pull-requests: read
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@main
36+
# Override language selection by uncommenting this and choosing your languages
37+
with:
38+
languages: csharp
39+
config-file: ./.github/codeql/codeql-config.yml
40+
41+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
42+
# If this step fails, then you should remove it and run the build manually (see below)
43+
#- name: Autobuild
44+
# uses: github/codeql-action/autobuild@main
45+
46+
# ℹ️ Command-line programs to run using the OS shell.
47+
# 📚 https://git.io/JvXDl
48+
49+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
50+
# and modify them (or add more) to build your code if your project
51+
# uses a compiled language
52+
53+
- run: |
54+
dotnet build csharp
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@main

0 commit comments

Comments
 (0)