Skip to content

Commit 91ad75e

Browse files
authored
Merge pull request #405 from crytic/fix-ci-config
Remove deprecated CI tests, fix medusa test, links
2 parents ba43f14 + 7b2a7f3 commit 91ad75e

File tree

19 files changed

+42
-250
lines changed

19 files changed

+42
-250
lines changed

.github/workflows/echidna.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ jobs:
8181
contract: TestToken
8282
outcome: failure
8383
expected: 'echidna_balance_under_1000:\s*failed'
84-
- name: Gas estimation
85-
workdir: program-analysis/echidna/example/
86-
files: gas.sol
87-
config: gas.yaml
88-
outcome: success
89-
expected: "f(42,123,"
90-
flaky: true
9184
- name: Multi
9285
workdir: program-analysis/echidna/example/
9386
files: multi.sol

.github/workflows/lint_links.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
- uses: actions/checkout@v5
2323
with:
2424
submodules: recursive
25-
- uses: gaurav-nelson/github-action-markdown-link-check@v1
25+
- uses: tcort/github-action-markdown-link-check@v1
2626
with:
2727
use-quiet-mode: "yes"
2828
check-modified-files-only: ${{ (github.event_name == 'pull_request' && 'yes') || 'no' }}
29-
submodules: true

.github/workflows/medusa.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ jobs:
8484
workdir: program-analysis/echidna/example/
8585
files: multi.sol
8686
contract: C
87-
config: filter.yaml
8887
outcome: failure
8988
expected: 'echidna_state4()\" failed after the following call sequence'
9089
- name: Assert
9190
workdir: program-analysis/echidna/example/
9291
files: assert.sol
93-
config: assert.yaml
9492
contract: Incrementor
9593
outcome: failure
9694
expected: 'inc(uint256)\" resulted in an assertion failure after the following call sequence'
@@ -112,7 +110,6 @@ jobs:
112110
workdir: program-analysis/echidna/example/
113111
files: TestDepositWithPermit.sol
114112
solc-version: 0.8.0
115-
config: testdeposit.yaml
116113
contract: TestDepositWithPermit
117114
outcome: success
118115
expected: '\[PASSED\] Assertion Test: TestDepositWithPermit.testERC20PermitDeposit(uint256)'
@@ -162,7 +159,7 @@ jobs:
162159
go build -o medusa -v .
163160
go install -v .
164161
sudo cp medusa /usr/bin
165-
pip install crytic-compile solc-select
162+
pip install crytic-compile solc-select slither-analyzer
166163
167164
- name: Run Medusa
168165
continue-on-error: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building Secure Smart Contracts
22

