Skip to content

Commit 14919fc

Browse files
committed
add wont fix feature
Signed-off-by: Jefferson <jefferson.rios.caro@gmail.com>
1 parent b6997fa commit 14919fc

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

dep_checker/reconcile_issues.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ def list_open_issues(self, stream: str, limit: int = 1000) -> List[Dict[str, Any
217217
return issues
218218

219219
def list_closed_issues(self, stream: str, limit: int = 1000) -> List[Dict[str, Any]]:
220-
"""Closed issues for the stream, used to detect won't-fix suppressions."""
220+
"""Closed issues for the stream, used to detect won't-fix suppressions.
221+
222+
Fails closed: if the result hits ``limit`` it is likely truncated, which
223+
would make the suppression set incomplete and allow a won't-fix vuln to be
224+
re-opened. Abort rather than proceed with partial data.
225+
"""
221226
out = self._run([
222227
"issue", "list",
223228
"--state", "closed",
@@ -227,7 +232,11 @@ def list_closed_issues(self, stream: str, limit: int = 1000) -> List[Dict[str, A
227232
])
228233
issues = json.loads(out) if out.strip() else []
229234
if len(issues) >= limit:
230-
eprint(f"WARNING: closed-issue list hit the limit of {limit}; results may be truncated")
235+
raise RuntimeError(
236+
f"closed-issue list for stream '{stream}' hit the limit of {limit}; "
237+
f"results may be truncated — refusing to reconcile with an incomplete "
238+
f"won't-fix suppression set"
239+
)
231240
return issues
232241

233242
def create_issue(self, title: str, body: str) -> Optional[int]:

0 commit comments

Comments
 (0)