-
Notifications
You must be signed in to change notification settings - Fork 34
Live Share SDK 2.0.0 #794
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
base: main
Are you sure you want to change the base?
Live Share SDK 2.0.0 #794
Conversation
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
… bug in `LiveCanvas`, and upgraded Fluid version (#775)
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: Ryan Bliss <[email protected]> Co-authored-by: James Hunt <[email protected]>
…bo package (#781) Co-authored-by: James Hunt <[email protected]> Co-authored-by: Ryan Bliss <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
…fter npm install, other V2 prep (#786) Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]> Co-authored-by: Ryan Bliss <[email protected]>
…m support (#791) Co-authored-by: James Hunt <[email protected]>
…0.0, removed references to live-share-turbo
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: James Hunt <[email protected]>
Co-authored-by: huntj88 <[email protected]> Co-authored-by: James Hunt <[email protected]>
Co-authored-by: huntj88 <[email protected]> Co-authored-by: Ryan Bliss <[email protected]>
Co-authored-by: James Hunt <[email protected]>
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 22.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "npm" | ||
| - run: npm --loglevel verbose ci --ignore-scripts | ||
| timeout-minutes: 20 | ||
|
|
||
| - run: npm install jest | ||
| working-directory: samples/javascript/02.react-video | ||
|
|
||
| - name: "build packages and samples" | ||
| run: npm run build | ||
|
|
||
| # TODO: get scenario_test.sh working | ||
|
|
||
| # - name: "test 02.react-video sample" | ||
| # shell: "bash" | ||
| # run: sh ../../../.github/workflows/scenario_test.sh | ||
| # working-directory: samples/javascript/02.react-video |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the issue, add a permissions block with least-privilege required by the workflow. As all current steps only read repository contents and never write to them (e.g., no pushes, PR creation, artifact upload), the minimal needed permission is for reading repository contents (contents: read).
The CodeQL warning suggests placing the permissions block either at the workflow root or inside the job. Adding it at the root ensures it applies to all jobs (present and future) unless overridden.
Edit the file .github/workflows/live-share-build-samples.yaml, and add the following block near the top, after the name: field and before/until jobs:. Ensure proper indentation and spacing. No new imports or methods are needed.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Build Live Share SDK samples | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 22.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "npm" | ||
|
|
||
| - run: npm --loglevel verbose ci --ignore-scripts | ||
| timeout-minutes: 20 | ||
|
|
||
| - name: "check formatting" | ||
| run: "bash checkFormatting.sh" | ||
| working-directory: .github/workflows |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, add a permissions block to the workflow YAML to explicitly restrict the privileges granted to the GitHub Actions jobs. The block can be set either at the root (applies to all jobs) or inside each job. The best practice is to set the minimum permissions needed; for most formatting checks and “checkout”/read operations, contents: read is sufficient.
- Add the following block
'permissions:\n contents: read'right after thename:line (global) or inside thejobs/build:job (per-job). - Since all steps shown only read files, run bash scripts, and do not publish or modify repo contents,
contents: readis appropriate. - No changes to imports, extra method definitions, or downstream workflow content are needed.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Check formatting | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 22.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "npm" | ||
| - run: npm --loglevel verbose ci --ignore-scripts | ||
| timeout-minutes: 20 | ||
|
|
||
| - run: npm run prepare # will trigger a build of all packages | ||
|
|
||
| - name: "test live-share" | ||
| run: npm run test | ||
| working-directory: packages/live-share | ||
|
|
||
| - name: "test live-share-canvas" | ||
| run: npm run test | ||
| working-directory: packages/live-share-canvas | ||
|
|
||
| - name: "test live-share-media" | ||
| run: npm run test | ||
| working-directory: packages/live-share-media |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, we need to add a permissions: block specifying the least required privileges for the workflow. As all steps only need access to repository contents, the recommended setting is contents: read. This should be added near the top of the workflow file—directly after name: and before on:, so that it applies to the entire workflow (and therefore, all jobs within it). No code functionality is changed; just the permissions granted to the workflow's GITHUB_TOKEN. No imports or additional definitions are required.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Test Live Share SDK packages | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 22.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "npm" | ||
| - run: npm --loglevel verbose ci --ignore-scripts | ||
| timeout-minutes: 20 | ||
|
|
||
| - run: npm run prepare # will trigger a build of all packages | ||
|
|
||
| - name: "test live-share with cjs app" | ||
| run: npm run test | ||
| working-directory: internal/usage-test/cjs-test | ||
|
|
||
| - name: "test live-share with esm app" | ||
| run: npm run test | ||
| working-directory: internal/usage-test/esm-test | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| name: Install pnpm for next step | ||
| with: | ||
| version: 9 | ||
| run_install: false | ||
| - name: "test live-share with pnpm typescript esm app" | ||
| run: pnpm run test | ||
| working-directory: internal/usage-test/pnpm-test |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To resolve this issue, you should add an explicit permissions block to the workflow (or to the relevant job, if you want finer control). In this workflow, the safest minimal permissions can be set with contents: read, which allows jobs to check out code but not to write to repository contents. Insert the permissions block either at the root of the workflow file (to apply to all jobs), or just under the build: job definition. The recommended convention is to apply this at the top level, immediately after the name: and before the on: block. No imports or external dependencies are needed; this is a one-line YAML edit.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Test Usage of Live Share SDK packages in different JS environments | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
No description provided.