Skip to content

Commit fbcd7a2

Browse files
authored
Merge pull request #215 from crytic/mdbook
mdbook deployment integration
2 parents c04429f + 269e9a8 commit fbcd7a2

File tree

3 files changed

+174
-0
lines changed

3 files changed

+174
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy GH pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
permissions:
11+
contents: read
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Install mdbook
18+
run: |
19+
mkdir mdbook
20+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
21+
echo `pwd`/mdbook >> $GITHUB_PATH
22+
- name: Build artifacts
23+
run: mdbook build
24+
- name: Upload artifact
25+
uses: actions/upload-pages-artifact@v1
26+
with:
27+
path: ./book
28+
deploy:
29+
permissions:
30+
pages: write
31+
id-token: write
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
runs-on: ubuntu-latest
36+
needs: build
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v1

SUMMARY.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Summary
2+
3+
[Introduction](./README.md)
4+
5+
- [Development-guidelines](./development-guidelines/README.md)
6+
- [High-level best practices](./development-guidelines/guidelines.md)
7+
- [Token integration checklist](./development-guidelines/token_integration.md)
8+
- [Incident Response Recommendations](./development-guidelines/incident_response.md)
9+
- [Secure development workflow](./development-guidelines/workflow.md)
10+
11+
- [Learn EVM](./learn_evm/README.md)
12+
- [EVM Opcode Reference](./learn_evm/evm_opcodes.md)
13+
- [Transaction Tracing](./learn_evm/tracing.md)
14+
- [Yellow Paper Guidance](./learn_evm/yellow-paper.md):
15+
- [Forks <> EIPs](./learn_evm/eips_forks.md)
16+
- [Forks <> CIPs](./learn_evm/cips_forks.md)
17+
- [Upgrades <> TIPs](./learn_evm/tips_upgrades.md)
18+
- [Forks <> BEPs](./learn_evm/beps_forks.md)
19+
- [Not so smart contracts]()
20+
- [Algorand](./not-so-smart-contracts/algorand/README.md)
21+
- [Rekeying](./not-so-smart-contracts/algorand/rekeying/README.md)
22+
- [Unchecked Transaction Fees](./not-so-smart-contracts/algorand/unchecked_transaction_fee/README.md)
23+
- [Closing Account](./not-so-smart-contracts/algorand/closing_account/README.md)
24+
- [Closing Asset](./not-so-smart-contracts/algorand/closing_asset/README.md)
25+
- [Group Size Check](./not-so-smart-contracts/algorand/group_size_check/README.md)
26+
- [Time-based Replay Attack](./not-so-smart-contracts/algorand/time_based_replay_attack/README.md)
27+
- [Access Controls](./not-so-smart-contracts/algorand/access_controls/README.md)
28+
- [Asset Id Check](./not-so-smart-contracts/algorand/asset_id_check/README.md)
29+
- [Denial of Service](./not-so-smart-contracts/algorand/denial_of_service/README.md)
30+
31+
- [Cairo](./not-so-smart-contracts/cairo/README.md)
32+
- [Improper access controls](./not-so-smart-contracts/cairo/access_controls/README.md)
33+
- [Integer division errors](./not-so-smart-contracts/cairo/integer_division/README.md)
34+
- [View state modifications](./not-so-smart-contracts/cairo/view_state/README.md)
35+
- [Arithmetic overflow](./not-so-smart-contracts/cairo/arithmetic_overflow/README.md)
36+
- [Signature replays](./not-so-smart-contracts/cairo/replay_protection/README.md)
37+
- [L1 to L2 Address Conversion](./not-so-smart-contracts/cairo/L1_to_L2_address_conversion/README.md)
38+
- [Incorrect Felt Comparison](./not-so-smart-contracts/cairo/incorrect_felt_comparison/README.md)
39+
- [Namespace Storage Var Collision](./not-so-smart-contracts/cairo/namespace_storage_var_collision/README.md)
40+
- [Dangerous Public Imports in Libraries](./not-so-smart-contracts/cairo/dangerous_public_imports_in_libraries/README.md)
41+
42+
- [Cosmos](./not-so-smart-contracts/cosmos/README.md)
43+
- [Incorrect signers](./not-so-smart-contracts/cosmos/incorrect_getsigners/README.md)
44+
- [Non-determinism](./not-so-smart-contracts/cosmos/non_determinism/README.md)
45+
- [Not prioritized messages](./not-so-smart-contracts/cosmos/messages_priority/README.md)
46+
- [Slow ABCI methods](./not-so-smart-contracts/cosmos/abci_fast/README.md)
47+
- [ABCI methods panic](./not-so-smart-contracts/cosmos/abci_panic/README.md)
48+
- [Broken bookkeeping](./not-so-smart-contracts/cosmos/broken_bookkeeping/README.md)
49+
- [Rounding errors](./not-so-smart-contracts/cosmos/rounding_errors/README.md)
50+
- [Unregistered message handler](./not-so-smart-contracts/cosmos/unregistered_msg_handler/README.md)
51+
- [Missing error handler](./not-so-smart-contracts/cosmos/missing_error_handler/README.md)
52+
53+
- [Solana](./not-so-smart-contracts/solana/README.md)
54+
- [Arbitrary CPI](./not-so-smart-contracts/solana/arbitrary_cpi/README.md)
55+
- [Improper PDA Validation](./not-so-smart-contracts/solana/improper_pda_validation/README.md)
56+
- [Ownership Check](./not-so-smart-contracts/solana/ownership_check/README.md)
57+
- [Signer Check](./not-so-smart-contracts/solana/signer_check/README.md)
58+
- [Sysvar Account Check](./not-so-smart-contracts/solana/sysvar_account_check/README.md)
59+
60+
- [Substrate](./not-so-smart-contracts/substrate/README.md)
61+
- [Arithmetic overflow](./not-so-smart-contracts/substrate/arithmetic_overflow/README.md)
62+
- [Don't panic!](./not-so-smart-contracts/substrate/dont_panic/README.md)
63+
- [Weights and fees](./not-so-smart-contracts/substrate/weights_and_fees/README.md)
64+
- [Verify first](./not-so-smart-contracts/substrate/verify_first/README.md)
65+
- [Unsigned transaction validation](./not-so-smart-contracts/substrate/validate_unsigned/README.md)
66+
- [Bad randomness](./not-so-smart-contracts/substrate/randomness/README.md)
67+
- [Bad origin](./not-so-smart-contracts/substrate/origins/README.md)
68+
69+
- [Program Analysis](./program-analysis/README.md)
70+
- [Echidna](./program-analysis/echidna/README.md)
71+
- [Introduction]()
72+
- [Introduction to fuzzing](./program-analysis/echidna/fuzzing-introduction.md)
73+
- [How to test a property](./program-analysis/echidna/how-to-test-a-property.md)
74+
- [Basic]()
75+
- [How to select the most suitable testing mode](./program-analysis/echidna/testing-modes.md)
76+
- [How to select the best testing approach](./program-analysis/echidna/common-testing-approaches.md)
77+
- [How to filter functions](./program-analysis/echidna/filtering-functions.md)
78+
- [How to test assertions](./program-analysis/echidna/assertion-checking.md)
79+
- [How to write good properties step by step](./program-analysis/echidna/property-creation.md)
80+
- [Frequently Asked Questions](./program-analysis/echidna/frequently_asked_questions.md)
81+
- [Advanced]()
82+
- [How to collect a corpus](./program-analysis/echidna/collecting-a-corpus.md)
83+
- [How to use optimization mode](./program-analysis/echidna/optimization_mode.md)
84+
- [How to detect high gas consumption](./program-analysis/echidna/finding-transactions-with-high-gas-consumption.md)
85+
- [How to perform smart contract fuzzing at a large scale](./program-analysis/echidna/smart-contract-fuzzing-at-scale.md)
86+
87+
- [How to test bytecode-only contracts](./program-analysis/echidna/testing-bytecode.md)
88+
- [How to use hevm cheats to test permit](./program-analysis/echidna/hevm-cheats-to-test-permit.md)
89+
- [How to seed Echidna with unit tests](./program-analysis/echidna/end-to-end-testing.md)
90+
- [Understanding and using `multi-abi`](./program-analysis/echidna/using-multi-abi.md)
91+
- [Fuzzing tips](./program-analysis/echidna/fuzzing_tips.md)
92+
- [Exercises]()
93+
- [Exercise 1](./program-analysis/echidna/Exercise-2.md)
94+
- [Exercise 3](./program-analysis/echidna/Exercise-3.md)
95+
- [Exercise 4](./program-analysis/echidna/Exercise-4.md)
96+
- [Exercise 5](./program-analysis/echidna/Exercise-5.md)
97+
- [Exercise 6](./program-analysis/echidna/Exercise-6.md)
98+
- [Exercise 7](./program-analysis/echidna/Exercise-7.md)
99+
- [Exercise 8](./program-analysis/echidna/Exercise-8.md)
100+
101+
- [Manticore](./program-analysis/manticore/README.md)
102+
- [Introduction to symbolic execution](./program-analysis/manticore/symbolic-execution-introduction.md):
103+
- [Running under Manticore](./program-analysis/manticore/running-under-manticore.md)
104+
- [Getting throwing paths](./program-analysis/manticore/getting-throwing-paths.md)
105+
- [Adding constraints](./program-analysis/manticore/adding-constraints.md)
106+
- [Exercises](./program-analysis/manticore/exercises/README.md)
107+
- [Example](./program-analysis/manticore/exercises/example.md)
108+
- [Exercise 1](./program-analysis/manticore/exercises/exercise1.md)
109+
- [Exercise 2](./program-analysis/manticore/exercises/exercise2.md)
110+
111+
- [Slither](./program-analysis/slither/README.md)
112+
- [Exercise 1](./program-analysis/slither/exercise1.md)
113+
- [Exercise 2](./program-analysis/slither/exercise2.md)
114+
115+
116+
- [Resources](./resources/tob_blogposts.md)

book.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[book]
2+
authors = ["Trail of Bits"]
3+
language = "en"
4+
multilingual = false
5+
src = "."
6+
title = "Building Secure Contracts"
7+
description = "Follow our guidelines and best practices to write secure smart contracts."
8+
9+
[output.html]
10+
git-repository-url = "https://github.com/crytic/building-secure-contracts"
11+
edit-url-template = "https://github.com/crytic/building-secure-contracts/edit/master/{path}"
12+
default-theme = "ayu"
13+
cname = "crytic.github.io/building-secure-contracts"
14+
no-section-label = true
15+
16+
[output.html.fold]
17+
enable = true
18+
level = 1

0 commit comments

Comments
 (0)