ethereum / staking-deposit-cli

Secure key generation for deposits
Creative Commons Zero v1.0 Universal
532 stars 330 forks source link

Critical issue: Missing mandatory keyword argument in function call PYL-E1125 #421

Open philipjonsen opened 2 weeks ago

philipjonsen commented 2 weeks ago

Description The function call does not pass a mandatory keyword-only argument. This is an error.

Bad practice

def func(foo, *args, test): print(foo, test)

func(10, 20, 30) # Missing required keyword argument 'test'

Recommended

def func(foo, *args, test): print(foo, test)

func(10, 20, 30, test=False)

Founder between https://github.com/eth2.0-deposit-cli/blob/master/staking_deposit/key_handling/keystore.py#L90-L90

Missing mandatory keyword argument 'iv' in function call:

https://github.com/eth2.0-deposit-cli/blob/master/staking_deposit/key_handling/keystore.py#L154-L154

image

yorickdowne commented 3 days ago

Thanks for the report. We’ll take a look over at ethstaker deposit cli. Timely too, we just started an audit run :/

yorickdowne commented 2 days ago

Looks like just a linter error. **kwargs is being passed, which means the keyword arguments are there