mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
rules: don't change passed-in argument
make a local copy of the scopes dict
This commit is contained in:
@@ -137,6 +137,10 @@ class Scopes:
|
||||
@classmethod
|
||||
def from_dict(self, scopes: dict) -> "Scopes":
|
||||
assert isinstance(scopes, dict)
|
||||
|
||||
# make local copy so we don't make changes outside of this routine
|
||||
scopes = dict(scopes)
|
||||
|
||||
# mark non-specified scopes as invalid
|
||||
if "static" not in scopes:
|
||||
scopes["static"] = None
|
||||
|
||||
Reference in New Issue
Block a user