更新: 2531 个文件 - 2026-03-17 21:00:03
这个提交包含在:
@@ -5,6 +5,7 @@ from typing import Any, Dict, List
|
||||
|
||||
import requests
|
||||
|
||||
from intel.http_client import request
|
||||
from intel.models import Candidate
|
||||
from intel.utils import unique
|
||||
|
||||
@@ -27,11 +28,11 @@ def fetch(system: Dict[str, Any], source: Dict[str, Any]) -> List[Candidate]:
|
||||
candidates: List[Candidate] = []
|
||||
|
||||
while True:
|
||||
response = requests.get(
|
||||
response = request(
|
||||
"GET",
|
||||
API_URL,
|
||||
headers=headers,
|
||||
params={"per_page": 100, "page": page, "ecosystem": source.get("ecosystem")},
|
||||
timeout=30,
|
||||
)
|
||||
if response.status_code == 403 and "rate limit" in response.text.lower():
|
||||
raise requests.HTTPError("GitHub advisory rate limit exceeded; set GITHUB_TOKEN for higher quota", response=response)
|
||||
|
||||
在新工单中引用
屏蔽一个用户