GitHub repositoriyasini audit qilish
(self)
| 625 | time.sleep(2) |
| 626 | |
| 627 | def audit_github(self): |
| 628 | """GitHub repositoriyasini audit qilish""" |
| 629 | self.print_banner() |
| 630 | print("📡 GITHUB REPOSITORY AUDIT") |
| 631 | print("="*50) |
| 632 | |
| 633 | repo_url = input(self.multilingual.get_text('github_prompt')).strip() |
| 634 | if not repo_url: |
| 635 | return |
| 636 | |
| 637 | output_file = input(self.multilingual.get_text('output_prompt')).strip() |
| 638 | if not output_file: |
| 639 | output_file = "security_report.html" |
| 640 | |
| 641 | print(f"\n{self.multilingual.get_text('cloning')}") |
| 642 | |
| 643 | # Repo ni klon qilish |
| 644 | temp_dir = self.clone_repository(repo_url) |
| 645 | if not temp_dir: |
| 646 | return |
| 647 | |
| 648 | try: |
| 649 | # Audit qilish |
| 650 | results = self.scan_project(temp_dir, output_file) |
| 651 | |
| 652 | # Hisobot yaratish |
| 653 | self.generate_report(results, temp_dir, output_file) |
| 654 | |
| 655 | print(f"\n{self.multilingual.get_text('report_generated')}{output_file}") |
| 656 | |
| 657 | finally: |
| 658 | # Tozalash |
| 659 | shutil.rmtree(temp_dir, ignore_errors=True) |
| 660 | |
| 661 | input("\nPress Enter to continue...") |
| 662 | |
| 663 | def audit_local(self): |
| 664 | """Lokal loyihani audit qilish""" |
no test coverage detected