-
Notifications
You must be signed in to change notification settings - Fork 0
feat: migrate to soldeer + bump rainix to rainlanguage/rainix main #56
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
Changes from all commits
a6c3cf7
bff6a97
b1f3f7b
b7ffa9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: Publish to Soldeer | ||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| jobs: | ||
| publish: | ||
| uses: rainlanguage/rainix/.github/workflows/publish-soldeer.yaml@main | ||
| secrets: inherit | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider restricting inherited secrets.
Once the workflow is pinned to a commit hash, this pattern may be acceptable depending on organizational standards. Alternatively, explicitly pass only required secrets. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,6 @@ | ||
| name: Rainix CI | ||
| name: rainix | ||
| on: [push] | ||
|
|
||
| jobs: | ||
| standard-tests: | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| task: [rainix-sol-test, rainix-sol-static, rainix-sol-legal] | ||
| fail-fast: false | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: nixbuild/nix-quick-install-action@v30 | ||
| with: | ||
| nix_conf: | | ||
| keep-env-derivations = true | ||
| keep-outputs = true | ||
| - name: Restore and save Nix store | ||
| uses: nix-community/cache-nix-action@v6 | ||
| with: | ||
| # restore and save a cache using this key | ||
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | ||
| # if there's no cache hit, restore a cache by this prefix | ||
| restore-prefixes-first-match: nix-${{ runner.os }}- | ||
| # collect garbage until the Nix store size (in bytes) is at most this number | ||
| # before trying to save a new cache | ||
| # 1G = 1073741824 | ||
| gc-max-store-size-linux: 1G | ||
|
|
||
| - run: nix develop -c rainix-sol-prelude | ||
|
|
||
| - name: Run ${{ matrix.task }} | ||
| env: | ||
| ETH_RPC_URL: ${{ secrets.CI_DEPLOY_RPC_URL }} | ||
| ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }} | ||
| DEPLOY_VERIFIER: '' | ||
| run: nix develop -c ${{ matrix.task }} | ||
| rainix: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
ls -la .github/workflows || true
sed -n '1,120p' .github/workflows/rainix.yaml
echo "----"
rg -n --hidden --no-ignore -S "uses:\s*rainlanguage/rainix/\.github/workflows/.*@[^[:space:]]+" .github/workflows/rainix.yaml || true
rg -n --hidden --no-ignore -S "uses:\s*rainlanguage/rainix/\.github/workflows/.*@[^[:space:]]+" .github/workflows || trueRepository: rainlanguage/rain.raindex.interface Length of output: 807 Pin the reusable workflow reference(s) to an immutable commit SHA Suggested fix- uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main
+ uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@<full_commit_sha>🧰 Tools🪛 zizmor (1.25.2)[error] 5-5: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [warning] 5-5: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow (secrets-inherit) 🤖 Prompt for AI Agents |
||
| secrets: inherit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| cache | ||
| dependencies | ||
| out | ||
| .fixes | ||
| .fixes | ||
| .env | ||
| .pre-commit-config.yaml |
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| forge-std-1.16.1/=dependencies/forge-std-1.16.1/ | ||
| rain-interpreter-interface-0.1.0/=dependencies/rain-interpreter-interface-0.1.0/ | ||
| rain-math-float-0.1.1/=dependencies/rain-math-float-0.1.1/ |
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.
Pin the reusable workflow to a specific commit hash.
The workflow reference uses
@maininstead of a commit SHA. Static analysis flags this as violating a blanket policy and enabling supply chain attacks. If the external workflow is modified (maliciously or accidentally), this workflow will automatically use the new version without review.🔒 Recommended fix
Replace
<commit-sha>with the full commit hash of the desired version fromrainlanguage/rainix. You can find this by visiting the repository and copying the commit SHA of the workflow file you want to use.🧰 Tools
🪛 zizmor (1.25.2)
[error] 8-8: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 8-8: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow
(secrets-inherit)
🤖 Prompt for AI Agents