(self)
| 53 | """ |
| 54 | |
| 55 | def advisory_data(self) -> Iterable[AdvisoryData]: |
| 56 | try: |
| 57 | self.clone(self.repo_url) |
| 58 | base_path = Path(self.vcs_response.dest_dir) |
| 59 | supported_subdir = ["rubies", "gems"] |
| 60 | for subdir in supported_subdir: |
| 61 | for file_path in base_path.glob(f"{subdir}/**/*.yml"): |
| 62 | if file_path.name.startswith("OSVDB-"): |
| 63 | continue |
| 64 | raw_data = load_yaml(file_path) |
| 65 | advisory_url = get_advisory_url( |
| 66 | file=file_path, |
| 67 | base_path=base_path, |
| 68 | url="https://github.com/rubysec/ruby-advisory-db/blob/master/", |
| 69 | ) |
| 70 | yield parse_ruby_advisory(raw_data, subdir, advisory_url) |
| 71 | finally: |
| 72 | if self.vcs_response: |
| 73 | self.vcs_response.delete() |
| 74 | |
| 75 | |
| 76 | def parse_ruby_advisory(record, schema_type, advisory_url): |
nothing calls this directly
no test coverage detected