Removed note & added parentheses to a return statement condition

This commit is contained in:
oriagmon
2018-10-17 10:44:34 +03:00
parent e501e9ee63
commit b37ebf0fee
2 changed files with 1 additions and 3 deletions

View File

@@ -72,8 +72,6 @@ _The file's (module's) content is imported automatically"_
The second step is to determine what events your Hunter will subscribe to, and from where you can get them.
`Convention:` Events should be declared in their corresponding module. for example, a KubeDashboardEvent event is declared in the dashboard discovery module.
`Note:` An hunter located under the `disovery` folder should not import any modules located under the `hunting` folder
in order to prevent circular dependency bugs
Following the above example, let's figure out the imports:
```python

View File

@@ -33,7 +33,7 @@ class AccessSecrets(Hunter):
logging.debug('Passive Hunter is attempting to access pod\'s secrets directory')
# get all files and subdirectories files:
self.secrets_evidence = [val for sublist in [[os.path.join(i[0], j) for j in i[2]] for i in os.walk('/var/run/secrets/')] for val in sublist]
return True if len(self.secrets_evidence) > 0 else False
return True if (len(self.secrets_evidence) > 0) else False
def execute(self):
if self.get_services():