-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add the manual verify caller #32
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e5e6102
ci: add the manual verify caller
thedavidmeister 2ad3bcd
ci: read the verify address and explorers, do not type them
thedavidmeister 19ae01a
ci: let rainix read the explorers
thedavidmeister 225bb01
ci: trim the verify comments
thedavidmeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Manual sol verify | ||
| # Explorer source verification for a contract ALREADY on chain, run by hand. | ||
| # | ||
| # The deploy is deterministic and so idempotent: re-dispatching `Manual sol | ||
| # artifacts` broadcasts nothing and leaves `--verify` nothing to submit, so a | ||
| # deploy that lands and then fails verification needs this instead. | ||
| # | ||
| # Never broadcasts, takes no deploy key. Explorers come from `[etherscan]`, read | ||
| # by rainix. | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| contract: | ||
| description: "Contract to verify" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| # The log tables have no Solidity source to match, being a data | ||
| # contract wrapping table bytes. | ||
| - DecimalFloat | ||
| jobs: | ||
| # The address is read, not typed: it moves with the creation code, and a | ||
| # literal would submit source against whatever used to be at it. An input | ||
| # cannot read a file, hence a job. | ||
| resolve: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| contract: ${{ steps.pins.outputs.contract }} | ||
| address: ${{ steps.pins.outputs.address }} | ||
| steps: | ||
| - uses: rainlanguage/rainix/.github/actions/checkout@main | ||
| - id: pins | ||
| env: | ||
| CONTRACT: ${{ inputs.contract }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # `|| true`: under pipefail a no-match grep exits 1 and would kill the | ||
| # step before the check below could say what was missing. | ||
| snapshot="src/generated/candidate/$CONTRACT.sol" | ||
| address="$(grep -oE 'DEPLOYED_ADDRESS = address\(0x[0-9a-fA-F]{40}\)' "$snapshot" \ | ||
| | grep -oE '0x[0-9a-fA-F]{40}' || true)" | ||
|
|
||
| if [ -z "$address" ] | ||
| then | ||
| echo "::error::no DEPLOYED_ADDRESS in $snapshot" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "verifying $CONTRACT at $address" | ||
| { | ||
| echo "contract=src/concrete/$CONTRACT.sol:$CONTRACT" | ||
| echo "address=$address" | ||
| } >> "$GITHUB_OUTPUT" | ||
| verify: | ||
| needs: resolve | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-manual-sol-verify.yaml@main | ||
| with: | ||
| contract: ${{ needs.resolve.outputs.contract }} | ||
| address: ${{ needs.resolve.outputs.address }} | ||
| secrets: inherit | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🔒 Security & Privacy | 🛡️ Detected with Advanced Tier | 🔵 Trivial | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: rainlanguage/rain.math.float.deploy
Length of output: 3810
🏁 Script executed:
Repository: rainlanguage/rain.math.float.deploy
Length of output: 306
🤖 get_repo_knowledge executed:
get_repo_knowledge rainlanguage/rain.math.float.deploy /tmp/coderabbit-repo-knowledge/rainlanguage-rain-math-float-deploy-b0a7e9fdLength of output: 742
🏁 Script executed:
Repository: rainlanguage/rain.math.float.deploy
Length of output: 3506
🏁 Script executed:
Repository: rainlanguage/rain.math.float.deploy
Length of output: 15824
Security Misconfiguration
Reachability: Internal
Exploitability: Difficult
CWE: CWE-829 — Inclusion of Functionality from Untrusted Control Sphere
Pin the reusable workflow to a reviewed commit. The current workflow receives verification and Cachix credentials, but it does not receive a deploy key. A later change to
rainlanguage/rainix@maincould still execute with those inherited credentials. Pin this reusable workflow to a full commit SHA and update it through review.🧰 Tools
🪛 zizmor (1.30.0)
[warning] 1-47: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 40-47: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[error] 41-41: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 41-41: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow
(secrets-inherit)
View in Security blast radius
🤖 Prompt for AI Agents