Skip to content

feat: added yarn protection config (SC-294)#6

Merged
0xfarhaan merged 2 commits into
mainfrom
sc-294
Jun 15, 2026
Merged

feat: added yarn protection config (SC-294)#6
0xfarhaan merged 2 commits into
mainfrom
sc-294

Conversation

@calmacfadden

@calmacfadden calmacfadden commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Chores

  • Enhanced CI/CD pipeline security by adding explicit GitHub Actions permissions and hard-pinning all workflow actions to specific commit versions to prevent supply-chain attacks
  • Strengthened package dependency security through enforced Yarn configuration, including disabled script execution, enforced node_modules linking, and npm package age-gate policies
  • Added explicit package manager version declaration to the project configuration

Signed-off-by: Cal Mac Fadden <108666242+calmacfadden@users.noreply.github.com>
@calmacfadden calmacfadden self-assigned this Jun 15, 2026
@calmacfadden calmacfadden added the enhancement New feature or request label Jun 15, 2026
@calmacfadden calmacfadden requested a review from a team as a code owner June 15, 2026 06:56
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR hardens the CI supply chain by adding Yarn guardrails (enableScripts: false, nodeLinker: node-modules, npmMinimalAgeGate: 10080 in .yarnrc.yml, packageManager pin in package.json), introducing a Corepack-based yarn-install CI job that validates those settings, pinning all third-party GitHub Actions to commit SHAs, and adding explicit least-privilege permissions to each workflow job.

Changes

CI Supply-Chain Hardening

Layer / File(s) Summary
Yarn supply-chain config and guarded install job
.yarnrc.yml, package.json, .github/workflows/ci.yml
.yarnrc.yml adds enableScripts: false, nodeLinker: node-modules, and npmMinimalAgeGate: 10080; package.json pins packageManager to yarn@4.16.0; CI gains top-level permissions: contents: read, a new yarn-install job that enables Corepack, validates the .yarnrc.yml settings via shell assertions, and runs corepack yarn install --immutable, plus pinned SHAs for actions/checkout and foundry-rs/foundry-toolchain in the test job.
SHA pinning and explicit permissions across all jobs
.github/workflows/ci.yml
actions/upload-artifact is pinned to a commit SHA in the size job; actions/checkout and foundry-rs/foundry-toolchain are pinned in the size job; coverage job gains checks: write and pull-requests: write with pinned checkout/toolchain actions; zgosalvez/github-actions-report-lcov is pinned; gas job gains issues: write and pull-requests: write with actions/download-artifact and mshick/add-pr-comment pinned to SHAs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, the bunnies pin each action tight,
No sneaky scripts shall run in the night!
Corepack guards the yarn with immutable care,
SHA hashes locked in the workflow with flair.
The supply chain is safe — this rabbit declares! 🔒

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the changeset: adding Yarn protection configuration through updates to CI workflow, .yarnrc.yml, and package.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sc-294

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
| contracts/MapleBorrowerActions.sol:MapleBorrowerActions Contract |                 |      |        |      |         |
| Deployment Cost                                                  | Deployment Size |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
|                                                                0 |            1152 |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
|                                                                  |                 |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
| Function Name                                                    | Min             | Avg  | Median | Max  | # Calls |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
| acceptLoanTerms                                                  |            6311 | 6422 |   6422 | 6533 |       2 |
| contracts/MplUserActions.sol:MplUserActions Contract |                 |        |        |        |         |
| Deployment Cost                                      | Deployment Size |        |        |        |         |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                    0 |            7621 |        |        |        |         |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                      |                 |        |        |        |         |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                                        | Min             | Avg    | Median | Max    | # Calls |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| migrateAndStake                                      |           22530 |  95425 |  55304 | 261745 |      10 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| migrateAndStakeWithPermit                            |           30800 |  92311 |  58483 | 297599 |      13 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| migrator                                             |             462 |    462 |    462 |    462 |       1 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| mpl                                                  |             417 |    417 |    417 |    417 |       1 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| redeemAndMigrate                                     |           22596 |  85170 |  37881 | 188864 |      10 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| redeemAndMigrateAndStake                             |           22574 | 110004 |  37859 | 302645 |      10 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| redeemAndMigrateAndStakeWithPermit                   |           31169 | 104156 |  64990 | 348536 |      13 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| redeemAndMigrateWithPermit                           |           31147 |  90198 |  64968 | 234720 |      13 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| stsyrup                                              |             374 |    374 |    374 |    374 |       1 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| syrup                                                |             373 |    373 |    373 |    373 |       1 |
|------------------------------------------------------+-----------------+--------+--------+--------+---------|
| xmpl                                                 |             396 |    396 |    396 |    396 |       1 |
| contracts/SyrupDrip.sol:SyrupDrip Contract |                 |        |        |        |         |
| Deployment Cost                            | Deployment Size |        |        |        |         |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
|                                          0 |            8456 |        |        |        |         |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
|                                            |                 |        |        |        |         |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                              | Min             | Avg    | Median | Max    | # Calls |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| allocate                                   |           28626 |  93487 |  99687 | 106250 |      76 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| asset                                      |             440 |    440 |    440 |    440 |       1 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| bitmaps                                    |            2843 |   2843 |   2843 |   2843 |    4232 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| claim                                      |           27609 |  64850 |  74641 |  96723 |      49 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| claimAndStake                              |           25184 | 228126 | 234448 | 238091 |     548 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| deadline                                   |            2448 |   2448 |   2448 |   2448 |       5 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| globals                                    |             417 |    417 |    417 |    417 |       1 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| isClaimed                                  |            3223 |   3223 |   3223 |   3223 |      33 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| maxId                                      |            2491 |   2491 |   2491 |   2491 |       4 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| reclaim                                    |           28197 |  48639 |  42116 |  74403 |      10 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| root                                       |            2534 |   2534 |   2534 |   2534 |       5 |
|--------------------------------------------+-----------------+--------+--------+--------+---------|
| stakedSyrup                                |             373 |    373 |    373 |    373 |       1 |
| contracts/SyrupRouter.sol:SyrupRouter Contract |                 |        |        |        |         |
| Deployment Cost                                | Deployment Size |        |        |        |         |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                              0 |            9444 |        |        |        |         |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                |                 |        |        |        |         |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                                  | Min             | Avg    | Median | Max    | # Calls |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| asset                                          |             401 |    401 |    401 |    401 |       1 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| authorizeAndDeposit                            |           23859 |  70775 |  41230 | 176782 |       4 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| authorizeAndDepositWithPermit                  |           25053 |  83173 |  42424 | 222790 |       4 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| deposit                                        |           29015 |  83040 |  39002 | 159123 |       5 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| depositWithPermit                              |           33838 | 122989 | 104075 | 216689 |       7 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| nonces                                         |            2881 |   2881 |   2881 |   2881 |       4 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| pool                                           |             379 |    379 |    379 |    379 |       1 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| poolManager                                    |             444 |    444 |    444 |    444 |       1 |
|------------------------------------------------+-----------------+--------+--------+--------+---------|
| poolPermissionManager                          |             466 |    466 |    466 |    466 |       1 |
| contracts/SyrupUserActions.sol:SyrupUserActions Contract |                 |        |        |        |         |
| Deployment Cost                                          | Deployment Size |        |        |        |         |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                        0 |            8450 |        |        |        |         |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                          |                 |        |        |        |         |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                                            | Min             | Avg    | Median | Max    | # Calls |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| BAL_VAULT                                                |             461 |    461 |    461 |    461 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| PSM_PRECISION                                            |             347 |    347 |    347 |    347 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| USDC                                                     |             373 |    373 |    373 |    373 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| dai                                                      |             483 |    483 |    483 |    483 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| poolId                                                   |             370 |    370 |    370 |    370 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| psm                                                      |             374 |    374 |    374 |    374 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| sDai                                                     |             462 |    462 |    462 |    462 |       1 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| swapToDai                                                |           95574 | 477131 | 480410 | 532264 |     526 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| swapToDaiWithPermit                                      |           38190 | 512078 | 519119 | 586082 |     530 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| swapToUsdc                                               |           95597 | 601294 | 633822 | 742476 |     805 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| swapToUsdcWithPermit                                     |           38145 | 626021 | 602619 | 796226 |     530 |
|----------------------------------------------------------+-----------------+--------+--------+--------+---------|
| syrupUsdc                                                |             396 |    396 |    396 |    396 |       1 |
| contracts/utils/SyrupRateProvider.sol:SyrupRateProvider Contract |                 |      |        |      |         |
| Deployment Cost                                                  | Deployment Size |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
|                                                                0 |            1006 |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
|                                                                  |                 |      |        |      |         |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
| Function Name                                                    | Min             | Avg  | Median | Max  | # Calls |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
| getRate                                                          |            6424 | 6424 |   6424 | 6424 |       2 |
|------------------------------------------------------------------+-----------------+------+--------+------+---------|
| pool                                                             |             356 |  356 |    356 |  356 |       1 |
| modules/globals-v2/contracts/MapleGlobals.sol:MapleGlobals Contract |                 |       |        |       |         |
| Deployment Cost                                                     | Deployment Size |       |        |       |         |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                             5638881 |           25975 |       |        |       |         |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                                     |                 |       |        |       |         |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                                       | Min             | Avg   | Median | Max   | # Calls |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| governor                                                            |            2878 |  2878 |   2878 |  2878 |      50 |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| mapleTreasury                                                       |            2623 |  2623 |   2623 |  2623 |      77 |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| operationalAdmin                                                    |            2606 |  2606 |   2606 |  2606 |      37 |
|---------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| setOperationalAdmin                                                 |           26830 | 26830 |  26830 | 26830 |      77 |
| modules/maple-token/contracts/MapleToken.sol:MapleToken Contract |                 |       |        |       |         |
| Deployment Cost                                                  | Deployment Size |       |        |       |         |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                          2626339 |           14136 |       |        |       |         |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                                  |                 |       |        |       |         |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                                    | Min             | Avg   | Median | Max   | # Calls |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| DOMAIN_SEPARATOR                                                 |             294 |   294 |    294 |   294 |       7 |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| PERMIT_TYPEHASH                                                  |             256 |   256 |    256 |   256 |       7 |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| allowance                                                        |            2753 |  2753 |   2753 |  2753 |       7 |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| approve                                                          |           46319 | 46324 |  46319 | 46355 |      18 |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                                        |            2607 |  2607 |   2607 |  2607 |      72 |
|------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| decimals                                                         |            2428 |  2428 |   2428 |  2428 |     154 |
| modules/mpl-v2/contracts/MapleToken.sol:MapleToken Contract |                 |       |        |       |         |
| Deployment Cost                                             | Deployment Size |       |        |       |         |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                     1988471 |            9022 |       |        |       |         |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                             |                 |       |        |       |         |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                               | Min             | Avg   | Median | Max   | # Calls |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| approve                                                     |            5256 | 14156 |  14156 | 23056 |     154 |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                                   |            2881 |  2881 |   2881 |  2881 |    1455 |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| decimals                                                    |            2538 |  2538 |   2538 |  2538 |     154 |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| transfer                                                    |            3116 | 29949 |  30415 | 30415 |     323 |
|-------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| transferFrom                                                |            5645 | 28042 |  28146 | 32946 |     269 |
| modules/mpl-v2/contracts/MapleTokenInitializer.sol:MapleTokenInitializer Contract |                 |        |        |        |         |
| Deployment Cost                                                                   | Deployment Size |        |        |        |         |
|-----------------------------------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                                           1478348 |            6649 |        |        |        |         |
|-----------------------------------------------------------------------------------+-----------------+--------+--------+--------+---------|
|                                                                                   |                 |        |        |        |         |
|-----------------------------------------------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                                                                     | Min             | Avg    | Median | Max    | # Calls |
|-----------------------------------------------------------------------------------+-----------------+--------+--------+--------+---------|
| initialize                                                                        |          141211 | 141211 | 141211 | 141211 |      77 |
| modules/mpl-v2/contracts/MapleTokenProxy.sol:MapleTokenProxy Contract |                 |      |        |       |         |
| Deployment Cost                                                       | Deployment Size |      |        |       |         |
|-----------------------------------------------------------------------+-----------------+------+--------+-------+---------|
|                                                                735242 |            3633 |      |        |       |         |
|-----------------------------------------------------------------------+-----------------+------+--------+-------+---------|
|                                                                       |                 |      |        |       |         |
|-----------------------------------------------------------------------+-----------------+------+--------+-------+---------|
| Function Name                                                         | Min             | Avg  | Median | Max   | # Calls |
|-----------------------------------------------------------------------+-----------------+------+--------+-------+---------|
| fallback                                                              |            7839 | 9247 |   8185 | 57366 |    1647 |
| modules/non-transparent-proxy/contracts/NonTransparentProxy.sol:NonTransparentProxy Contract |                 |       |        |       |         |
| Deployment Cost                                                                              | Deployment Size |       |        |       |         |
|----------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                                                       345320 |            1642 |       |        |       |         |
|----------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                                                              |                 |       |        |       |         |
|----------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                                                                | Min             | Avg   | Median | Max   | # Calls |
|----------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| fallback                                                                                     |            3391 | 21942 |   8163 | 53547 |     243 |
| modules/xmpl/contracts/xMPL.sol:xMPL Contract |                 |        |        |        |         |
| Deployment Cost                               | Deployment Size |        |        |        |         |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
|                                       4276264 |           21116 |        |        |        |         |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
|                                               |                 |        |        |        |         |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| Function Name                                 | Min             | Avg    | Median | Max    | # Calls |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| DOMAIN_SEPARATOR                              |            3862 |   3862 |   3862 |   3862 |      14 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| PERMIT_TYPEHASH                               |             447 |    447 |    447 |    447 |      14 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| allowance                                     |            3165 |   3165 |   3165 |   3165 |      14 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| approve                                       |           46867 |  46876 |  46873 |  46891 |       8 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| asset                                         |             582 |    582 |    582 |    582 |      72 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| balanceOf                                     |            2947 |   2947 |   2947 |   2947 |    2254 |
|-----------------------------------------------+-----------------+--------+--------+--------+---------|
| deposit                                       |          174875 | 174875 | 174875 | 174875 |      14 |
| tests/utils/Mocks.sol:MockERC20.0.8.20 Contract |                 |       |        |       |         |
| Deployment Cost                                 | Deployment Size |       |        |       |         |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                         1467253 |            7995 |       |        |       |         |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                 |                 |       |        |       |         |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                   | Min             | Avg   | Median | Max   | # Calls |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| DOMAIN_SEPARATOR                                |            3743 |  3743 |   3743 |  3743 |       6 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| PERMIT_TYPEHASH                                 |             442 |   442 |    442 |   442 |       6 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| allowance                                       |            3148 |  3148 |   3148 |  3148 |       8 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| approve                                         |           48971 | 48977 |  48971 | 48995 |       4 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                       |            2825 |  2825 |   2825 |  2825 |    1588 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| burn                                            |           27729 | 30024 |  27739 | 34601 |       6 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| decimals                                        |             354 |   354 |    354 |   354 |      41 |
|-------------------------------------------------+-----------------+-------+--------+-------+---------|
| mint                                            |           68861 | 68865 |  68861 | 68873 |      71 |
| tests/utils/Mocks.sol:MockERC20.0.8.7 Contract |                 |       |        |       |         |
| Deployment Cost                                | Deployment Size |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                        1502133 |            7737 |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                |                 |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                  | Min             | Avg   | Median | Max   | # Calls |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| DOMAIN_SEPARATOR                               |            3751 |  3751 |   3751 |  3751 |       8 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| PERMIT_TYPEHASH                                |             447 |   447 |    447 |   447 |       8 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| __setApproveReverts                            |           43871 | 43871 |  43871 | 43871 |       1 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| allowance                                      |            3165 |  3165 |   3165 |  3165 |       9 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| approve                                        |           48932 | 48932 |  48932 | 48932 |       5 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                      |            2837 |  2837 |   2837 |  2837 |      20 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| burn                                           |           34620 | 34620 |  34620 | 34620 |       2 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| mint                                           |           68826 | 68826 |  68826 | 68826 |      22 |
| tests/utils/Mocks.sol:MockGlobals.0.8.20 Contract |                 |      |        |      |         |
| Deployment Cost                                   | Deployment Size |      |        |      |         |
|---------------------------------------------------+-----------------+------+--------+------+---------|
|                                            175332 |             746 |      |        |      |         |
|---------------------------------------------------+-----------------+------+--------+------+---------|
|                                                   |                 |      |        |      |         |
|---------------------------------------------------+-----------------+------+--------+------+---------|
| Function Name                                     | Min             | Avg  | Median | Max  | # Calls |
|---------------------------------------------------+-----------------+------+--------+------+---------|
| governor                                          |            2505 | 2505 |   2505 | 2505 |      42 |
|---------------------------------------------------+-----------------+------+--------+------+---------|
| operationalAdmin                                  |            2486 | 2486 |   2486 | 2486 |      37 |
| tests/utils/Mocks.sol:MockLoan.0.8.25 Contract |                 |       |        |       |         |
| Deployment Cost                                | Deployment Size |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                         154659 |             497 |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                |                 |       |        |       |         |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                  | Min             | Avg   | Median | Max   | # Calls |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| __setBorrower                                  |           44025 | 44025 |  44025 | 44025 |       2 |
|------------------------------------------------+-----------------+-------+--------+-------+---------|
| borrower                                       |            2505 |  2505 |   2505 |  2505 |       2 |
| tests/utils/Mocks.sol:MockPool.0.8.7 Contract |                 |       |        |       |         |
| Deployment Cost                               | Deployment Size |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
|                                       1743000 |            8968 |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
|                                               |                 |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                 | Min             | Avg   | Median | Max   | # Calls |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| __setConversionRate                           |           26693 | 38093 |  43793 | 43793 |       3 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| __setTransferReverts                          |           26843 | 26843 |  26843 | 26843 |       2 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| asset                                         |             640 |   806 |    640 |  2640 |      24 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                     |            2859 |  2859 |   2859 |  2859 |      10 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| convertToExitAssets                           |            2813 |  2813 |   2813 |  2813 |       2 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| manager                                       |             589 |   755 |    589 |  2589 |      24 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| totalSupply                                   |            2497 |  2497 |   2497 |  2497 |      10 |
| tests/utils/Mocks.sol:MockPoolManager.0.8.7 Contract |                 |     |        |      |         |
| Deployment Cost                                      | Deployment Size |     |        |      |         |
|------------------------------------------------------+-----------------+-----+--------+------+---------|
|                                               134450 |             562 |     |        |      |         |
|------------------------------------------------------+-----------------+-----+--------+------+---------|
|                                                      |                 |     |        |      |         |
|------------------------------------------------------+-----------------+-----+--------+------+---------|
| Function Name                                        | Min             | Avg | Median | Max  | # Calls |
|------------------------------------------------------+-----------------+-----+--------+------+---------|
| poolPermissionManager                                |             500 | 666 |    500 | 2500 |      24 |
| tests/utils/Mocks.sol:MockPoolPermissionManager.0.8.7 Contract |                 |       |        |       |         |
| Deployment Cost                                                | Deployment Size |       |        |       |         |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                         332079 |            1269 |       |        |       |         |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|                                                                |                 |       |        |       |         |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                                  | Min             | Avg   | Median | Max   | # Calls |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| __setHasPermission                                             |           26671 | 26671 |  26671 | 26671 |       2 |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| __setPermissionAdmins                                          |           26743 | 26743 |  26743 | 26743 |       2 |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| hasPermission                                                  |            1229 |  2895 |   3229 |  3229 |      12 |
|----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
| permissionAdmins                                               |            2821 |  2821 |   2821 |  2821 |       4 |
| tests/utils/Mocks.sol:MockRDT.0.8.20 Contract |                 |       |        |       |         |
| Deployment Cost                               | Deployment Size |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
|                                       1587291 |            8664 |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
|                                               |                 |       |        |       |         |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| Function Name                                 | Min             | Avg   | Median | Max   | # Calls |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| DOMAIN_SEPARATOR                              |            3743 |  3743 |   3743 |  3743 |      12 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| PERMIT_TYPEHASH                               |             442 |   442 |    442 |   442 |      12 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| allowance                                     |            3192 |  3192 |   3192 |  3192 |      12 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| approve                                       |           46769 | 46775 |  46769 | 46793 |       8 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| asset                                         |             575 |   627 |    575 |  2575 |      76 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| balanceOf                                     |            2847 |  2847 |   2847 |  2847 |     216 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| burn                                          |           27747 | 32331 |  34623 | 34623 |       6 |
|-----------------------------------------------+-----------------+-------+--------+-------+---------|
| mint                                          |           68883 | 68883 |  68883 | 68883 |      26 |

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

LCOV of commit 78e963c during CI #13

Summary coverage rate:
  lines......: 100.0% (194 of 194 lines)
  functions..: 100.0% (46 of 46 functions)
  branches...: 91.5% (65 of 71 branches)

Files changed coverage rate: n/a

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)

19-20: ⚡ Quick win

Add persist-credentials: false to all checkout steps for supply-chain defense-in-depth.

All checkout steps default to persisting git credentials in the runner's git config. For a supply-chain hardening PR, disabling credential persistence reduces the attack surface if a compromised dependency or later step attempts to exfiltrate credentials.

  • .github/workflows/ci.yml#L19-L20: Add persist-credentials: false to yarn-install job checkout.
  • .github/workflows/ci.yml#L45-L46: Add persist-credentials: false to test job checkout.
  • .github/workflows/ci.yml#L80-L81: Add persist-credentials: false to size job checkout.
  • .github/workflows/ci.yml#L108-L109: Add persist-credentials: false to coverage job checkout.
Example fix pattern for each checkout step
       - name: Checkout repository
         uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # actions/checkout v4
+        with:
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 19 - 20, Add `persist-credentials:
false` parameter to all checkout steps in the GitHub Actions workflow for
supply-chain security hardening. In `.github/workflows/ci.yml` at lines 19-20
(yarn-install job checkout), lines 45-46 (test job checkout), lines 80-81 (size
job checkout), and lines 108-109 (coverage job checkout), add the
`persist-credentials: false` option to each `actions/checkout` step to prevent
git credentials from persisting in the runner's git config and reduce attack
surface if dependencies or subsequent steps are compromised.

Source: Linters/SAST tools


14-39: ⚡ Quick win

Add persist-credentials: false to checkout step for defense-in-depth.

The checkout action at line 20 defaults to persisting git credentials in the runner's git config. In a PR focused on supply-chain hardening, explicitly disabling credential persistence prevents potential credential exfiltration if a compromised dependency or later step accesses the runner's git config.

       - name: Checkout repository
         uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # actions/checkout v4
+        with:
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 14 - 39, The checkout action step at
the "Checkout repository" task is not explicitly disabling git credential
persistence, which leaves the runner vulnerable to credential exfiltration from
compromised dependencies. Add a with section to the checkout step and include
persist-credentials: false as a configuration option to explicitly prevent git
credentials from being persisted in the runner's git config during the workflow
execution.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 152-160: The download-artifact action's path parameter is set to
"gas.txt", which creates a subdirectory and places the downloaded file at
"gas.txt/gas.txt". However, the add-pr-comment action's message-path parameter
expects the file to be at the root. Change the path parameter in the
download-artifact action from "gas.txt" to "." (current directory) so that the
gas-report artifact is extracted directly to the root where message-path can
locate it.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 19-20: Add `persist-credentials: false` parameter to all checkout
steps in the GitHub Actions workflow for supply-chain security hardening. In
`.github/workflows/ci.yml` at lines 19-20 (yarn-install job checkout), lines
45-46 (test job checkout), lines 80-81 (size job checkout), and lines 108-109
(coverage job checkout), add the `persist-credentials: false` option to each
`actions/checkout` step to prevent git credentials from persisting in the
runner's git config and reduce attack surface if dependencies or subsequent
steps are compromised.
- Around line 14-39: The checkout action step at the "Checkout repository" task
is not explicitly disabling git credential persistence, which leaves the runner
vulnerable to credential exfiltration from compromised dependencies. Add a with
section to the checkout step and include persist-credentials: false as a
configuration option to explicitly prevent git credentials from being persisted
in the runner's git config during the workflow execution.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db3974de-c35f-4b77-b598-fa5ca1e74e0d

📥 Commits

Reviewing files that changed from the base of the PR and between ef376c4 and 54b6d71.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .yarnrc

Comment thread .github/workflows/ci.yml
Signed-off-by: Cal Mac Fadden <108666242+calmacfadden@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

68-71: ⚠️ Potential issue | 🟠 Major

Pin Foundry to a specific nightly commit hash across all jobs.

The foundry-rs/foundry-toolchain action is SHA-pinned, but version: nightly still downloads a moving Foundry binary. Use version: nightly-<commit-hash> instead to ensure reproducible, deterministic CI runs. This prevents test, size, and coverage behavior from changing unexpectedly across runs.

Apply to lines 68-71, 103-106, and 131-134 in .github/workflows/ci.yml:

version: nightly-<specific-commit-hash>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 68 - 71, The version setting for the
Foundry toolchain is set to `version: nightly`, which downloads a moving binary
instead of pinning to a specific commit, causing non-deterministic CI behavior.
In the .github/workflows/ci.yml file, locate all instances where the
`foundry-rs/foundry-toolchain` action has `version: nightly` (appearing in the
"Install Foundry" step at lines 68-71, 103-106, and 131-134) and replace
`version: nightly` with `version: nightly-<specific-commit-hash>` where
`<specific-commit-hash>` is a pinned nightly commit hash to ensure reproducible
and deterministic builds across all jobs.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

