Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnaneKhan committed Apr 22, 2024
1 parent db8bec1 commit 37ad435
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions gato/enumerate/repository.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import logging
import yaml

from datetime import datetime, timedelta

from gato.notifications import send_slack_webhook
from gato.cli import Output
from gato.models import Repository, Secret, Runner, Workflow
from gato.github import Api
Expand Down
2 changes: 1 addition & 1 deletion gato/models/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, repo_name, workflow_contents, workflow_name, date=None):
workflow_contents = workflow_contents.decode('utf-8')
self.parsed_yml = yaml.load(workflow_contents.replace('\t',' '), Loader=CSafeLoader)

if not self.parsed_yml:
if not self.parsed_yml or type(self.parsed_yml) != dict:
self.invalid = True

self.workflow_contents = workflow_contents
Expand Down
1 change: 0 additions & 1 deletion gato/workflow_parser/components/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,5 @@ def __process_action(self, uses):
elif 'permission' in uses:
self.is_gate = True
elif uses.startswith('./'):
print(uses)
# Local actions are runnable, so it is a sink.
self.is_sink = True
1 change: 0 additions & 1 deletion gato/workflow_parser/workflow_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def get_vulnerable_triggers(self, alternate=False):

if not self.parsed_yml or 'on' not in self.parsed_yml:
return vulnerable_triggers

triggers = self.parsed_yml['on']
if isinstance(triggers, list):
for trigger in triggers:
Expand Down

0 comments on commit 37ad435

Please sign in to comment.