h1sync.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:tts-bug-bounty-dashboard 作者: 18F 项目源码 文件源码
def _sync_report(self, h1_report, now):
            self.stdout.write(f"Synchronizing #{h1_report.id}.")
            scope = h1_report.structured_scope

            # Create or update the report
            report, created = Report.objects.update_or_create(
                defaults=dict(
                    title=h1_report.title,
                    created_at=h1_report.created_at,
                    triaged_at=h1_report.triaged_at,
                    closed_at=h1_report.closed_at,
                    disclosed_at=h1_report.disclosed_at,
                    state=h1_report.state,
                    issue_tracker_reference_url=h1_report.issue_tracker_reference_url or "",
                    weakness=h1_report.weakness.name if h1_report.weakness else "",
                    asset_identifier=scope and scope.asset_identifier,
                    asset_type=scope and scope.asset_type,
                    is_eligible_for_bounty=scope and scope.eligible_for_bounty,
                    last_synced_at=now,
                ),
                id=h1_report.id
            )

            self._sync_bounties(report, h1_report)
            self._sync_activities(report, h1_report)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号