File tree Expand file tree Collapse file tree
vulnerabilities/pipelines/v2_improvers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,14 +68,14 @@ def steps(cls):
6868 )
6969
7070 def clone_repos (self ):
71- for url in self .repo_urls :
72- self .log (f"Cloning `{ url } `" )
71+ for repo_url in self .repo_urls :
72+ self .log (f"Cloning `{ repo_url } `" )
7373 try :
74- response = fetch_via_vcs (url )
74+ response = fetch_via_vcs (repo_url )
7575 if response :
76- self .vcs_responses .append ((response , url ))
76+ self .vcs_responses .append ((response , repo_url ))
7777 except Exception as e :
78- self .log (f"Failed to clone { url } : { e } " )
78+ self .log (f"Failed to clone { repo_url } : { e } " )
7979
8080 def collect_and_store_rules (self ):
8181 for vcs_response , repo_url in self .vcs_responses :
@@ -103,12 +103,13 @@ def collect_and_store_rules(self):
103103 continue
104104 raw_text = raw_text .replace ("\x00 " , "" )
105105
106- repo_url = repo_url [ 4 ::]
106+ repo_url = repo_url . strip ( "git+" )
107107 rule_url = get_advisory_url (
108108 file = file_path ,
109109 base_path = base_directory ,
110110 url = f"{ repo_url } /blob/master/" ,
111111 )
112+ print (rule_url )
112113
113114 DetectionRule .objects .update_or_create (
114115 rule_text = raw_text ,
You can’t perform that action at this time.
0 commit comments