Skip to content

Commit a35ee7b

Browse files
authored
Merge pull request #51 from algorandfoundation/py-resource-usage
feat: add reference smart contracts, update algorand-python to 2.7.0
2 parents 84fe726 + c66221d commit a35ee7b

File tree

103 files changed

+24950
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+24950
-45
lines changed

projects/python-examples/.algokit/static-analysis/snapshots/AccountAndAppReference.approval.json

+1,932
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
{
2+
"success": false,
3+
"error": null,
4+
"result": [
5+
{
6+
"type": "ExecutionPaths",
7+
"count": 1,
8+
"description": "\nCheck: \"unprotected-deletable\", Impact: High, Confidence: High\nDescription: Unprotected Deletable Applications\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#unprotected-deletable-application\n",
9+
"check": "unprotected-deletable",
10+
"impact": "High",
11+
"confidence": "High",
12+
"help": "- Avoid deletable applications.\n- Add access controls to the vulnerable method.",
13+
"paths": [
14+
{
15+
"short": "0 -> 1",
16+
"blocks": [
17+
[
18+
"1: #pragma version 10",
19+
"2: UNSUPPORTED #pragma typetrack false"
20+
],
21+
[
22+
"5: main:",
23+
"6: pushint 1",
24+
"7: return"
25+
]
26+
]
27+
}
28+
]
29+
},
30+
{
31+
"type": "ExecutionPaths",
32+
"count": 1,
33+
"description": "\nCheck: \"unprotected-updatable\", Impact: High, Confidence: High\nDescription: Unprotected Upgradable Applications\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#unprotected-updatable-application\n",
34+
"check": "unprotected-updatable",
35+
"impact": "High",
36+
"confidence": "High",
37+
"help": "- Avoid upgradable applications.\n- Add access controls to the vulnerable method.",
38+
"paths": [
39+
{
40+
"short": "0 -> 1",
41+
"blocks": [
42+
[
43+
"1: #pragma version 10",
44+
"2: UNSUPPORTED #pragma typetrack false"
45+
],
46+
[
47+
"5: main:",
48+
"6: pushint 1",
49+
"7: return"
50+
]
51+
]
52+
}
53+
]
54+
},
55+
{
56+
"type": "ExecutionPaths",
57+
"count": 1,
58+
"description": "\nCheck: \"can-close-account\", Impact: High, Confidence: High\nDescription: Missing CloseRemainderTo field Validation\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#missing-closeremainderto-field-validation\n",
59+
"check": "can-close-account",
60+
"impact": "High",
61+
"confidence": "High",
62+
"help": "Validate `CloseRemainderTo` field in the LogicSig.",
63+
"paths": [
64+
{
65+
"short": "0 -> 1",
66+
"blocks": [
67+
[
68+
"1: #pragma version 10",
69+
"2: UNSUPPORTED #pragma typetrack false"
70+
],
71+
[
72+
"5: main:",
73+
"6: pushint 1",
74+
"7: return"
75+
]
76+
]
77+
}
78+
]
79+
},
80+
{
81+
"type": "ExecutionPaths",
82+
"count": 1,
83+
"description": "\nCheck: \"can-close-asset\", Impact: High, Confidence: High\nDescription: Missing AssetCloseTo Field Validation\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#missing-assetcloseto-field-validation\n",
84+
"check": "can-close-asset",
85+
"impact": "High",
86+
"confidence": "High",
87+
"help": "Validate `AssetCloseTo` field in the LogicSig.",
88+
"paths": [
89+
{
90+
"short": "0 -> 1",
91+
"blocks": [
92+
[
93+
"1: #pragma version 10",
94+
"2: UNSUPPORTED #pragma typetrack false"
95+
],
96+
[
97+
"5: main:",
98+
"6: pushint 1",
99+
"7: return"
100+
]
101+
]
102+
}
103+
]
104+
},
105+
{
106+
"type": "ExecutionPaths",
107+
"count": 1,
108+
"description": "\nCheck: \"is-deletable\", Impact: High, Confidence: High\nDescription: Deletable Applications\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#deletable-application\n",
109+
"check": "is-deletable",
110+
"impact": "High",
111+
"confidence": "High",
112+
"help": "Do not approve `DeleteApplication` type application calls.",
113+
"paths": [
114+
{
115+
"short": "0 -> 1",
116+
"blocks": [
117+
[
118+
"1: #pragma version 10",
119+
"2: UNSUPPORTED #pragma typetrack false"
120+
],
121+
[
122+
"5: main:",
123+
"6: pushint 1",
124+
"7: return"
125+
]
126+
]
127+
}
128+
]
129+
},
130+
{
131+
"type": "ExecutionPaths",
132+
"count": 1,
133+
"description": "\nCheck: \"is-updatable\", Impact: High, Confidence: High\nDescription: Upgradable Applications\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#upgradable-application\n",
134+
"check": "is-updatable",
135+
"impact": "High",
136+
"confidence": "High",
137+
"help": "Do not approve `UpdateApplication` type application calls.",
138+
"paths": [
139+
{
140+
"short": "0 -> 1",
141+
"blocks": [
142+
[
143+
"1: #pragma version 10",
144+
"2: UNSUPPORTED #pragma typetrack false"
145+
],
146+
[
147+
"5: main:",
148+
"6: pushint 1",
149+
"7: return"
150+
]
151+
]
152+
}
153+
]
154+
},
155+
{
156+
"type": "ExecutionPaths",
157+
"count": 1,
158+
"description": "\nCheck: \"missing-fee-check\", Impact: High, Confidence: High\nDescription: Missing Fee Field Validation\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#missing-fee-field-validation\n",
159+
"check": "missing-fee-check",
160+
"impact": "High",
161+
"confidence": "High",
162+
"help": "Validate `Fee` field in the LogicSig.",
163+
"paths": [
164+
{
165+
"short": "0 -> 1",
166+
"blocks": [
167+
[
168+
"1: #pragma version 10",
169+
"2: UNSUPPORTED #pragma typetrack false"
170+
],
171+
[
172+
"5: main:",
173+
"6: pushint 1",
174+
"7: return"
175+
]
176+
]
177+
}
178+
]
179+
},
180+
{
181+
"type": "ExecutionPaths",
182+
"count": 0,
183+
"description": "\nCheck: \"group-size-check\", Impact: High, Confidence: High\nDescription: Usage of absolute indexes without validating GroupSize\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#missing-groupsize-validation\n",
184+
"check": "group-size-check",
185+
"impact": "High",
186+
"confidence": "High",
187+
"help": "- Avoid using absolute indexes. Validate GroupSize if used.\n- Favor using ARC-4 ABI and relative indexes for group transactions.",
188+
"paths": []
189+
},
190+
{
191+
"type": "ExecutionPaths",
192+
"count": 1,
193+
"description": "\nCheck: \"rekey-to\", Impact: High, Confidence: High\nDescription: Rekeyable Logic Signatures\n\nWiki: https://github.com/crytic/tealer/wiki/Detector-Documentation#rekeyable-logicsig\n",
194+
"check": "rekey-to",
195+
"impact": "High",
196+
"confidence": "High",
197+
"help": "Validate `RekeyTo` field in the LogicSig.",
198+
"paths": [
199+
{
200+
"short": "0 -> 1",
201+
"blocks": [
202+
[
203+
"1: #pragma version 10",
204+
"2: UNSUPPORTED #pragma typetrack false"
205+
],
206+
[
207+
"5: main:",
208+
"6: pushint 1",
209+
"7: return"
210+
]
211+
]
212+
}
213+
]
214+
}
215+
]
216+
}

0 commit comments

Comments
 (0)