Compliance risks feature#789
Open
Konstantin-Zhukov wants to merge 10 commits into
Open
Conversation
The try/catch only catches the async data fetching, not render-time errors from the returned JSX, so move the JSX return outside the try block (satisfies react-hooks/error-boundaries).
- Replace mockup data with the real paginated compliance-risks endpoint (list + detail) via the shared fetcher; remove mockBackend + mock JSON. - Update ComplianceRiskDTO to the real backend shape (policyFrameworks, policyTags, violations, message, evidenceType, …). - Remove the open/closed switcher; show open and closed risks in one paginated list (backend returns them open-first). - Add a single-select framework dropdown that filters server-side via filterQuery[policyFrameworks][frameworkContains]; render it as a native Filter chip using a new hidden filter option. - Rewrite list columns (Policy, Frameworks, State, Violations, Created).
7fd2144 to
e017df3
Compare
make StatTile presentational (figure passed as children) so numeric counts, the controls ratio and the attestation time string share one tile without a union-typed value mock controls-covered and last-attestation with a TODO documenting the target /compliance-risks/stats backend shape, since neither is exposed by the API yet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done
TODO
HandleEventswitches on vuln type and only handlesdependencyVuln/firstPartyVuln/licenseRisk. There is nocomplianceRiskcase, so thevulninterface staysnilandvuln.GetTicketID()dereferences nil → SIGSEGV, killing the whole process. Affects all three integrations (gitlab/github/jira) and fires regardless of whether a repo is connected (the crash happens before the connection check). State is persisted, so the action appears applied only after a server restart.Fix: add a
nil-guard (if vuln == nil { return nil }) after the type switch in each integration — or add a propercomplianceRiskcase if compliance events should sync to tickets.