Skip to content

feat: sessions swift demo#173

Merged
jackpooleyml merged 2 commits intomainfrom
jack/swift-sessions-demo
Aug 22, 2025
Merged

feat: sessions swift demo#173
jackpooleyml merged 2 commits intomainfrom
jack/swift-sessions-demo

Conversation

@jackpooleyml
Copy link
Contributor

@jackpooleyml jackpooleyml commented Aug 18, 2025

Description

This is the first in a series of PRs implementing example code for SSO Sessions in the Swift Example app.

This PR includes:

  • Session creation
  • Session revocation

Future PRs will add:

  • Sending a session transaction

@jackpooleyml jackpooleyml force-pushed the jack/swift-sessions-demo branch 7 times, most recently from 02abd88 to 4156b29 Compare August 20, 2025 13:32
Comment on lines 11 to 73
name: Rust SDK - latest
runs-on: ubuntu-latest
strategy:
matrix:
config:
- debug
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4

- name: Install Rust
run: |
rustup update stable && rustup default stable
rustup toolchain install nightly

- name: Run rustfmt
run: |
rustup component add rustfmt --toolchain nightly
cargo +nightly fmt --all -- --check
working-directory: packages/sdk-platforms/rust/zksync-sso

- name: Install Anvil ZKsync Manually
run: |
SCRIPT_PATH=".github/workflows/scripts/install-anvil-zksync.sh"
chmod +x "$SCRIPT_PATH"
sh "$SCRIPT_PATH"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.11.0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/Iron
cache: pnpm

- name: Install dependencies
run: pnpm install -r --frozen-lockfile

- name: Install contract dependencies
run: pnpm install -r --frozen-lockfile
working-directory: packages/contracts

- name: Build contracts
run: pnpm build
working-directory: packages/contracts

- name: Run clippy
run: |
rustup component add clippy --toolchain stable
cargo clippy --all-targets -- -D warnings
working-directory: packages/sdk-platforms/rust/zksync-sso

- name: Run rust tests
run: cargo test
working-directory: packages/sdk-platforms/rust/zksync-sso No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

To fix the problem, you should add a permissions block to the workflow to explicitly restrict the permissions granted to the GITHUB_TOKEN. The best way to do this is to add the block at the root level of the workflow file, so it applies to all jobs unless overridden. Since the workflow only checks out code, installs dependencies, builds, and runs tests, it does not appear to require any write permissions. Therefore, the minimal starting point is to set contents: read, which allows the workflow to read repository contents but not modify them. This change should be made at the top level of .github/workflows/ci-rust.yml, immediately after the name field and before the on field.

Suggested changeset 1
.github/workflows/ci-rust.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml
--- a/.github/workflows/ci-rust.yml
+++ b/.github/workflows/ci-rust.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: Rust CI
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: Rust CI

on:
Copilot is powered by AI and may make mistakes. Always verify output.
@jackpooleyml jackpooleyml force-pushed the jack/swift-sessions-demo branch 2 times, most recently from a8c8895 to 608559c Compare August 20, 2025 14:20
@jackpooleyml jackpooleyml force-pushed the jack/swift-sessions-demo branch from 519df56 to 96320ae Compare August 20, 2025 15:56
@jackpooleyml jackpooleyml marked this pull request as ready for review August 20, 2025 15:56
@jackpooleyml jackpooleyml requested a review from cpb8010 August 20, 2025 15:57
Copy link
Contributor

@cpb8010 cpb8010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this based on the CI passing!

@cpb8010 cpb8010 added the enhancement New feature or request label Aug 21, 2025
@jackpooleyml jackpooleyml enabled auto-merge (squash) August 22, 2025 12:38
@jackpooleyml jackpooleyml disabled auto-merge August 22, 2025 12:39
@jackpooleyml jackpooleyml merged commit 4340d49 into main Aug 22, 2025
10 checks passed
@jackpooleyml jackpooleyml deleted the jack/swift-sessions-demo branch August 22, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants