Skip to content

Commit

Permalink
ci: comment bot & remove obsolete things (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Apr 10, 2024
1 parent 8ddfbcd commit d151e2f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 1,800 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Check key
env:
Expand All @@ -29,7 +29,7 @@ jobs:

- name: Install java
uses: actions/setup-java@v1
with: { java-version: '11', java-package: jre }
with: { java-version: "11", java-package: jre }

- name: Install certora cli
run: pip install certora-cli
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: PR Comment

on:
workflow_run:
workflows: [Test]
types:
- completed

jobs:
comment:
name: Comment Bot
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: pr_number
path: pr/
run-id: ${{ github.event.workflow_run.id }}

- name: Read pr number
id: get_pr_number
run: echo "pr_number=$(cat pr/pr_number.txt)" >> $GITHUB_OUTPUT

- uses: actions/download-artifact@v4
with:
name: ${{ github.event.workflow_run.head_sha }}
path: tmp/
run-id: ${{ github.event.workflow_run.id }}

- name: Find Comment
uses: peter-evans/find-comment@782f37b1a8a2b3e2eb9e86a994f0871e9dc146e3
id: fc
if: ${{ steps.get_pr_number.outputs.pr_number != null }}
with:
issue-number: ${{ steps.get_pr_number.outputs.pr_number }}
comment-author: "github-actions[bot]"
body-includes: Foundry report

- name: Create or update pr comment
uses: peter-evans/create-or-update-comment@48bb05bd5554c378187694936d277d48652922e7
if: ${{ steps.get_pr_number.outputs.pr_number != null }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ steps.get_pr_number.outputs.pr_number }}
body-file: tmp/template.md
edit-mode: replace

- id: get-comment-body
if: ${{ steps.get_pr_number.outputs.pr_number == null }}
run: |
body="$(cat tmp/template.md)"
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
echo "$body" >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Create or update commit comment
uses: peter-evans/commit-comment@ae7c3825ead23dab7a1ad8cd4df9617ab4bf0b37
if: ${{ steps.get_pr_number.outputs.pr_number == null }}
with:
sha: ${{ github.event.workflow_run.head_sha }}
body: ${{ steps.get-comment-body.outputs.body }}
62 changes: 19 additions & 43 deletions .github/workflows/main.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,43 @@
name: foundry-test
name: Test

on:
pull_request:
push:
branches:
- main
workflow_call:
inputs:
testCommand:
default: forge test -vv
description: the command responsible for running the test
type: string
required: false
secrets:
RPC_MAINNET:
required: false
RPC_POLYGON:
required: false
RPC_AVALANCHE:
required: false
RPC_OPTIMISM:
required: false
RPC_ARBITRUM:
required: false
COMMENT_PAT:
required: false

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@8f24390df009a496891208e5e36b8a1de1f45135
- name: Install node dependencies
run: bun install
- name: lint
run: bun run lint --check

test:
name: Foundry build n test
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: ci
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup env
run: |
if [[ "${{ secrets.RPC_MAINNET }}" != "" ]] ; then echo "RPC_MAINNET=${{ secrets.RPC_MAINNET }}" >> $GITHUB_ENV ; fi
if [[ "${{ secrets.RPC_POLYGON }}" != "" ]] ; then echo "RPC_POLYGON=${{ secrets.RPC_POLYGON }}" >> $GITHUB_ENV ; fi
if [[ "${{ secrets.RPC_AVALANCHE }}" != "" ]] ; then echo "RPC_AVALANCHE=${{ secrets.RPC_AVALANCHE }}" >> $GITHUB_ENV ; fi
if [[ "${{ secrets.RPC_OPTIMISM }}" != "" ]] ; then echo "RPC_OPTIMISM=${{ secrets.RPC_OPTIMISM }}" >> $GITHUB_ENV ; fi
if [[ "${{ secrets.RPC_ARBITRUM }}" != "" ]] ; then echo "RPC_ARBITRUM=${{ secrets.RPC_ARBITRUM }}" >> $GITHUB_ENV ; fi
- uses: oven-sh/setup-bun@8f24390df009a496891208e5e36b8a1de1f45135

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773
with:
version: nightly

