Updated risk.Visit() to not always re-open risks#177
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Claude finished @peter-kwan's task —— View job Code Review AnalysisTodo List:
Has Go, TypeScript, or Python Changes: Yes Findings
Recommendations
|
|
No actionable comments were generated in the recent review. 🎉 WalkthroughTimestamp header comments updated in two Python model files. In Go, Risk.Visit behavior changed: when the existing risk status is Remediated, it now transitions to Open only if the incoming risk is not Remediated. Tests were adjusted and expanded: import order changed, a merge-related test was renamed and expanded, and a new TestRisk_VisitRemediatedRisks suite with two subtests was added. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
…tabularium into peter/dont-always-reopen
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/model/model/risk_test.go (1)
241-365: Fix typo in test name (“Bahaviors” → “Behaviors”).Minor, but it improves searchability and clarity.
♻️ Proposed rename
-func TestRisk_MoreMergeBahaviors(t *testing.T) { +func TestRisk_MoreMergeBehaviors(t *testing.T) {
The Hackerone integration started a new pattern where some risks it ingests would already be in the Remediated status.
At risk.Visit(), the logic assumes if a risk show up again, it is actually a new pop. This is true for our scanners. But won't always be for integrations where we are going to ingest remediated risks. We started to do that as we want the data, not just to ingest the risks to triage them.
Linear
Fix the second bug in this ticket: https://linear.app/praetorianlabs/issue/ENG-1645/hackerone-integration-bugs-in-fox