-
Notifications
You must be signed in to change notification settings - Fork 0
soldeer migration #33
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
53dcb1a
74d7a9f
6a69720
e69c31b
63107e8
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 |
|---|---|---|
| @@ -1,26 +1,33 @@ | ||
| name: Git is clean | ||
| on: [push] | ||
|
|
||
| jobs: | ||
| git-clean: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: nixbuild/nix-quick-install-action@v30 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: DeterminateSystems/nix-installer-action@main | ||
| - uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
|
||
| # Build metas etc. required to do a correct pointer build. | ||
| - run: nix develop -c rain-flare-prelude | ||
|
|
||
| - run: nix develop -c forge script ./script/BuildPointers.sol | ||
|
|
||
| # Format the repo after generating pointers so that the pointer files are | ||
| # formatted too. | ||
| - run: nix develop -c forge fmt | ||
|
|
||
| # Check if the repo is clean after generating pointers and formatting. | ||
| - run: git diff --exit-code | ||
| nix_conf: | | ||
| keep-env-derivations = true | ||
| keep-outputs = true | ||
| - name: Restore and save Nix store | ||
| uses: nix-community/cache-nix-action@v6 | ||
| with: | ||
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | ||
| restore-prefixes-first-match: nix-${{ runner.os }}- | ||
| gc-max-store-size-linux: 1G | ||
| - name: Install soldeer dependencies | ||
| if: hashFiles('soldeer.lock') != '' | ||
| run: nix develop github:rainlanguage/rainix#sol-shell -c forge soldeer install | ||
| - name: Regenerate meta files | ||
| run: nix run .#rain-flare-prelude | ||
| - name: Regenerate pointer artifacts | ||
| run: nix develop github:rainlanguage/rainix#sol-shell -c forge script ./script/BuildPointers.sol | ||
| - name: Format | ||
| run: nix develop github:rainlanguage/rainix#sol-shell -c forge fmt | ||
| - name: Assert committed artifacts match freshly built | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "::error::Committed meta or pointer artifacts are stale. Regenerate and commit." | ||
| exit 1 | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Manual sol artifacts | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| suite: | ||
| description: "The suite to deploy" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - flare-ftso-words | ||
| jobs: | ||
| deploy: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-manual-sol-artifacts.yaml@main | ||
| with: | ||
| suite: ${{ inputs.suite }} | ||
| secrets: inherit |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| 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. 🧩 Analysis chain🏁 Script executed: # First, let's find and read the workflow file
find . -name "publish-soldeer.yaml" -type fRepository: rainlanguage/rain.flare Length of output: 108 🏁 Script executed: # Look for GitHub workflow files to understand the repository structure
git ls-files '.github/workflows/'Repository: rainlanguage/rain.flare Length of output: 217 🏁 Script executed: cat -n .github/workflows/publish-soldeer.yamlRepository: rainlanguage/rain.flare Length of output: 289 🏁 Script executed: # Let's check if there are other workflow files that might show patterns for secret passing
cat -n .github/workflows/git-clean.yamlRepository: rainlanguage/rain.flare Length of output: 1616 🏁 Script executed: # Check for any documentation or comments about what secrets are needed
rg -i "secret" .github/workflows/ -A 2 -B 2Repository: rainlanguage/rain.flare Length of output: 698 🏁 Script executed: # Let's check if there's any documentation about required secrets
rg "secrets" . --type md -iRepository: rainlanguage/rain.flare Length of output: 49 🏁 Script executed: # Check if there's a README or docs that mention secrets
find . -name "README*" -o -name "SECURITY*" -o -name "docs" -type dRepository: rainlanguage/rain.flare Length of output: 79 🏁 Script executed: # Check all workflow files for secret usage patterns
cat -n .github/workflows/rainix-sol.yamlRepository: rainlanguage/rain.flare Length of output: 247 🏁 Script executed: # Let's check the README to understand the repository structure and any notes about secrets
cat -n README.md | head -100Repository: rainlanguage/rain.flare Length of output: 4739 🏁 Script executed: # Check if there are any GitHub environment files or configuration
find . -name ".env*" -o -name "*.env" | head -20Repository: rainlanguage/rain.flare Length of output: 49 🏁 Script executed: # Search for any credential or token references in the workflows
rg "token|credential|auth" .github/workflows/ -iRepository: rainlanguage/rain.flare Length of output: 49 🏁 Script executed: # Let's search for any soldeer-related configuration or documentation
rg "soldeer" . -i -A 3Repository: rainlanguage/rain.flare Length of output: 3651 🏁 Script executed: # Check if there's a flake.nix that might hint at what dependencies/secrets are needed
if [ -f flake.nix ]; then cat -n flake.nix | head -50; fiRepository: rainlanguage/rain.flare Length of output: 1759 🏁 Script executed: # Let's check if there are any comments or documentation about what secrets are needed
rg "github.com/rainlanguage/rainix" . -A 5 -B 5Repository: rainlanguage/rain.flare Length of output: 49 🏁 Script executed: # Search for any environment or secrets configuration in the workflows
rg "env|SECRETS|token" .github/workflows/ -iRepository: rainlanguage/rain.flare Length of output: 320 🏁 Script executed: # Let's check if there are any other GitHub workflows in the rainix repository reference
rg "rainlanguage/rainix" . -rRepository: rainlanguage/rain.flare Length of output: 481 🏁 Script executed: # Let's look at the manual-sol-artifacts workflow to understand the pattern
cat -n .github/workflows/manual-sol-artifacts.yamlRepository: rainlanguage/rain.flare Length of output: 555 🌐 Web query:
💡 Result: GitHub Actions secrets inheritance refers to the Citations:
Pass only required secrets explicitly; avoid Line 8 forwards all secrets to an external reusable workflow, which increases exposure and violates least-privilege boundaries. Instead, explicitly pass only the secrets needed for the publish operation (e.g., 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: rainix-sol | ||
| on: [push] | ||
| jobs: | ||
| rainix-sol: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main | ||
| secrets: inherit |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| .DS_Store | ||
| .cargo | ||
| .coderabbit.yaml | ||
| .devcontainer.json | ||
| .envrc | ||
| .gas-snapshot | ||
| .git | ||
| .github | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .soldeerignore | ||
| .vscode | ||
| CLAUDE.md | ||
| /audit | ||
| /cache | ||
| /dependencies | ||
| /flake.lock | ||
| /flake.nix | ||
| /foundry.lock | ||
| /foundry.toml | ||
| /lib | ||
| /out | ||
| /remappings.txt | ||
| /slither.config.json | ||
| /soldeer.lock | ||
| /REUSE.toml | ||
| /deployments | ||
| /meta |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) <year> <copyright holders> | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
| associated documentation files (the "Software"), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the | ||
| following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all copies or substantial | ||
| portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
| LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO | ||
| EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
| USE OR OTHER DEALINGS IN THE SOFTWARE. |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: rainlanguage/rain.flare
Length of output: 487
Pin reusable workflow to an immutable commit SHA.
Line 7 uses
@main, which is mutable and can change behavior/security without changes in this repo. Pin to a full commit SHA for reproducibility and supply-chain safety. This issue affects multiple workflow files in the repository (.github/workflows/rainix-sol.yaml:5 and manual-sol-artifacts.yaml:13 also use@main).Suggested change
🤖 Prompt for AI Agents