45-56: Validate the effective nodeLinker in addition to its YAML declaration.

The step greps for nodeLinker: node-modules in the static file but doesn't assert the effective Yarn config for nodeLinker. A duplicate key or environment override could pass the grep while Corepack installs with a different linker. The effective enableScripts and npmMinimalAgeGate are validated via yarn config get, but nodeLinker is missing from this validation.

Suggested change
           enable_scripts="$(corepack yarn config get enableScripts)"
+          node_linker="$(corepack yarn config get nodeLinker)"
           minimal_age_gate="$(corepack yarn config get npmMinimalAgeGate)"
-          echo "enableScripts=${enable_scripts} npmMinimalAgeGate=${minimal_age_gate}"
+          echo "enableScripts=${enable_scripts} nodeLinker=${node_linker} npmMinimalAgeGate=${minimal_age_gate}"
 
           test "${enable_scripts}" = "false"
+          test "${node_linker}" = "node-modules"
           test "${minimal_age_gate}" = "10080"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 45 - 56, The workflow is validating
the effective configuration for enableScripts and npmMinimalAgeGate using
`corepack yarn config get` commands, but nodeLinker is only checked in the
static .yarnrc.yml file via grep. To ensure the effective nodeLinker
configuration is actually "node-modules" (and not overridden elsewhere), add a
new command that captures the effective nodeLinker value using `corepack yarn
config get nodeLinker`, store it in a variable similar to enable_scripts and
minimal_age_gate, include it in the echo statement for visibility, and add a
test assertion to verify it equals "node-modules".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 22-23: Add `persist-credentials: false` to all four checkout steps
in the workflow file to enforce least privilege and prevent unnecessary
persistence of the job token. In the checkout steps at lines 22-23 (yarn-install
job), 65-66 (test job), 100-101 (size job), and 128-129 (coverage job), add the
`persist-credentials: false` parameter to each `actions/checkout` action
configuration. This disables credential persistence since none of these jobs
perform authenticated Git operations requiring stored credentials.

