@@ -220,15 +220,21 @@ def get_apps(self, repo):
220220
221221 def get_app_issues (self , repo , component_id ):
222222 with Session (self .engine ) as session :
223- issues = session .query (Application , ApplicationIssue ).filter (Application .id == component_id
224- ).filter (Application .id == ApplicationIssue .component_id ).all ()
223+ issues = session .query (Application , ApplicationIssue ).filter (
224+ Application .repo == repo ,
225+ Application .id == ApplicationIssue .component_id
226+ )
227+ if component_id is not None :
228+ issues = issues .filter (Application .id == component_id )
229+ issues = issues .all ()
225230 return [{
226231 'component_id' : app .id ,
227232 'location' : app .location ,
228233 'repo' : app .repo ,
229234 'component_notes' : app .notes ,
230235 'issue_type' : issue .issue_type ,
231- 'issue_notes' : issue .notes
236+ 'issue_notes' : issue .notes ,
237+ 'issue_id' : issue .id
232238 } for app , issue in issues ]
233239
234240 def get_app_audit_results (self , repo , component_id , has_non_security_error , has_vulnerability ):
@@ -561,6 +567,16 @@ def get_component_issues(owner: str = Field(description="The owner of the GitHub
561567 repo = process_repo (owner , repo )
562568 return json .dumps (backend .get_app_issues (repo , component_id ))
563569
570+ @mcp .tool ()
571+ def get_component_issues_for_repo (owner : str = Field (description = "The owner of the GitHub repository" ),
572+ repo : str = Field (description = "The name of the GitHub repository" )):
573+ """
574+ Get all component issues for the repository.
575+ """
576+ repo = process_repo (owner , repo )
577+ return json .dumps (backend .get_app_issues (repo , None ))
578+
579+
564580@mcp .tool ()
565581def get_component_results (owner : str = Field (description = "The owner of the GitHub repository" ),
566582 repo : str = Field (description = "The name of the GitHub repository" ),
0 commit comments