-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sync Upstream Tags #19342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Sync Upstream Tags #19342
Changes from all commits
Commits
Show all changes
780 commits
Select commit
Hold shift + click to select a range
350742a
Merge branch 'main' into brodes/open_source_query_transition
bdrodes 81fa6fc
Merge pull request #155 from microsoft/brodes/open_source_query_trans…
dilanbhalla e4378b2
All languages: Get rid of the Microsoft modifications to the GitHub d…
MathiasVP 464ae8b
Shared: Autoformat.
MathiasVP c825ca8
Shared: Refactor DataFlowStack so that we don't depend on our own mod…
MathiasVP ee6624a
Merge pull request #157 from microsoft/dataflow-stack-cleanup
dilanbhalla d144c26
Java/C#: Add missing files.
MathiasVP 3237b2c
Merge pull request #158 from microsoft/dataflow-stack-cleanup-2
dilanbhalla 712d8aa
Java: Update file that was forgotten in the dataflow-stack PR.
MathiasVP 403ad3c
Shared: Add missing transitive closure.
MathiasVP 29d07ae
Merge pull request #159 from microsoft/dataflow-stack-cleanup-3
MathiasVP 7140361
removing javascript dataflow deprecations
34a577d
missed deprecation label removal for code injection query
a88f3ce
Merge pull request #160 from microsoft/dilan/remove-js-dataflow-depre…
dilanbhalla 54f0bc1
adding msft namespace to msft query ids
cd9a0f1
Merge pull request #161 from microsoft/dilan/query-id-msft-namespace
raulgarciamsft c43b682
PS: Ensure that the PowerShell CFG library compiles with CodeQL versi…
MathiasVP 14ab30c
Update DoNotUseInvokeExpression.ql
dilanbhalla fa74d05
Update CommandInjection.ql
dilanbhalla c749c19
Update CommandInjection.ql
dilanbhalla 9be5b3c
Merge pull request #163 from microsoft/update-powershell-cfg-library-…
dilanbhalla b0c11b5
Merge tag 'codeql-cli/latest'
312bc52
adding msft open source tests
ba97b92
microsoft public namespace edit
642780e
C++: Accept more test changes.
MathiasVP 7f7e934
Merge pull request #164 from microsoft/dilan/include-microsoft-public…
MathiasVP 414feff
microsoft-public -> public
e200aa5
Merge branch 'main' into dilan/microsoft-namespace-edit
dilanbhalla e7bb37a
Merge pull request #165 from microsoft/dilan/microsoft-namespace-edit
dilanbhalla 41b5d19
resolving ruby df error
233c0cf
Merge pull request #166 from microsoft/dilan/resolve-ruby-df-error
dilanbhalla 6ed2eb1
Ruby: Update internal dataflow files.
MathiasVP d5f75d4
Merge pull request #167 from microsoft/update-ruby-internal-dataflow-…
dilanbhalla 898e4ff
reduce powershell pr check perms
dilanbhalla 6ccedeb
Update sync-main.yml
dilanbhalla ad32991
Merge pull request #168 from microsoft/dilan/reduce-pr-check-perms
dilanbhalla 9ba49ad
Update ArgumentIsSizeofOrOperation.ql
dilanbhalla 5c54c81
Merge pull request #169 from microsoft/dilan/metadata-bug-cpp
raulgarciamsft 6ef0941
PS: Add .NET and PowerShell SDK type models.
MathiasVP 3dbe7f4
PS: Add the type model generation script and add a short readme.
MathiasVP 61796da
Merge pull request #171 from microsoft/ps-add-dotnet-type-models
MathiasVP efb43bc
PS: Match the changes from #18696.
MathiasVP 6909792
PS: Also get rid of an easy-to-fix SSA warning.
MathiasVP d76e438
Merge pull request #173 from microsoft/powershell-update-basic-block-…
dilanbhalla 0628e49
Merge tag 'codeql-cli/latest'
1978e10
PS: Remove extractor option to skip psmodule extraction.
MathiasVP 4bfd6fd
PS: Revert psmodule path file extraction.
MathiasVP 5b5b153
PS: Make the prepare db script work on the Microsoft repo.
MathiasVP 29c11a4
PS: Add upgrade and downgrade scripts.
MathiasVP abc23e0
Merge branch 'main' into revert-ps-module-extraction
MathiasVP 4e6f463
Merge pull request #174 from microsoft/revert-ps-module-extraction
MathiasVP ee2688f
Update project to net 8.
gfs 43cdff9
Update dependencies.
gfs b018fb9
Add gitignore for build artifacts from powershell extractor
gfs 17ae251
Update powershell-pr-check.yml
dilanbhalla 2172ced
Merge pull request #176 from microsoft/dilan/powershell-pr-token
MathiasVP faa51c1
Merge branch 'main' into gfs/PowershellExtractorNetUpgrade
MathiasVP 4ddc425
Merge pull request #175 from gfs/gfs/PowershellExtractorNetUpgrade
MathiasVP 0869a11
Merge tag 'codeql-cli/latest'
4c13821
Merge tag 'codeql-cli/latest'
44e4e3e
PS: Extract more powershell files and fix off-by-one error in locations.
MathiasVP d79eb01
PS: Delete the old AST.
MathiasVP 6652021
PS: Add user-facing AST classes.
MathiasVP a207c80
PS: Add 'raw' AST classes coming directly from the extractor.
MathiasVP b52c6ea
PS: Add control-flow node version of all the user-facing ast classes.
MathiasVP 11c84cc
PS: Add the IPA type representing the AST.
MathiasVP 0dd756d
PS: Add support for variables.
MathiasVP 31f14ba
PS: Add synthesis framework for cleaning up the AST.
MathiasVP faa9473
PS: Add an implicit this parameter to all methods.
MathiasVP 5bc0a26
PS: A call to set-variable is an explicit assignment.
MathiasVP 0b4a7f9
PS: Synthesize a simpler notion of parameters.
MathiasVP 1766134
PS: expr-to-stmt conversions.
MathiasVP 8eb5e65
PS: Synthesize Function and Type classes instead of relying on the st…
MathiasVP 3bb6021
PS: Remove the CmdExpr AST elements and synthesize StmtExpr instead w…
MathiasVP 7adb020
PS: Remove arguments that are just names for a named argument.
MathiasVP 9f4d1c6
PS: PowerShell doesn't have a notion of true, false, null, etc. In th…
MathiasVP 171f5ca
PS: Inside a process block the name of a pipeline parameter actually …
MathiasVP cc13922
PS: Make the experimental query compile again.
MathiasVP 9efc3ec
PS: Make dataflow compile again.
MathiasVP c2e24ea
PS: Make CFG construction compile again.
MathiasVP 8f9bc1e
PS: Make SSA compile again.
MathiasVP 8092345
PS: Make type-tracking and taint-tracking compile again.
MathiasVP 7551cce
PS: Make API graphs compile again. There is still some TODOs here, bu…
MathiasVP 655d80e
PS: Repair tests and accept test changes in syntax tests.
MathiasVP c840f86
PS: Accept CFG test changes.
MathiasVP 0fc5778
PS: Accept dataflow/taint-tracking/type-tracking regressions.
MathiasVP cea435c
Merge pull request #178 from microsoft/powershell-ipa-the-ast
MathiasVP dcb98ab
PS: Don't include the this parameter in getParameter.
MathiasVP 7b9a41a
PS: Handle this parameters in a few more places.
MathiasVP ee0a21e
PS: Make child mapping classes private.
MathiasVP 2da8da0
PS: Add helper predicates for if statements.
MathiasVP 18d94f2
PS: Don't include the variable in the IPA definition for variable acc…
MathiasVP 19454a5
PS: Small additions to the CFG classes and a small bugfix.
MathiasVP f85767f
PS: add a super class for all loop-related CFG nodes.
MathiasVP a9861e1
PS: Add a library that calculated escaping values much more efficient…
MathiasVP ee8c586
PS: Use the new library to calculate returned expressions.
MathiasVP b2cf155
PS: Define pre-return node and implicit-wrapping nodes using the scri…
MathiasVP 5d5448d
PS: Also use the new library to handle array expressions.
MathiasVP 3643b93
fixup! PS: Define pre-return node and implicit-wrapping nodes using t…
MathiasVP 7102ebb
PS: Accept test changes.
MathiasVP e17a169
Merge pull request #180 from microsoft/powershell-ast-modernization-f…
MathiasVP a6a1734
PS: Easier debugging with strings for child indices.
MathiasVP ee4104b
PS: Fix parent-child mapping for iterator pipeline access synthesis.
MathiasVP 88f638d
PS: Fix more pipeline flow.
MathiasVP 0b9720c
PS: Accept test changes.
MathiasVP 08dc818
PS: Add Chanel's missing flow example.
MathiasVP 129b787
PS: Allow shadowing of automatic variables.
MathiasVP 8ae92a5
PS: Accept test changes.
MathiasVP 898297b
Merge pull request #181 from microsoft/powershell-ast-modernization-f…
chanel-y 1c380fb
PS: Add another missing flow found by Chanel.
MathiasVP 5fa3beb
PS: Normalize parameter keywords and accept test changes.
MathiasVP b452339
Merge pull request #182 from microsoft/fix-parameter-by-name-flow-2
chanel-y 6125973
C#: Add a hash-cons library for C#.
MathiasVP 70ca686
C#: Make a few more modules private.
MathiasVP cd8e5e6
PS: Subclass AnyElement into positional or key-ional.
MathiasVP 4d04b11
PS: Add some implicit reads at process blocks, and fix CFG for proces…
MathiasVP 3acbd83
PS: Drive-by fix: The variable access in a foreach loop implicitly wr…
MathiasVP 86ec291
PS: Improve toString on phi nodes.
MathiasVP 5151eb3
PS: Add dataflow for pipeline-by-property-name variables.
MathiasVP 38536a9
PS: Accept test changes.
MathiasVP 7c59a74
Merge pull request #184 from microsoft/fix-parameter-by-name-flow-3
chanel-y 656b734
initial query
chanel-y 22ff3a3
Merge branch 'main' of https://github.com/microsoft/codeql into power…
chanel-y 403c182
PS: Fixup SSA after GitHub's recent changes.
MathiasVP 2f215c1
PS: Accept test changes.
MathiasVP e261510
Merge branch 'main' into hashcons-for-csharp
ropwareJB 6873eba
Merge pull request #185 from microsoft/fix-ssa-for-powershell-2
dilanbhalla 50c57c2
PS: Drive-by: Assign a location to top-level functions.
MathiasVP 4b14e5e
PS: Lift automatic variables to the cfg and dataflow layers.
MathiasVP 4df449d
PS: Add an edge from the root node to automatic variables, and from a…
MathiasVP 22bdcf0
PS: Force lower casing on method edges.
MathiasVP c5c3236
Merge branch 'main' into hashcons-for-csharp
ropwareJB 16348b5
PS: Consistently use the pipeline parameter as the parameter when it …
MathiasVP ebc7327
PS: Get rid of the pipelineVARIABLE and only have pipelinePARAMETER (…
MathiasVP cdd68b3
PS: Improve the location of synthesized variables.
MathiasVP 03f3561
PS: Accept test changes.
MathiasVP f482c9d
PS: Make the implementation of 'getExtraNodeFromType' more complete. …
MathiasVP 65abf48
PS: Add missing taint-flow and dataflow dispatch from models.
MathiasVP 8a58af8
PS: Add a model for 'EscapeSingleQuotedStringContent' and add a test.
MathiasVP a2d4296
Merge branch 'main' into powershell-automatic-variables-as-member-edges
chanel-y 38f0f07
modeled some user input, sanitizers
chanel-y 6db354e
Merge branch 'main' of https://github.com/microsoft/codeql into power…
chanel-y 6da7e4c
Update sync-main.yml
dilanbhalla e0b8e20
Update sync-main.yml
dilanbhalla 2af5513
Update sync-main.yml
dilanbhalla 6cbc80a
Merge pull request #187 from microsoft/dilan/sync-main-createpr
dilanbhalla 3c45925
Update sync-main.yml
dilanbhalla 452f56f
Merge pull request #188 from microsoft/dilan/sync-main-trigger
dilanbhalla 157c57a
Update sync-main.yml
dilanbhalla 13e5305
Merge pull request #189 from microsoft/dilan/sync-main-bugs-1
dilanbhalla cda36a8
Update sync-main.yml
dilanbhalla 8568260
Merge branch 'main' into dilan/sync-main-bugs-2
dilanbhalla 52ceda1
Merge pull request #190 from microsoft/dilan/sync-main-bugs-2
dilanbhalla e0a6a4e
Update sync-main.yml
dilanbhalla fb938ab
Merge pull request #191 from microsoft/dilan/sync-main-bugs-3
dilanbhalla 3c92f6b
Update sync-main.yml
dilanbhalla 41406d1
Merge pull request #192 from microsoft/dilan/sync-main-bugs-4
dilanbhalla ae5709d
Update sync-main.yml
dilanbhalla e098dd3
Merge pull request #193 from microsoft/dilan/sync-main-bugs-5
dilanbhalla 7e90d99
Update sync-main.yml
dilanbhalla db6d82c
Update sync-main.yml
dilanbhalla c1665fd
Update sync-main.yml
dilanbhalla dc9fdb5
Update sync-main.yml
dilanbhalla b676246
Update sync-main.yml
dilanbhalla 75fb343
Update sync-main.yml
dilanbhalla d81989f
Update sync-main.yml
dilanbhalla ed31f43
Update sync-main.yml
dilanbhalla e2bac16
Update sync-main.yml
dilanbhalla 0d40476
Update sync-main.yml
dilanbhalla 9442bf3
Update sync-main.yml
dilanbhalla 3324c30
Update sync-main.yml
dilanbhalla d384e41
Update sync-main.yml
dilanbhalla bc8220f
Update sync-main.yml
dilanbhalla 71ccc96
Update sync-main.yml
dilanbhalla 7259356
Update sync-main.yml
dilanbhalla 3a630ad
Update sync-main.yml
dilanbhalla d92e61e
Update sync-main.yml
dilanbhalla 9a59b1c
Update sync-main.yml
dilanbhalla 9bbffb6
Update sync-main.yml
dilanbhalla eb41d97
Update sync-main.yml
dilanbhalla be4f1f1
Update sync-main.yml
dilanbhalla 7a168b0
Update sync-main.yml
dilanbhalla 544f0ca
Update sync-main.yml
dilanbhalla 826d43d
Update sync-main.yml
dilanbhalla 9f2b3eb
Update sync-main.yml
dilanbhalla 87d5592
Update sync-main.yml
dilanbhalla d2eadbf
Update sync-main.yml
dilanbhalla 2a8c8db
Update sync-main.yml
dilanbhalla 98338fe
Update sync-main.yml
dilanbhalla 3d57ea9
Update sync-main.yml
dilanbhalla a7dcc9f
Update sync-main.yml
dilanbhalla 1e24627
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
github-actions[bot] 70f9401
Update sync-main.yml
dilanbhalla 79909e9
Update sync-main.yml
dilanbhalla 7612ef9
Merge pull request #186 from microsoft/powershell-automatic-variables…
MathiasVP 02c027d
Merge pull request #183 from microsoft/hashcons-for-csharp
MathiasVP f38c5f5
PS: Add lots of models.
MathiasVP 763effb
PS: Add more models and support pipeline parameters in MaD.
MathiasVP 5f12d7c
PS: Taint flow through all calls to 'toString'.
MathiasVP a5afc3c
PS: Flow through pipelines.
MathiasVP 6de4765
PS: Support implicit imports in API graphs.
MathiasVP ebb91dc
PS: Add a few more models after fixing MaD for Element content.
MathiasVP f8207fa
PS: Add a testcase to demonstrate flow through Join-String.
MathiasVP a93d65b
Update sync-main.yml
dilanbhalla e7edf1b
Update sync-main.yml
dilanbhalla 88a7c3a
Update sync-main.yml
dilanbhalla 0d97cd6
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
86b3eae
Merge branch 'main' into dilan/sync-main-bugs-6
dilanbhalla b8b4e44
Update sync-main.yml
dilanbhalla c5b024a
Update sync-main.yml
dilanbhalla 0f034b3
Merge pull request #194 from microsoft/dilan/sync-main-bugs-6
dilanbhalla 89ddb30
Merge pull request #197 from microsoft/auto/sync-main-pr
dilanbhalla b55ee68
Merge branch 'main' into autogenerate-lots-of-models
MathiasVP 419de4f
Merge pull request #196 from microsoft/autogenerate-lots-of-models
chanel-y 4628c18
Update sync-main.yml
dilanbhalla 5abde74
Merge pull request #198 from microsoft/dilan/sync-main-bugs-7
dilanbhalla 793fd5e
PS: Delete a redundant file.
MathiasVP 6084789
PS: Fix the top level arguments after the AST cleanup.
MathiasVP bf9ed3b
PS: Accept test changes.
MathiasVP 9adf028
PS: Fix environment variables.
MathiasVP 4aa9f85
PS: Accept test changes.
MathiasVP 1637df0
Merge pull request #199 from microsoft/fix-top-level-arguments
chanel-y 43de3a1
PS: Use the existing MaD rows to model file reads as flow sources.
MathiasVP 3d18175
PS: Make it possible to specify a named argument that must be present…
MathiasVP 6455992
PS: Add two more flow sources.
MathiasVP b4d8673
Merge branch 'main' of https://github.com/microsoft/codeql into power…
chanel-y 9935117
PS: Make method names lower case.
MathiasVP f389487
PS: Make type names lower case.
MathiasVP 43d9c70
PS: Rename Field and Property to Member.
MathiasVP a146630
PS: Delete redundant files.
MathiasVP fa3fc4a
PS: Fix more problems in MaD rows for sources.
MathiasVP dcc1278
PS: Make remote flow sources flow sources.
MathiasVP 826e6a9
PS: Add an inline expectations test library for flow sources.
MathiasVP 396a283
PS: Add tests for flow sources.
MathiasVP c9b1356
Merge pull request #200 from microsoft/files-reads-as-flow-sources
chanel-y 5f64350
added script block, expandstring sinks, moved sanitizers to separate …
chanel-y 50a771e
Merge branch 'main' into powershell-injectionhunter-port
chanel-y 2266cd2
moved folder, added tests/docs
chanel-y ed553d3
merged work into CommandInjection query
chanel-y b09d9f6
PS: Autoformat.
MathiasVP 7d72683
PS: Add an example with a missing toString.
MathiasVP b70f7e2
PS: Fix missing toString and accept test changes.
MathiasVP 12b918e
pr feedback: removed toString, updated .expected
chanel-y fe7d8ff
Merge pull request #201 from microsoft/powershell-injectionhunter-port
chanel-y e7e88d3
PS: Add upgrade script from some unknown dbscheme to the dbscheme tha…
MathiasVP 4518f18
PS: Delete a cycle in the upgrade script.
MathiasVP 21210c6
Merge pull request #203 from microsoft/add-missing-downgrade-and-upgr…
MathiasVP 37a6b04
Merge branch 'main' into fix-to-string-on-unknown-static-read
chanel-y 03bce1c
Merge pull request #202 from microsoft/fix-to-string-on-unknown-stati…
chanel-y 7553e14
sync upstream tags to main
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: PowerShell PR Check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
powershell-pr-check: | ||
name: powershell-pr-check | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'microsoft/codeql' | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ github.token }} | ||
- name: Setup CodeQL | ||
uses: ./.github/actions/fetch-codeql | ||
with: | ||
channel: release | ||
- name: Compile PowerShell Queries | ||
run: | | ||
codeql query compile --check-only --keep-going powershell/ql/src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Sync Main Tags | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
sync-main-tags: | ||
name: Sync Main Tags | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'microsoft/codeql' && github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'auto/sync-main-pr' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Push Tags | ||
run: | | ||
git fetch upstream --tags --force | ||
git push --force origin --tags | ||
env: | ||
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Sync Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/sync-main.yml | ||
schedule: | ||
- cron: '55 * * * *' | ||
|
||
jobs: | ||
sync-main: | ||
name: Sync-main | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'microsoft/codeql' | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Git config | ||
shell: bash | ||
run: | | ||
git config user.name "dilanbhalla" | ||
git config user.email "dilanbhalla@microsoft.com" | ||
- name: Git checkout auto/sync-main-pr | ||
shell: bash | ||
run: | | ||
git fetch origin | ||
if git ls-remote --exit-code --heads origin auto/sync-main-pr > /dev/null; then | ||
echo "Branch exists remotely. Checking it out." | ||
git checkout -B auto/sync-main-pr origin/auto/sync-main-pr | ||
else | ||
echo "Branch does not exist remotely. Creating from main." | ||
git checkout -B auto/sync-main-pr origin/main | ||
git push -u origin auto/sync-main-pr | ||
fi | ||
- name: Sync origin/main | ||
shell: bash | ||
run: | | ||
echo "::group::Sync with main branch" | ||
git pull origin auto/sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi | ||
git pull origin main --no-rebase | ||
git push --force origin auto/sync-main-pr | ||
echo "::endgroup::" | ||
- name: Sync upstream/codeql-cli/latest | ||
shell: bash | ||
run: | | ||
echo "::group::Set up remote" | ||
git remote add upstream https://github.com/github/codeql.git | ||
git fetch upstream --tags --force | ||
echo "::endgroup::" | ||
echo "::group::Merge codeql-cli/latest" | ||
set -x | ||
git merge codeql-cli/latest | ||
set +x | ||
echo "::endgroup::" | ||
- name: Push sync branch | ||
run: | | ||
git push origin auto/sync-main-pr | ||
env: | ||
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | ||
- name: Create PR if it doesn't exist | ||
shell: bash | ||
run: | | ||
pr_number=$(gh pr list --repo microsoft/codeql --head auto/sync-main-pr --base main --json number --jq '.[0].number') | ||
if [ -n "$pr_number" ]; then | ||
echo "PR from auto/sync-main-pr to main already exists (PR #$pr_number). Exiting gracefully." | ||
else | ||
if git fetch origin main auto/sync-main-pr && [ -n "$(git rev-list origin/main..origin/auto/sync-main-pr)" ]; then | ||
echo "PR does not exist. Creating one..." | ||
gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr \ | ||
--label 'autogenerated' \ | ||
--title 'Sync Main (autogenerated)' \ | ||
--body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`." \ | ||
--reviewer 'MathiasVP' | ||
--reviewer 'ropwareJB' | ||
else | ||
echo "No changes to sync from auto/sync-main-pr to main. Exiting gracefully." | ||
fi | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK --> | ||
|
||
## Security | ||
|
||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). | ||
|
||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. | ||
|
||
## Reporting Security Issues | ||
|
||
**Please do not report security vulnerabilities through public GitHub issues.** | ||
|
||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). | ||
|
||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). | ||
|
||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). | ||
|
||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: | ||
|
||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
* Full paths of source file(s) related to the manifestation of the issue | ||
* The location of the affected source code (tag/branch/commit or direct URL) | ||
* Any special configuration required to reproduce the issue | ||
* Step-by-step instructions to reproduce the issue | ||
* Proof-of-concept or exploit code (if possible) | ||
* Impact of the issue, including how an attacker might exploit the issue | ||
|
||
This information will help us triage your report more quickly. | ||
|
||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. | ||
|
||
## Preferred Languages | ||
|
||
We prefer all communications to be in English. | ||
|
||
## Policy | ||
|
||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). | ||
|
||
<!-- END MICROSOFT SECURITY.MD BLOCK --> |
4 changes: 4 additions & 0 deletions
4
cpp/ql/lib/change-notes/2023-10-12-additional-call-targets.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
category: feature | ||
--- | ||
* Added a new class `AdditionalCallTarget` for specifying additional call targets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
cpp/ql/src/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @name Leap Year Invalid Check (AntiPattern 5) | ||
* @description An expression is used to check a year is presumably a leap year, but the conditions used are insufficient. | ||
* @kind problem | ||
* @problem.severity warning | ||
* @id cpp/microsoft/public/leap-year/invalid-leap-year-check | ||
* @precision medium | ||
* @tags leap-year | ||
* correctness | ||
*/ | ||
|
||
import cpp | ||
import LeapYear | ||
|
||
from Mod4CheckedExpr exprMod4 | ||
where not exists(ExprCheckLeapYear lyCheck | lyCheck.getAChild*() = exprMod4) | ||
select exprMod4, "Possible Insufficient Leap Year check (AntiPattern 5)" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider replacing the custom exit code handling with a more standard approach (such as appending '|| true' to the git pull command) to improve readability and maintainability.
Copilot uses AI. Check for mistakes.