- name: Copy .env
run: |
cp .env.example .env 2> /dev/null || :
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install node dependencies
run: bun install

- name: Run Forge build
run: |
Expand Down
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cp .env.example .env
forge install

# optional, to install prettier
npm i
bun install
```

<br>
Expand Down Expand Up @@ -57,43 +57,42 @@ The following are the security procedures historically applied to Aave v3.X vers

**-> Aave v3**

- [ABDK](./audits/27-01-2022_ABDK_AaveV3.pdf)
- [OpenZeppelin](./audits/01-11-2021_OpenZeppelin_AaveV3.pdf)
- [Trail of Bits](./audits/07-01-2022_TrailOfBits_AaveV3.pdf)
- [Peckshield](./audits/14-01-2022_PeckShield_AaveV3.pdf)
- [SigmaPrime](./audits/27-01-2022_SigmaPrime_AaveV3.pdf)
- [Certora](./certora/Aave_V3_Formal_Verification_Report_Jan2022.pdf)
- [ABDK](./audits/27-01-2022_ABDK_AaveV3.pdf)
- [OpenZeppelin](./audits/01-11-2021_OpenZeppelin_AaveV3.pdf)
- [Trail of Bits](./audits/07-01-2022_TrailOfBits_AaveV3.pdf)
- [Peckshield](./audits/14-01-2022_PeckShield_AaveV3.pdf)
- [SigmaPrime](./audits/27-01-2022_SigmaPrime_AaveV3.pdf)
- [Certora](./certora/Aave_V3_Formal_Verification_Report_Jan2022.pdf)

<br>

**-> Aave v3.0.1 - December 2022**

- [PeckShield](./audits/09-12-2022_PeckShield_AaveV3-0-1.pdf)
- [SigmaPrime](./audits/23-12-2022_SigmaPrime_AaveV3-0-1.pdf)
- [PeckShield](./audits/09-12-2022_PeckShield_AaveV3-0-1.pdf)
- [SigmaPrime](./audits/23-12-2022_SigmaPrime_AaveV3-0-1.pdf)

<br>

**-> Aave v3.0.2 - April 2023**

- [SigmaPrime](./audits/19-04-2023_SigmaPrime_AaveV3-0-2.pdf)
- [Certora](./audits/03-2023_2023_Certora_AaveV3-0-2.pdf)
- [SigmaPrime](./audits/19-04-2023_SigmaPrime_AaveV3-0-2.pdf)
- [Certora](./audits/03-2023_2023_Certora_AaveV3-0-2.pdf)

<br>

**-> Aave v3.1 - April 2024**

- [Certora](./) TBA
- [MixBytes](./) TBA
- An internal review by [SterMi](https://twitter.com/stermi) on the virtual accounting feature was conducted on an initial phase of the codebase.
- Additionally, Certora properties have been improved over time since the Aave v3 release. More details [HERE](./certora/README.md).
- [Certora](./) TBA
- [MixBytes](./) TBA
- An internal review by [SterMi](https://twitter.com/stermi) on the virtual accounting feature was conducted on an initial phase of the codebase.
- Additionally, Certora properties have been improved over time since the Aave v3 release. More details [HERE](./certora/README.md).

<br>

### Bug bounty

This repository will be subjected to [this bug bounty](https://immunefi.com/bounty/aave/) once the Aave Governance upgrades the smart contracts in the applicable production instances.


<br>

## License
Expand Down
Binary file added bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"scripts": {
"lint": "prettier ./",
"lint:fix": "npm run lint -- --write"
"lint:fix": "bun run lint -- --write"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit d151e2f

Please sign in to comment.