Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

flake8: Enable checks: S, DUO130; Disable plugin: flake8-self (#1305)

bcolesac5408aefe6e
diff --git a/modules/sfp_gravatar.py b/modules/sfp_gravatar.py
index f60e5099..ac8d7845 100644
--- a/modules/sfp_gravatar.py
+++ b/modules/sfp_gravatar.py
@@ -74,7 +74,7 @@ class sfp_gravatar(SpiderFootPlugin):
# https://secure.gravatar.com/site/implement/
# https://secure.gravatar.com/site/implement/profiles/
def query(self, qry):
- email_hash = hashlib.md5(qry.encode('utf-8', errors='replace').lower()).hexdigest() # nosec
+ email_hash = hashlib.md5(qry.encode('utf-8', errors='replace').lower()).hexdigest() # noqa: DUO130
output = 'json'
res = self.sf.fetchUrl("https://secure.gravatar.com/" + email_hash + '.' + output,
diff --git a/modules/sfp_punkspider.py b/modules/sfp_punkspider.py
index e137b5fe..64ee8fe8 100644
--- a/modules/sfp_punkspider.py
+++ b/modules/sfp_punkspider.py
@@ -67,7 +67,7 @@ class sfp_punkspider(SpiderFootPlugin):
def query(self, qry):
ret = None
- qryhash = hashlib.md5(qry.encode('utf-8', errors='replace').lower()).hexdigest()
+ qryhash = hashlib.md5(qry.encode('utf-8', errors='replace').lower()).hexdigest() # noqa: DUO130
url = f"https://api.punkspider.org/api/partial-hash/{qryhash}"
res = self.sf.fetchUrl(url, timeout=30, useragent=self.opts['_useragent'])
diff --git a/setup.cfg b/setup.cfg
index 53aedfd7..62a94beb 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,10 +2,11 @@
flake8-max-line-length = 120
max-line-length = 120
max-complexity = 80
-select = C,E,F,W,I,B,DUO,D,R,A,S,SLF,Q0,SIM,SFS
-ignore = E501 W503 B006 DUO130 E800 B9 SFS301 Q000 S SIM
+select = C,E,F,W,I,B,DUO,D,R,A,S,Q0,SIM,SFS
+ignore = E501 W503 B006 E800 B9 SFS301 SF01 Q000 SIM
per-file-ignores =
spiderfoot/event.py:A,D
+ spiderfoot/plugin.py:I,D
spiderfoot/db.py:A,D,SFS101
sf.py:I,D,SFS101,SFS201
sflib.py:I,D,SFS101
diff --git a/test/requirements.txt b/test/requirements.txt
index f6b5ba8d..4286d74b 100644
--- a/test/requirements.txt
+++ b/test/requirements.txt
@@ -8,7 +8,6 @@ flake8-builtins==1.5.3
flake8-import-order==0.18.1
flake8-quotes==3.3.0
flake8-return==1.1.2
-flake8-self==0.2.2
flake8-sfs==0.0.3
flake8-simplify==0.14.1
pytest==6.2.4