3-
![](https://github.com/crytic/building-secure-contracts/actions/workflows/slither.yml/badge.svg) ![](https://github.com/crytic/building-secure-contracts/actions/workflows/echidna.yml/badge.svg) ![](https://github.com/crytic/building-secure-contracts/actions/workflows/medusa.yml/badge.svg)
3+
![](https://github.com/crytic/building-secure-contracts/actions/workflows/echidna.yml/badge.svg) ![](https://github.com/crytic/building-secure-contracts/actions/workflows/medusa.yml/badge.svg)
44

55
Brought to you by [Trail of Bits](https://www.trailofbits.com/), this repository offers guidelines and best practices for developing secure smart contracts. Contributions are welcome, you can contribute by following our [contributing guidelines](https://github.com/crytic/building-secure-contracts/blob/master/CONTRIBUTING.md).
66

SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
- [Advanced](./program-analysis/echidna/advanced/README.md)
9090
- [How to collect a corpus](./program-analysis/echidna/advanced/collecting-a-corpus.md)
9191
- [How to use optimization mode](./program-analysis/echidna/advanced/optimization_mode.md)
92-
- [How to detect high gas consumption](./program-analysis/echidna/advanced/finding-transactions-with-high-gas-consumption.md)
9392
- [How to perform smart contract fuzzing at a large scale](./program-analysis/echidna/advanced/smart-contract-fuzzing-at-scale.md)
9493
- [How to test bytecode-only contracts](./program-analysis/echidna/advanced/testing-bytecode.md)
9594
- [How and when to use cheat codes](program-analysis/echidna/advanced/on-using-cheat-codes.md)

development-guidelines/incident_response.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ Additionally, consider conducting a threat modeling exercise. This exercise will
4949
- An approachable guide for incident response. Chapter 4 includes examples for how to approach practicing your process.
5050
- [PagerDuty Incident Response](https://response.pagerduty.com/)
5151
- A _very_ detailed handbook of how PagerDuty handles incident response themselves. Some useful ideas and resources, but more practical for larger organizations.
52-
- [How to Hack the Yield Protocol](https://docs.yieldprotocol.com/#/operations/how_to_hack)
53-
- [Emergency Procedures for Yearn Finance](https://github.com/yearn/yearn-devdocs/blob/master/docs/developers/v2/EMERGENCY.md)
52+
- [Emergency Procedures for Yearn Finance](https://github.com/yearn/yearn-devdocs/blob/master/docs/developers/security/EMERGENCY.md)
5453
- [Rekt pilled: What to do when your dApp gets pwned and how to stay kalm - Heidi Wilder (DSS 2023)](https://www.youtube.com/watch?v=TDlkkg8N0wc)
5554
- [Crisis Handbook - Smart Contract Hack (SEAL)](https://docs.google.com/document/d/1DaAiuGFkMEMMiIuvqhePL5aDFGHJ9Ya6D04rdaldqC0/edit)
5655

5756
### Community Incident Retrospectives
5857

59-
- [Yield Protocol](https://medium.com/yield-protocol/post-mortem-of-incident-on-august-5th-2022-7bb70dbb9ada)
58+
- [Yield Protocol](https://web.archive.org/web/20230105183841/https://medium.com/yield-protocol/post-mortem-of-incident-on-august-5th-2022-7bb70dbb9ada)

mlc_config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"httpHeaders": [
3+
{
4+
"urls": [
5+
"https://github.com/",
6+
"https://guides.github.com/",
7+
"https://help.github.com/",
8+
"https://docs.github.com/"
9+
],
10+
"headers": {
11+
"Accept-Encoding": "zstd, br, gzip, deflate"
12+
}
13+
}
14+
],
15+
"retryOn429": true
16+
}

not-so-smart-contracts/cairo/L1_to_L2_address_conversion/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In Starknet, addresses are of the `felt` type, while on L1 addresses are of the
44

55
# Example
66

7-
Consider the following code to initiate L2 deposits from L1. The first example has no checks on the `to` parameter, and depending on the user's address, it could transfer tokens to an unexpected address on L2. The second example, however, adds verification to ensure this does not happen. Note that the code is a simplified version of how messages are sent on L1 and processed on L2. For a more comprehensive overview, see here: [https://www.cairo-lang.org/docs/hello_starknet/l1l2.html](https://docs.cairo-lang.org/hello_starknet/l1l2.html).
7+
Consider the following code to initiate L2 deposits from L1. The first example has no checks on the `to` parameter, and depending on the user's address, it could transfer tokens to an unexpected address on L2. The second example, however, adds verification to ensure this does not happen. Note that the code is a simplified version of how messages are sent on L1 and processed on L2. For a more comprehensive overview, see here: [https://www.cairo-lang.org/docs/hello_starknet/l1l2.html](https://web.archive.org/web/20250117175431/https://docs.cairo-lang.org/hello_starknet/l1l2.html).
88

99
```solidity
1010
contract L1ToL2Bridge {

not-so-smart-contracts/cosmos/abci_panic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ func validateTotalBorrows(ctx sdk.Context, k keeper.Keeper) {
4343

4444
## External examples
4545

46-
- [Gravity Bridge can `panic` in multiple locations in the `EndBlocker` method](https://giters.com/althea-net/cosmos-gravity-bridge/issues/348)
46+
- [Gravity Bridge can `panic` in multiple locations in the `EndBlocker` method](https://github.com/althea-net/cosmos-gravity-bridge/issues/348)
4747
- [Agoric `panic`s purposefully if the `PushAction` method returns an error](https://github.com/Agoric/agoric-sdk/blob/9116ede69169ebb252faf069d90022e8e05c6a4e/golang/cosmos/x/vbank/module.go#L166)
4848
- [Setting invalid parameters in `x/distribution` module causes `panic` in `BeginBlocker`](https://github.com/cosmos/cosmos-sdk/issues/5808). Valid parameters are [described in the documentation](https://docs.cosmos.network/v0.45/modules/distribution/07_params.html).

not-so-smart-contracts/substrate/randomness/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Note that the quality of randomness provided to the `pallet-bad-lottery` pallet
6161
- https://docs.substrate.io/reference/how-to-guides/pallet-design/incorporate-randomness/
6262
- https://ethresear.ch/t/rng-exploitability-analysis-assuming-pure-randao-based-main-chain/1825/7
6363
- https://ethresear.ch/t/collective-coin-flipping-csprng/3252/21
64-
- https://github.com/paritytech/ink/issues/57#issuecomment-486998848
64+
- https://github.com/use-ink/ink/issues/57#issuecomment-486998848

0 commit comments

Comments
 (0)