Skip to content

Commit

Permalink
add recommended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsamuels453 committed Jun 21, 2024
1 parent 70d914b commit bd098af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go/eth-rpc-tracetransaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rules:
confidence: LOW
impact: HIGH
likelihood: MEDIUM
description: Detects attempts to extract trace information from an EVM transaction or block
description: Detects attempts to extract trace information from an EVM transaction or block. In exchange or bridge applications, extra logic must be implemented encapsulating these endpoints to prevent the values transferred during reverted call frames from being counted.
references:
- https://blog.trailofbits.com/2023/08/23/the-engineers-guide-to-blockchain-finality/

Expand Down
7 changes: 0 additions & 7 deletions go/eth-txreceipt-status-negative.go

This file was deleted.

16 changes: 9 additions & 7 deletions go/eth-txreceipt-status.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package main

import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
)
import "github.com/ethereum/go-ethereum/core/types"

type Thing struct {
Id Int
Status bool
}

func Test() {
var debug Receipt
// ruleid: eth-txreceipt-status
a := debug.Status

var debug2 Thing
// ok: eth-txreceipt-status
b := debug2.Status
}
2 changes: 1 addition & 1 deletion go/eth-txreceipt-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ rules:
import "github.com/ethereum/go-ethereum/core/types"
...
- pattern: |
$RECEIVER.Status
($RECEIVER : Receipt).Status

0 comments on commit bd098af

Please sign in to comment.