-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Merge upstream codeql-cli-2.22.3 #20841
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
Conversation
PS: Restructure generated files
…f the argument (which is incorrect when there is use-use flow).
C#: Fix FPs (and a small FN) in `cs/path-injection`
Auth Bug: Sync Main
Sync Main: Auth Bug (fix attempt 2)
Compatible with the latest released version of the CodeQL CLI
added hasbranchedge
fix powershell qhelp files
fix failing qhelp files
Compatible with the latest released version of the CodeQL CLI
…ched by the other two patterns.
…shell PS: Remove unnecessary data extension pattern to fix warning
Sync Main (autogenerated)
DataFlowStack parameterized over Dataflow implementation
C# TaintTrackingStack Update to interface
DataFlowStack interface update
refactor: {Data,TaintTracking}FlowStack
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.
Pull Request Overview
This PR merges upstream CodeQL changes from version 2.22.3, primarily consisting of auto-generated stub files for the Microsoft.Identity.ServiceEssentials.SDK package and related test configuration updates.
- Added auto-generated C# stub files for Microsoft Identity and IdentityModel libraries (version 6.34.0.0 and 1.19.6.0)
- Added test query reference files for JWT security validation queries
- All changes are generated stub files intended to be correct by design
Reviewed Changes
Copilot reviewed 258 out of 4384 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Microsoft.IdentityModel.S2S.cs | Auto-generated stub for S2S authentication protocol handlers and validation classes |
| Microsoft.IdentityModel.S2S.Tokens.cs | Auto-generated stub for S2S token management, logging, and validation utilities |
| Microsoft.IdentityModel.Protocols.cs | Auto-generated stub for OpenID Connect protocol configuration and retrieval |
| Microsoft.IdentityModel.Protocols.SignedHttpRequest.cs | Auto-generated stub for signed HTTP request validation and creation |
| Microsoft.IdentityModel.Protocols.OpenIdConnect.cs | Auto-generated stub for OpenID Connect message handling and configuration |
| Microsoft.IdentityModel.Logging.cs | Auto-generated stub for identity model event logging and telemetry |
| Microsoft.IdentityModel.JsonWebTokens.cs | Auto-generated stub for JWT token handling and validation |
| Microsoft.IdentityModel.Abstractions.cs | Auto-generated stub for identity model logging abstractions |
| Microsoft.Identity.ServiceEssentials.TokenAcquisition.cs | Auto-generated stub for token acquisition functionality |
| Microsoft.Identity.ServiceEssentials.Modules.TrV2Module.cs | Auto-generated stub for tenant restrictions v2 module |
| Microsoft.Identity.ServiceEssentials.Core.cs | Auto-generated stub for core service essentials types |
| Microsoft.Identity.ServiceEssentials.Caching.cs | Auto-generated stub for caching functionality |
| Microsoft.Identity.ServiceEssentials.Authentication.cs | Auto-generated stub for authentication ticket providers |
| Microsoft.Identity.Abstractions.cs | Auto-generated stub for identity abstractions and token acquisition |
| Microsoft.Extensions.Primitives.cs | Auto-generated stub for extension primitive types |
| Microsoft.Extensions.Options.cs | Auto-generated stub for options pattern types |
| Microsoft.Extensions.Options.ConfigurationExtensions.cs | Auto-generated stub for configuration binding extensions |
| Microsoft.Extensions.Logging.cs | Auto-generated stub for logging infrastructure |
| Microsoft.Extensions.Logging.Abstractions.cs | Auto-generated stub for logging abstraction interfaces |
| Microsoft.Extensions.DependencyInjection.cs | Auto-generated stub for dependency injection container |
| AadIssuerValidationDataFlow.qlref | Test query reference for AAD issuer validation data flow analysis |
| security-validation-disabled.qlref | Test query reference for JWT security validation checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Fail if not on main branch | ||
| run: | | ||
| if [ "$GITHUB_REF" != "refs/heads/main" ]; then | ||
| echo "This workflow can only run on the 'main' branch." | ||
| exit 1 | ||
| fi | ||
| codeqlversion: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
| needs: check-branch | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| codeql_version: ${{ steps.set_codeql_version.outputs.codeql_version }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set CodeQL Version | ||
| id: set_codeql_version | ||
| run: | | ||
| git fetch | ||
| git fetch --tags | ||
| CURRENT_COMMIT=$(git rev-list -1 HEAD) | ||
| CURRENT_TAG=$(git describe --tags --abbrev=0 --match 'codeql-cli/v*' $CURRENT_COMMIT) | ||
| CODEQL_VERSION="${CURRENT_TAG#codeql-cli/}" | ||
| echo "CODEQL_VERSION=$CODEQL_VERSION" >> $GITHUB_OUTPUT | ||
| publishlibs: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
| environment: secure-publish | ||
| needs: codeqlversion | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| language: ['powershell'] | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install CodeQL | ||
| shell: bash | ||
| run: | | ||
| gh extension install github/gh-codeql | ||
| gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}" | ||
| gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}" | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| - name: Publish OS Microsoft CodeQL Lib Pack | ||
| shell: bash | ||
| run: | | ||
| # Download latest qlpack | ||
| gh codeql pack download "microsoft/$LANGUAGE-all" | ||
| PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-all" | ||
| VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l) | ||
| [[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; } | ||
|
|
||
| # Increment version | ||
| CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1) | ||
| MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1) | ||
| MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2) | ||
| PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3) | ||
| NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))" | ||
|
|
||
| # Extract dependencies from the existing qlpack.yml before deleting | ||
| DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null) | ||
| DATAEXTENSIONS=$(yq 'select(has("dataExtensions")) | .dataExtensions | {"dataExtensions": .}' "$LANGUAGE/ql/lib/qlpack.yml" 2>/dev/null) | ||
| rm -f "$LANGUAGE/ql/lib/qlpack.yml" "$LANGUAGE/ql/lib/qlpack.lock" | ||
|
|
||
| # Create new qlpack.yml with modified content | ||
| cat <<EOF > "$LANGUAGE/ql/lib/qlpack.yml" | ||
| name: microsoft/$LANGUAGE-all | ||
| version: $NEXT_VERSION | ||
| extractor: $LANGUAGE | ||
| groups: | ||
| - $LANGUAGE | ||
| - microsoft-all | ||
| dbscheme: semmlecode.$LANGUAGE.dbscheme | ||
| extractor: $LANGUAGE | ||
| library: true | ||
| upgrades: upgrades | ||
| $DEPENDENCIES | ||
| $DATAEXTENSIONS | ||
| warnOnImplicitThis: true | ||
| EOF | ||
|
|
||
| # Publish pack | ||
| cat "$LANGUAGE/ql/lib/qlpack.yml" | ||
| gh codeql pack publish "$LANGUAGE/ql/lib" | ||
| env: | ||
| LANGUAGE: ${{ matrix.language }} | ||
| GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }} | ||
| publish: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
| environment: secure-publish | ||
| needs: codeqlversion | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| language: ['csharp', 'cpp', 'java', 'javascript', 'python', 'ruby', 'go', 'rust', 'swift', 'powershell', 'iac'] | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install CodeQL | ||
| shell: bash | ||
| run: | | ||
| gh extension install github/gh-codeql | ||
| gh codeql download "${{ needs.codeqlversion.outputs.codeql_version }}" | ||
| gh codeql set-version "${{ needs.codeqlversion.outputs.codeql_version }}" | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| - name: Publish OS Microsoft CodeQL Pack | ||
| shell: bash | ||
| run: | | ||
| # Download latest qlpack | ||
| gh codeql pack download "microsoft/$LANGUAGE-queries" | ||
| PACK_DIR="$HOME/.codeql/packages/microsoft/$LANGUAGE-queries" | ||
| VERSION_COUNT=$(ls -d "$PACK_DIR"/*/ | wc -l) | ||
| [[ "$VERSION_COUNT" -ne 1 ]] && { echo "Expected exactly one version in $PACK_DIR, but found $VERSION_COUNT. Exiting."; exit 1; } | ||
|
|
||
| # Increment version | ||
| CURRENT_VERSION=$(ls -v "$PACK_DIR" | tail -n 1) | ||
| MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1) | ||
| MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2) | ||
| PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3) | ||
| NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))" | ||
|
|
||
| # Extract dependencies from the existing qlpack.yml before deleting | ||
| DEPENDENCIES=$(yq 'select(has("dependencies")) | .dependencies | {"dependencies": .}' "$LANGUAGE/ql/src/qlpack.yml" 2>/dev/null) | ||
| rm -f "$LANGUAGE/ql/src/qlpack.yml" "$LANGUAGE/ql/src/qlpack.lock" | ||
|
|
||
| # Create new qlpack.yml with modified content | ||
| cat <<EOF > "$LANGUAGE/ql/src/qlpack.yml" | ||
| name: microsoft/$LANGUAGE-queries | ||
| version: $NEXT_VERSION | ||
| extractor: $LANGUAGE | ||
| groups: | ||
| - $LANGUAGE | ||
| - queries | ||
| $DEPENDENCIES | ||
| EOF | ||
|
|
||
| # Publish pack | ||
| cat "$LANGUAGE/ql/src/qlpack.yml" | ||
| gh codeql pack publish "$LANGUAGE/ql/src" | ||
| env: | ||
| LANGUAGE: ${{ matrix.language }} | ||
| GITHUB_TOKEN: ${{ secrets.PACKAGE_PUBLISH }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
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.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
Wrong repository, I believe. Closing. |
Accepted incoming for the following merge conflicts:
TaintedPathQuery doesn't seem to be changing functionality, just accomodating the deprecation of the AbstractValue (4f6528a)
ZipSlipQuery.qll is just adding more sources and sinks
TaintedPathQuery.qll
ZipSlipQuery.qll