mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-10 03:07:16 +00:00
Removed note & added parentheses to a return statement condition
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user