From 705da78e08f54c1a1097460fb513eb869b1a8624 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 18 Nov 2026 16:56:02 -0600 Subject: [PATCH 1/4] Stop persisting the Actions token in CI checkouts actions/checkout writes GITHUB_TOKEN into .git/config by default, so any later build step, script, or compromised dependency could read it. These jobs never push, so drop the persisted credential. spm-release.yml keeps it because it pushes the SPM tag. test-vcpkg.yml also gains an explicit read-only permissions block so it no longer inherits the repository default. Files changed: .github/workflows/build-android.yml .github/workflows/build-ios-mac.yml .github/workflows/build-posix-latest.yml .github/workflows/build-ubuntu-2204.yml .github/workflows/build-windows-vs2022.yaml .github/workflows/codeql-analysis.yml .github/workflows/deploy-docs-pages.yml .github/workflows/memory-leak-analysis.yml .github/workflows/spellcheck.yml .github/workflows/test-embedding.yml .github/workflows/test-vcpkg.yml .github/workflows/test-win-latest.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e5009227-6b49-4803-8153-63d8d94037e3 --- .github/workflows/build-android.yml | 5 +++++ .github/workflows/build-ios-mac.yml | 4 ++++ .github/workflows/build-posix-latest.yml | 10 ++++++++++ .github/workflows/build-ubuntu-2204.yml | 2 ++ .github/workflows/build-windows-vs2022.yaml | 4 ++++ .github/workflows/codeql-analysis.yml | 6 ++++++ .github/workflows/deploy-docs-pages.yml | 2 ++ .github/workflows/memory-leak-analysis.yml | 4 ++++ .github/workflows/spellcheck.yml | 2 ++ .github/workflows/test-embedding.yml | 16 ++++++++++++++++ .github/workflows/test-vcpkg.yml | 16 ++++++++++++++++ .github/workflows/test-win-latest.yml | 4 ++++ 12 files changed, 75 insertions(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index c925e8b46..129be2dfb 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -37,6 +37,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Setup Java uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: @@ -72,6 +74,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure full JNI SDK run: >- cmake -S tests/android-storage -B out-no-exceptions -G Ninja @@ -100,6 +104,7 @@ jobs: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: + persist-credentials: false submodules: false - name: Update submodules run: | diff --git a/.github/workflows/build-ios-mac.yml b/.github/workflows/build-ios-mac.yml index 773c04748..3bfc07e50 100644 --- a/.github/workflows/build-ios-mac.yml +++ b/.github/workflows/build-ios-mac.yml @@ -41,6 +41,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure SDK and Objective-C wrappers run: >- cmake -S . -B out-no-exceptions -G Xcode @@ -84,6 +86,8 @@ jobs: run: | sudo chown -R $USER:staff /usr/local - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Initialize googletest run: git submodule update --init --depth=1 third_party/googletest - name: build diff --git a/.github/workflows/build-posix-latest.yml b/.github/workflows/build-posix-latest.yml index 2ed2e41a8..e3cc4699b 100644 --- a/.github/workflows/build-posix-latest.yml +++ b/.github/workflows/build-posix-latest.yml @@ -40,6 +40,8 @@ jobs: os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Verify test-runner failure propagation run: python3 tests/build-runner-tests.py @@ -56,6 +58,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Initialize googletest run: git submodule update --init --depth=1 third_party/googletest - name: Test ${{ matrix.os }} ${{ matrix.config }} @@ -73,6 +77,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Initialize googletest run: git submodule update --init --depth=1 third_party/googletest - name: Test Linux/macOS without native device-ID collection @@ -98,6 +104,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Install clang run: sudo apt-get update && sudo apt-get install -y clang - name: Compile each public header standalone under strict flags @@ -128,6 +136,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Install build dependencies if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install -y clang libcurl4-openssl-dev libsqlite3-dev zlib1g-dev diff --git a/.github/workflows/build-ubuntu-2204.yml b/.github/workflows/build-ubuntu-2204.yml index ca21ad8c4..22a3095ff 100644 --- a/.github/workflows/build-ubuntu-2204.yml +++ b/.github/workflows/build-ubuntu-2204.yml @@ -44,6 +44,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Initialize googletest run: git submodule update --init --depth=1 third_party/googletest - name: Test ${{ matrix.os }} ${{ matrix.config }} diff --git a/.github/workflows/build-windows-vs2022.yaml b/.github/workflows/build-windows-vs2022.yaml index 168393173..e150c6c4c 100644 --- a/.github/workflows/build-windows-vs2022.yaml +++ b/.github/workflows/build-windows-vs2022.yaml @@ -32,6 +32,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure full SDK shell: pwsh run: | @@ -63,6 +65,8 @@ jobs: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Build env: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bad283b5f..134e6d49a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,6 +40,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false continue-on-error: true # Initializes the CodeQL tools for scanning. @@ -88,6 +90,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 @@ -112,6 +116,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false continue-on-error: true - name: Update submodules diff --git a/.github/workflows/deploy-docs-pages.yml b/.github/workflows/deploy-docs-pages.yml index a3f13366f..73d5cf645 100644 --- a/.github/workflows/deploy-docs-pages.yml +++ b/.github/workflows/deploy-docs-pages.yml @@ -34,6 +34,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 diff --git a/.github/workflows/memory-leak-analysis.yml b/.github/workflows/memory-leak-analysis.yml index be5cb8778..0b7988577 100644 --- a/.github/workflows/memory-leak-analysis.yml +++ b/.github/workflows/memory-leak-analysis.yml @@ -52,6 +52,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Test Dr. Memory report parsing shell: pwsh @@ -175,6 +177,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Test Dr. Memory report parsing shell: pwsh diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 261ff567f..35a59d507 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -25,6 +25,8 @@ jobs: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false continue-on-error: true - name: install misspell diff --git a/.github/workflows/test-embedding.yml b/.github/workflows/test-embedding.yml index 2a0795866..a23a57db0 100644 --- a/.github/workflows/test-embedding.yml +++ b/.github/workflows/test-embedding.yml @@ -48,6 +48,8 @@ jobs: disable-logging: ON steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Install system dependencies if: matrix.dependencies == 'system' run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libsqlite3-dev ninja-build zlib1g-dev @@ -98,6 +100,8 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure run: > cmake -S tests/embedding -B build-embedding -A x64 @@ -120,6 +124,8 @@ jobs: sqlite: [MINIMAL, VENDORED] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Install Linux HTTP dependencies if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev @@ -150,6 +156,8 @@ jobs: mode: [system, fetched] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Install system dependencies if: matrix.mode == 'system' run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libsqlite3-dev zlib1g-dev @@ -195,6 +203,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure, install, and consume run: | cmake -G Ninja -S . -B build-package \ @@ -223,6 +233,8 @@ jobs: architectures: [arm64, "arm64;x86_64"] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure run: > cmake -G Ninja -S tests/embedding -B build-embedding @@ -247,6 +259,8 @@ jobs: zlib-provider: VENDORED steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure run: > cmake -G Xcode -S tests/embedding -B build-embedding @@ -266,6 +280,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Configure run: > cmake -G Ninja -S tests/embedding -B build-embedding diff --git a/.github/workflows/test-vcpkg.yml b/.github/workflows/test-vcpkg.yml index a93abedac..9a7ab536b 100644 --- a/.github/workflows/test-vcpkg.yml +++ b/.github/workflows/test-vcpkg.yml @@ -16,6 +16,10 @@ on: - main - dev +# Least-privilege GITHUB_TOKEN scope: this workflow only reads source and +# clones public vcpkg; it never writes to the repository. +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -31,6 +35,8 @@ jobs: os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Test release port promotion run: python tests/vcpkg/test-release-port.py - name: Verify native feature mappings @@ -50,6 +56,8 @@ jobs: features: [default, "minimal-sqlite;no-exceptions;no-logging"] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Bootstrap vcpkg run: | @@ -78,6 +86,8 @@ jobs: features: [default, minimal-sqlite, "minimal-sqlite;no-exceptions;no-logging"] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Bootstrap vcpkg run: | @@ -96,6 +106,8 @@ jobs: name: macOS (native) steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Bootstrap vcpkg run: | @@ -114,6 +126,8 @@ jobs: name: iOS (arm64-ios cross-compile) steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Bootstrap vcpkg run: | @@ -136,6 +150,8 @@ jobs: features: [default, minimal-sqlite, "minimal-sqlite;android-curl-openssl", "minimal-sqlite;android-curl-mbedtls", "minimal-sqlite;no-exceptions;no-logging;android-capi-http-client"] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Bootstrap vcpkg run: | diff --git a/.github/workflows/test-win-latest.yml b/.github/workflows/test-win-latest.yml index c6f19f8aa..bca46349c 100644 --- a/.github/workflows/test-win-latest.yml +++ b/.github/workflows/test-win-latest.yml @@ -50,6 +50,8 @@ jobs: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: setup-msbuild uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 @@ -80,6 +82,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - name: Compile each public header standalone under /W4 /WX shell: cmd run: tests\headers\check_public_headers.cmd From 6017c3a69f1090618c0573a73743342232a0d81d Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 18 Nov 2026 17:04:41 -0600 Subject: [PATCH 2/4] Skip private lib/modules during recursive submodule updates Dependabot clones with --recurse-submodules and cannot access the private cpp_client_telemetry_modules repository. Git then aborts the submodule update, leaving third_party/googletest fetched but not checked out. That dirty submodule makes every Dependabot github_actions update fail when it tries to commit. Setting update = none for lib/modules lets recursive clones without access succeed; authorized users fetch it explicitly with git submodule update --init --checkout lib/modules. Files changed: - .gitmodules - docs/building-with-vcpkg.md - docs/cpp-start-android.md - docs/cpp-start-ios.md - docs/cpp-start-linux.md - docs/cpp-start-macosx.md - docs/cpp-start-windows.md - docs/maintainer-onboarding.md - docs/xamarin.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e5009227-6b49-4803-8153-63d8d94037e3 --- .gitmodules | 4 ++++ docs/building-with-vcpkg.md | 9 ++++++--- docs/cpp-start-android.md | 2 +- docs/cpp-start-ios.md | 2 +- docs/cpp-start-linux.md | 2 +- docs/cpp-start-macosx.md | 2 +- docs/cpp-start-windows.md | 2 +- docs/maintainer-onboarding.md | 11 ++++++++--- docs/xamarin.md | 2 +- 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index 186328c0d..a66775c9d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,6 +2,10 @@ path = lib/modules url = ../cpp_client_telemetry_modules.git branch = master + # Private: skipped by default so recursive clones (and Dependabot) that lack + # access still check out the public submodules. Authorized users fetch it with + # `git submodule update --init --checkout lib/modules`. + update = none [submodule "third_party/googletest"] path = third_party/googletest diff --git a/docs/building-with-vcpkg.md b/docs/building-with-vcpkg.md index 92e945d73..0b9e20ccf 100644 --- a/docs/building-with-vcpkg.md +++ b/docs/building-with-vcpkg.md @@ -5,10 +5,13 @@ The port provides the core SDK — the `MSTelemetry::mat` target and its public C++ headers. The optional Microsoft-proprietary modules (Privacy Guard, Sanitizer, ECS/EXP, Compliant-by-Default, AFD, CDS) are not part of the public -package; to use those, build from a source checkout with submodules: +package; to use those, build from a source checkout with the private +`lib/modules` submodule (requires access to that repository): ```console git clone --recurse-submodules https://github.com/microsoft/cpp_client_telemetry +cd cpp_client_telemetry +git submodule update --init --checkout lib/modules # then build with the repo's own CMake/build scripts ``` @@ -583,8 +586,8 @@ Older revisions of this overlay port could build the SDK with the private `lib/modules` submodules from a local `--recurse-submodules` checkout. The port now builds the core SDK from a pinned upstream commit, and the `response_file_*.txt` shortcuts have been removed (use a standard triplet). If -you relied on the old flow for the proprietary modules, build from a -`--recurse-submodules` source checkout instead. +you relied on the old flow for the proprietary modules, build from a source +checkout with `lib/modules` fetched as shown at the top of this page instead. ## Troubleshooting diff --git a/docs/cpp-start-android.md b/docs/cpp-start-android.md index 8f02b05e7..aa6f32d01 100644 --- a/docs/cpp-start-android.md +++ b/docs/cpp-start-android.md @@ -4,7 +4,7 @@ This tutorial guides you through the process of integrating the 1DS SDK into you ## 1. Clone the repository -Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. +Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. ## 2. Build all diff --git a/docs/cpp-start-ios.md b/docs/cpp-start-ios.md index 6adf7b5cc..6d46d7163 100644 --- a/docs/cpp-start-ios.md +++ b/docs/cpp-start-ios.md @@ -4,7 +4,7 @@ This tutorial guides you through the process of integrating the 1DS SDK into you ## 1. Clone the repository -Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires any of the private modules (ECS, DefaultDataViewer, etc.), you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. +Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires any of the private modules (ECS, DefaultDataViewer, etc.), you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. ## 2. Build all diff --git a/docs/cpp-start-linux.md b/docs/cpp-start-linux.md index 17b7fa026..8ebfb7034 100644 --- a/docs/cpp-start-linux.md +++ b/docs/cpp-start-linux.md @@ -4,7 +4,7 @@ This tutorial guides you through the process of integrating the 1DS SDK into you ## 1. Clone the repository -Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. +Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. ## 2. Build all diff --git a/docs/cpp-start-macosx.md b/docs/cpp-start-macosx.md index b0312507b..69553d8cb 100644 --- a/docs/cpp-start-macosx.md +++ b/docs/cpp-start-macosx.md @@ -23,7 +23,7 @@ _**Note:** Preferably use Homebrew to install missing packages._ ### 1. Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo -If your project requires UTC to send telemetry, you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. +If your project requires UTC to send telemetry, you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. ### 2. You will be asked your credentials to clone the repo, use your username and password as entered on Github diff --git a/docs/cpp-start-windows.md b/docs/cpp-start-windows.md index 6479b5ed3..18440fd30 100644 --- a/docs/cpp-start-windows.md +++ b/docs/cpp-start-windows.md @@ -10,7 +10,7 @@ This tutorial guides you through the process of integrating the 1DS C++ SDK into to clone the repo. -If your project requires the Universal Telemetry Client (a.k.a. UTC) to send telemetry, you need to add `--recurse-submodules` while cloning to tell git to add `lib/modules` repo that contains various **proprietary** Microsoft modules, including UTC support. The access to proprietary modules can be obtained by Microsoft-authorized contributors [here](https://aka.ms/1ds.sdk.cpp). +If your project requires the Universal Telemetry Client (a.k.a. UTC) to send telemetry, you need to fetch the private `lib/modules` submodule, which contains various **proprietary** Microsoft modules, including UTC support. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. The access to proprietary modules can be obtained by Microsoft-authorized contributors [here](https://aka.ms/1ds.sdk.cpp). ### 2. You will be asked for your credentials to clone the repo. Generate a PAT token using GitHub UI, use your username and PAT token to clone the repo. See [Generating PAT token for command line clone](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) diff --git a/docs/maintainer-onboarding.md b/docs/maintainer-onboarding.md index fa7254b9b..566331e61 100644 --- a/docs/maintainer-onboarding.md +++ b/docs/maintainer-onboarding.md @@ -31,11 +31,15 @@ select materially different code. ## Access and repository layout The public repository contains the core SDK. Some Microsoft-only modules are -maintained separately under `lib/modules`. Clone recursively only when work -requires those modules and your GitHub account has access: +maintained separately under `lib/modules`. `.gitmodules` sets +`update = none` for that submodule so recursive clones without access (including +Dependabot) still succeed. Fetch it explicitly only when work requires those +modules and your GitHub account has access: ```powershell git clone --recurse-submodules https://github.com/microsoft/cpp_client_telemetry.git +cd cpp_client_telemetry +git submodule update --init --checkout lib/modules ``` The [modules repository](https://github.com/microsoft/cpp_client_telemetry_modules) @@ -48,7 +52,8 @@ Keep the SDK checkout ref in the modules repository's CI workflows aligned with a tested commit on this SDK's `main` branch so module tests cover current SDK changes. In the other direction, after module PRs merge, update the pinned `lib/modules` submodule commit in this SDK through a reviewed PR and validate the -combined build. A recursive clone checks out that pinned commit; it does not +combined build. `git submodule update --checkout lib/modules` checks out that +pinned commit; it does not automatically follow the modules repository's latest HEAD. Do not make core behavior accidentally depend on a private module. Builds that diff --git a/docs/xamarin.md b/docs/xamarin.md index f8b3440d6..955c4e394 100644 --- a/docs/xamarin.md +++ b/docs/xamarin.md @@ -10,7 +10,7 @@ This means that the wrappers and bindings create the following layers: ## 1. Clone the repository -Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. +Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token. ## 2. Pre-requisites From f4d0844f2581b74b79de117c91d6957d8939d70a Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 18 Nov 2026 17:25:19 -0600 Subject: [PATCH 3/4] Restore CI checks across current toolchains Include the integer type used by the standalone public header, and use an atomic shell noclobber lock in the runner test fixture so concurrent children are distinguished on Ubuntu 26.04. Files: lib/include/public/ICdsFactory.hpp, tests/build-runner-tests.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e5009227-6b49-4803-8153-63d8d94037e3 --- lib/include/public/ICdsFactory.hpp | 1 + tests/build-runner-tests.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/include/public/ICdsFactory.hpp b/lib/include/public/ICdsFactory.hpp index 312c3b210..3e209dde9 100644 --- a/lib/include/public/ICdsFactory.hpp +++ b/lib/include/public/ICdsFactory.hpp @@ -7,6 +7,7 @@ #include "ctmacros.hpp" +#include #include #include #include diff --git a/tests/build-runner-tests.py b/tests/build-runner-tests.py index 8360c1142..d7cf4d52c 100644 --- a/tests/build-runner-tests.py +++ b/tests/build-runner-tests.py @@ -33,7 +33,8 @@ def setUp(self): self.write_script( "out/tests/functests/FuncTests", 'printf "concurrent %s\\n" "$*" >> "$CALLS"\n' - 'if mkdir "$CASE_ROOT/first-child" 2>/dev/null; then\n' + # Some mkdir implementations can report success to both contenders. + 'if (set -C; : > "$CASE_ROOT/first-child") 2>/dev/null; then\n' ' sleep 0.05\n' ' echo first-finished >> "$CALLS"\n' ' exit "${FIRST_RESULT:-0}"\n' From 36d9726924d8378bc83699229c894f57eff47338 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Thu, 19 Nov 2026 12:59:18 -0600 Subject: [PATCH 4/4] Fail closed on missing source and avoid logging credentials Stop dumping environment variables, fail CodeQL and spellcheck when checkout fails, and remove a sanitizer warning suppression that the pinned module no longer needs. Files: .github/workflows/build-android.yml, .github/workflows/codeql-analysis.yml, .github/workflows/spellcheck.yml, lib/CMakeLists.txt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e5009227-6b49-4803-8153-63d8d94037e3 --- .github/workflows/build-android.yml | 1 - .github/workflows/codeql-analysis.yml | 3 --- .github/workflows/spellcheck.yml | 1 - lib/CMakeLists.txt | 9 --------- 4 files changed, 14 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 129be2dfb..b524af6df 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -123,7 +123,6 @@ jobs: - name: Install NDK run: | java -version - gci env:* | sort-object name new-item "$Env:USERPROFILE\.android\repositories.cfg" -ItemType "file" echo yes | sdkmanager "ndk-bundle" "cmake;3.22.1" "ndk;27.0.12077973" --sdk_root=$Env:ANDROID_SDK_ROOT - name: Chocolatey diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 134e6d49a..a28c26ace 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,6 @@ jobs: uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: persist-credentials: false - continue-on-error: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -118,7 +117,6 @@ jobs: uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: persist-credentials: false - continue-on-error: true - name: Update submodules run: | @@ -143,7 +141,6 @@ jobs: - name: Install NDK run: | java -version - gci env:* | sort-object name new-item "$Env:USERPROFILE\.android\repositories.cfg" -ItemType "file" echo yes | sdkmanager "ndk-bundle" "cmake;3.22.1" "ndk;27.0.12077973" --sdk_root=$Env:ANDROID_SDK_ROOT - name: Chocolatey diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 35a59d507..79795ce78 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -27,7 +27,6 @@ jobs: uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: persist-credentials: false - continue-on-error: true - name: install misspell env: diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d44de8ab6..40228d206 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -154,15 +154,6 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/sanitizer/" AND MATSDK_BUILD_SANI modules/sanitizer/SanitizerTrie.cpp modules/sanitizer/SanitizerTrieNode.cpp ) - # Suppress -Wreorder for Sanitizer.cpp only: the submodule declares - # m_sanitizerprovider before m_notificationEventName in Sanitizer.hpp - # but the constructor init list reverses that order. The proper fix - # belongs in the lib/modules submodule; this scopes the suppression - # until that is done. - if(NOT MSVC) - set_source_files_properties(modules/sanitizer/Sanitizer.cpp - PROPERTIES COMPILE_FLAGS "-Wno-reorder") - endif() endif() set(MATSDK_OBJC_PRIVACYGUARD_AVAILABLE OFF)