---

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 68-71: The version setting for the Foundry toolchain is set to
`version: nightly`, which downloads a moving binary instead of pinning to a
specific commit, causing non-deterministic CI behavior. In the
.github/workflows/ci.yml file, locate all instances where the
`foundry-rs/foundry-toolchain` action has `version: nightly` (appearing in the
"Install Foundry" step at lines 68-71, 103-106, and 131-134) and replace
`version: nightly` with `version: nightly-<specific-commit-hash>` where
`<specific-commit-hash>` is a pinned nightly commit hash to ensure reproducible
and deterministic builds across all jobs.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 45-56: The workflow is validating the effective configuration for
enableScripts and npmMinimalAgeGate using `corepack yarn config get` commands,
but nodeLinker is only checked in the static .yarnrc.yml file via grep. To
ensure the effective nodeLinker configuration is actually "node-modules" (and
not overridden elsewhere), add a new command that captures the effective
nodeLinker value using `corepack yarn config get nodeLinker`, store it in a
variable similar to enable_scripts and minimal_age_gate, include it in the echo
statement for visibility, and add a test assertion to verify it equals
"node-modules".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5be75610-ddcd-46d9-814e-4a7a86b08309

📥 Commits

Reviewing files that changed from the base of the PR and between 54b6d71 and 78e963c.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .yarnrc.yml
  • package.json
✅ Files skipped from review due to trivial changes (2)
  • package.json
  • .yarnrc.yml

Comment thread .github/workflows/ci.yml
@0xfarhaan 0xfarhaan merged commit abc9e54 into main Jun 15, 2026
9 checks passed
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